Factory calendar in SAP

General introduction about the factory calender and how to get the dates validated based on calender key 


If a public holiday calendar or a factory calendar is set, the non-working days in the relevant region or in the company are highlighted in color in the calendar display and are not included in the search for appointments. By default, a calendar that does not contain public holidays is assigned to the appointment calendar.



Tcode--> SCAL


 click display


Based on the calendar key T001W-FABKL get the valid from and valid to date for a plant.
Example: - Suppose get the factory calendar for a plant in organization
First get the cost centre for the org unit à get the business area and company code àget the plant àget the key from table T001W (  Plants/Branch)

Enhance and Populate fields using BADI

Here we will learn how to enhance fields in the Datasource  and find out which BADI needs to be enhanced .

  • Get the BW data source and hierarchy tcode -->RSA6 (In this tcode we get the data sources based on the business area )
Double click the above data source and go to the extract structureàdouble click  
How append structure 
  • Enhance the extract structure 


  •  Append Enhance the extract structure


  •  Add the required fields to the the append structure 


  •  Activate the structure (better to choose enhancement category as “cannot be enhanced” )

 Now Find out where we need to code to populate the new fields
How to find the user exits/BADI ‘s  for data source  

  •  Put a break point at class CL_EXITHANDLER-->Method  Get_INSTANCE -->EXIT_NAME (where you will get the BADI name ) and  Go to the tcode RSA3 and execute.


  • Now you got the BADI name to SE18 and implement the same 



Cost center assignment for Org Unit


PPO1 à cost center for org unit 





Getting the Email ID for a employee from HR system



Main steps to get the email ID of a employee
  • Go to the PA30 with info type 0105 (communication ) and subtype 0010 (email id) click on the display button 



  •  Call SE37  Call function model ‘HR_READ_SUBTYPE
    • Here ENDA must be entered to get the email id 


Code snips :

CALL FUNCTION 'HR_READ_SUBTYPE'
  
EXPORTING
*   TCLAS                                      = 'A'
    pernr                
p_num     "Personnel number of the employee
    infty                
'0105'             " Info type
    SUBTY                
'0010'             " Subtyp
    ENDDA                                       = '99991231'
  
TABLES
    infty_tab           
l_t_p0105  "Records fetched
 
EXCEPTIONS
   INFTY_NOT_FOUND       
1
   INVALID_INPUT         
2
   
OTHERS                3.
READ TABLE l_t_p0105 INTO l_r_p0105 INDEX 1.
  
IF  sy-subrc =  0.
     p_EMAIL = l_r_p0105-usrid_long " usrid_long is the email id
  Endif.



/*Newer Posts*/ Older Posts Home