HR Programming

June 8, 2018 | Author: Senthil Muthusamy | Category: Human Resource Management, Subroutine, Databases, Employment, Parameter (Computer Programming)


Comments



Description

Technical Document on HR ProgrammingBy Amar Chintam Programming in Human Resource ______________________________________________________________________ Introduction on SAP HR module-: The SAP HR module enables companies to effectively manage information about the people in their organization. It is integrated with other SAP modules and external systems. From the Organization Management perspective, companies can model a business hierarchy, the relationships of employees to various business units and the reporting structure among employees. The Personnel Administration (PA) sub module helps employers to track employee master data, work schedules, salary and benefits information. The Personnel Development (PD) functionality focuses on employees' skills, qualifications and career plans. Finally, the Time Evaluation and Payroll sub modules process attendance and absences, gross salary and tax calculations, and payments to employees and third party vendors. 2 Document by:- Amar Chintam Programming in Human Resource ______________________________________________________________________ What is HR ? The task of Human Resource Management is to produce the organizational hierarchies , relationship between employees and to allow storage and administration of employee data . Organization : We can define an organization as an individual enterprise(company or industry) in which someone is leading it and with some departments like HR, Marketing, Finance, R&D etc. For any organization employees are the most powerful resource. So to maintain the employee related data we require one system which ensures accuracy and consistent within the organization. Why HR is different from other modules ? The following concepts are defined in HR which differs this module with other modules 1. Use of Infotypes 2. The use of Logical Database 3. Use of Macros 4. Storage and Access of data 5 Authorization checks 3 Document by:- Amar Chintam It supplies the report program with a set of hierarchically structured table entries derived from different database tables. the following logical databases can be used 1) PNP 2) PAP 3) PCH Logical Database PNP: Use logical database PNP to report on HR master data. It is possible to use logical database PCH( this facility can be used only to access this data. Being an ABAP programmer you may be knowing about Logical Database (LDB). A logical database is linked to an ABAP report program as one of the program attributes. But I will give a brief description about the LDB keeping in mind the novice. Introduction: A logical database is a special ABAP/4 program which combines the contents of certain database tables. specify in your program attributes. HR Logical Databases: In Human Resources (HR).Programming in Human Resource ______________________________________________________________________ Logical Database: The use of logical database is very important in HR ABAP Programming.Amar Chintam . but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons. Using logical databases facilitates the process of reading database tables. Main functions of the logical database PNP  Standard Selection screen  Data Retrieval  Authorization check 4 Document by:. The program behind this LDB will be SAPLDBPNP. This saves the developer from having to program the data retrieval. For example The HR PA has the logical database PNP. To use logical database PNP in your program. When you enter a date selection period. the PROVIDE loop retrieves the infotype records whose validity period overlaps with at least one day of this period.  Person selection Person selection is the 'true' selection of choosing a group of employees for whom the report is to run. GET PERNR fills the internal tables of the infotypes that are declared for each employee using the infotypes statement. Data is retrived at the GET PERNR point.Programming in Human Resource ______________________________________________________________________ Standard Selection Screen :  Date selection Date selection delimits the time period for which data is evaluated. You must declare this structure using the TABLES statement 5 Document by:. you can create your own report class through the IMG.  Sorting Data · The standard sort sequence lists personnel numbers in ascending order. Note: PERNR is a data dictionary structure without a database. GET PERNR event: The GET PERNR event is executed for all personnel numbers where selected on the basis of selection screen entries.Amar Chintam . · If SAP standard delivered report classes do not satisfy your requirements. · SORT function allows you to sort the report data otherwise.  Report Class · You can suppress input fields which are not used on the selection screen by assigning a report class to your program. All the sorting fields are from infotype 0001. The time point should be viewed as a loop via the selected personnel numbers. GET PERNR retrieves all records of the relevant infotypes from the database.  Period-Related Data All infotype records are time stamped. For example. pn-begda = '19990931' pn-endda = '99991231' IT0006 subtype 1 is resident address RP-PROVIDE-FROM-LAST P0006 1 PN-BEGDA PN-ENDDA. PROVIDE * FROM Pnnnn BETWEEN PN-BEGDA AND PN-ENDDA If Pnnnn-XXXX = ' '. GET PERNR. 6 Document by:.ENDPROVIDE loop.Amar Chintam . INFOTYPES: 0001. End-of-selection. "PERSONAL DATA 0008. Start-of-selection. ENDPROVIDE. We Will discuss about Read master data under processing infotypes.Programming in Human Resource ______________________________________________________________________ Data Retrieval from LDB 1. "ORG ASSIGNMENT 0002. endif. IT0006 (Address infotype) 01/01/1990 12/31/9999 present Which record to be read depends on the date selection period specified on the selection screen. Read Master Data   Infotype structures (after GET PERNR) are internal tables loaded with data. Fill data structures with the infotype records. "BASIC PAY 2. GET PERNR.  Current Data IT0006 Address .01/01/1990 12/31/9999 present RP-PROVIDE-FROM-LAST retrieves the record which is valid in the data selection period. Create data structures for infotypes. write:/ Pnnnn-XXXX. The infotype records (selected within the period) are processed sequentially by the PROVIDE . PN-BEGDA PN-ENDDA. Logical Database PCH: This logical database generally enables you to report on all HR infotypes.Amar Chintam . you are advised not to use this logical database unless you want to report on Personnel Planning data. You need to declare your required logical database at this place.Programming in Human Resource ______________________________________________________________________ This is the attributes screen of the program. Look at the field Logical database. However. 7 Document by:. I have declared the LDB as PNP. Logical Database PAP: Logical database PAP enables you to access data from Recruitment. Amar Chintam . You can customize the selection screen with your own fields by change or create to HR report category.Programming in Human Resource ______________________________________________________________________ This is the PNP selection screen. 8 Document by:. 1) Personnel Administration 2) Personnel Development 3) Time Management 4) Payroll 9 Document by:.Programming in Human Resource ______________________________________________________________________ We are going to discuss the following areas in HR.Amar Chintam . It may represent geographical locations. Employee groups are used to generate default values for payroll accounting area and basic pay. Functions include: 1. Unionized employees. Contractors. Retired employees. Data can be stored for specific periods. Time & Payroll. address). Personnel area is specific to HR and is a four character alphanumeric identification. Generate default pay scale type and area for an employee's basic pay. Personnel area 100 is for employees in Karnataka. It is an organizational entity representing an area within an organization defined by specific aspects of personnel administration. Organizational (Position description). which includes current and historical. Components of PA:  Personnel Area: represents a division of a company code into subunits. Set groupings for Time Management.  Employee Groups: divides or groups employees into various categories. substitution and absence and leave types can be setup for individual personnel subareas.  Personnel Subarea: is a further subdivision of Personnel area. 3. Master Data contains all employee data used in HR processing.Amar Chintam . you can specify 10 Document by:. Master Data is stored in Infotypes. Infotypes are tables (for user Data entry screen) that contain logically related employee data. Personnel areas are subdivided into personnel subareas. 200 is for Chennai. Define public holiday calendar. Eg. Eg. 2. Master Data includes Personal (Eg. so that work schedules. Eg.Programming in Human Resource ______________________________________________________________________ Personnel Administration: PA involves administrating employee data. Benefits (Insurance. time management and payroll. Pension). Executives. Hourly employees. Active employees. The employee subgroup grouping for the payroll rule allows you to define different payroll procedures for different employee subgroups. For eg.  Employee Subgroups: are further differentiated within the employee group. Salaried employees. commonly referred to Master Data. The employee subgroup grouping for the work schedule defines the validity of work schedule. 11 Document by:.Programming in Human Resource ______________________________________________________________________ whether an employee's pay should be determined on hourly or monthly basis.Amar Chintam . and the attendance or absence quota type determines the validity of time quotas. Programming in Human Resource ______________________________________________________________________ Infotypes: Infotypes are units of information in the Human Resource System. They are used to group data fields together that all relate to the same subject matter. Infotypes structure information, and facilitate data entry and time-dependent data storage. From the user’s perspective, infotypes are data entry screens. From the database perspective, infotypes are a data structure and a set of data records that belong together. The ability to create histories for infotypes is ensured by time-dependent infotype storage. The system records a validity period for each infotype record. Each infotype entered for an employee usually has several data records that are distinguished one from the other by their validity periods. Time constraints: Enable you to determine how the validity periods of infotype data records interact:  Time constraint 1: Exactly one valid data record of the infotype in question must exist for the entire time that the employee belongs to the enterprise.  Time constraint 2: No more than one valid data record of the infotype in question can exist at any one time.  Time constraint 3: Any number of valid data records of the infotype in question can exist at any one time. The prerequisites for the existence of a personnel or applicant number are infotypes 0000 Actions, 0001 Organizational Assignment, 0002 Personal Data, and 0003 Payroll Status. 12 Document by:- Amar Chintam Programming in Human Resource ______________________________________________________________________ One physical table is stored on the database for each transparent table. The names of the physical table and logical table definition in the Dictionary are compatible. The following naming convention applies to infotype tables; nnnn stands for the infotype number:  PAnnnn for transparent tables in Personnel Administration  PBnnnn for transparent tables in Recruitment  HRPnnnn for transparent tables in Personnel Planning 13 Document by:- Amar Chintam Programming in Human Resource ______________________________________________________________________ The primary key of transparent table PAnnnn consists of the following key fields:  PERNR: the personnel number is the only unique key within a client for identifying an employee. It is used to access the display and maintenance screens for an employee’s master data and working time data (infotypes).  SUBTY: subtypes are subdivisions of infotypes. An infotype’s subtypes can have different time constraints and form their own histories.  OBJPS: the object identification is used to make a distinction between records with the same infotype, subtype, lock indicator, start date, and end date. For example, the child number in infotype 0021 Family/Related Person.  SPRPS: the lock indicator for HR master data is used to lock and unlock data records, which enables the “double verification principle” to be put into practice. In accordance with this principle, at least two users are involved in the process of writing an active data record to the database. One of the users creates a locked infotype record, and the other user unlocks - that is, activates - the data record.  ENDDA: end date.  BEGDA: start date. 14 Document by:- Amar Chintam Amar Chintam .Customer-Specific Settings is used for customer settings in Administration infotypes.  Table T777D Infotypes .Programming in Human Resource ______________________________________________________________________  SEQNR: the sequential number is used to make a distinction between infotype records that have the same key and time constraint '3' (any number of valid infotype data records at any one time). structures. it is assigned by the system automatically.  Table T77CD Infotypes . 15 Document by:.  Table T582A Infotypes .Dialog/Database Assignment is the central check table (domain INFOTYP) for all HR infotypes (Administration and Planning infotypes). and so on). It is used to store the names of all infotype-dependent repository objects (tables.Customer-Specific Settings is used for customer settings in Planning infotypes.  Table T77ID Infotypes: Enhancements to T777D is simply an enhancement of table T777D that exists for reasons of memory space. programs. Unlike the object identification. Includes if required.Programming in Human Resource ______________________________________________________________________ INFOTYPE PROCESSING: After the Event GET PERNR point. *Provide statement PROVIDE * from pnnnn between PN-BEGDA and PN-ENDDA. the internal tables of the infotypes contain records and ready for processing...required Validations. . These statements make the newest or oldest record in the PN-BEGDA to PN-ENDDA data selecting period available in the structure Pnnnn for infotype nnnn. Start-of-Selection. 16 Document by:. Write: / pnnnn-<field>. Selection-screen formatting.Amar Chintam . PROCESING A SPECIFIC INFOTYPE RECORD: RP-PROVIDE-FROM-LAST Pnnnn SPACE PN-BEGDA PN-ENDDA. RP-PROVIDE-FROM-FRST Pnnnn SPACE PN-BEGDA PN-ENDDA. It is similar to normal select statement.All Performs END-OF-SELECTION “event ends here Write/Download. GET PERNR “Event starts here Perform retrieve Perform Populate ….. ENDPROVIDE Pnnnn stands for internal table for infotype nnnn. Declare PERNR structure in tables. STANADARD HR PROGRAM STEPS: Attach PNP Logical Database name in Attributes. Amar Chintam .Programming in Human Resource ______________________________________________________________________ 17 Document by:.                                                      PROVIDE * FROM p0002 BETWEEN pn­begda AND pn­endda.                                                    p0002­sprsl.                                                    pernr­ename.                                                 sy­vline.Programming in Human Resource ______________________________________________________________________ Look Lookatatthe the example below example below Using the logical database and reading master data.                                      ENDPROVIDE.                                               INFOTYPES: 0002.                                                 sy­vline. Suppose you want to create a report which generates a list of employees with the following information     Personnel number Name Language Date of birth REPORT zamar.                                                pnptimed = 'D'.                                                 sy­vline.            CHECK language.  18 Document by:.                     "Personal Data          SELECT­OPTIONS: language FOR p0002­sprsl.                                                                                                         *­­ Processing                                               GET pernr.                                                *­­ Declaration                                              TABLES: pernr.Amar Chintam .                                              WRITE: / p0002­pernr.                                                    p0002­gbdat.                                                                                 *­­ Selection screen                                         INITIALIZATION. 19 Document by:.Programming in Human Resource ______________________________________________________________________ Suppose you require additional reports that combine data from different infotypes Then you need to join one or more infotypes.  Any number of infotypes can be linked by a JOIN  Note that changing data in any one of the infotypes linked by a join causes a split in the selection period.Amar Chintam . The record is not meaningful because the join's task of retrieving data from all of the infotypes in question has not been performed. Using variable Pnnnn_VALID. If a partial interval for infotype Pnnnn contains data. In this example. 20 Document by:. the first partial interval only contains personal data.Amar Chintam .Programming in Human Resource ______________________________________________________________________      If infotypes linked by a JOIN have subtypes. its Pnnnn_VALID variable is filled with X. this variable is created for each Pnnnn infotype included in a join. the system recognizes that one partial interval only contains incomplete data. When the report is run. processing must be restricted to one subtype using a WHERE condition. in which a subtype is queried. which means that projection is only allowed for time constraints 1 and 2. Data must be unique. JOIN and PROJECTION can be combined in a PROVIDE statement.Programming in Human Resource ______________________________________________________________________      The * in the PROVIDE statement. Infotype records are not allowed to overlap for projection. is replaced by the five-digit field name of the infotype included in the projection. 21 Document by:. The * in a simple PROVIDE means that all of the fields in the infotype are included in the projection. The logical validity of the activity period is stored in the infotype's BEGDA and ENDDA fields. which stands for all of the fields in the infotype.Amar Chintam .                                                                                               22 Document by:. The created list should contain the following information:  Start date  End date  Name  Place of residence  Only process the records from Infotype 0006 which have subtype 1.  Enter a width of 100 characters for the list (addition LINE-SIZE for keyword REPORT).Amar Chintam .                       "Address              DATA: name LIKE p0001­ename. Use the statement CONCATENATE.                               *­­ declaration                                              TABLES: pernr.                       "Personal Data                   0006. Suppose you want to create a report in which period the employee lived at which address under which name. REPORT zpsol020 LINE­SIZE 100.                                               INFOTYPES: 0002.Programming in Human Resource ______________________________________________________________________ Look Lookatatthe the example below example below Join and Projection “Joining Infotypes” At the end of this exercise.  Make the processing of data dependent on the content of variable Pnnnn_VALID. you will be able to:  Process the Personal Data infotype (0002) and Addresses infotype (0006) using a JOIN. and the length of the city to 20 characters.  Use a variable with the characteristics of field P0001-ENAME. Restrict the length of the name to 30.  Only print data for the periods for which address information is available. Separate the resulting field contents in your list by a vertical line (SY-VLINE). so that the first and last name are only separated by one space.                                                                                                              *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­*  *       FORM PRINT_DATA                                      *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­*  FORM print_data.                                        ENDIF.Programming in Human Resource ______________________________________________________________________ *­­ Processing                                               GET pernr.Amar Chintam .                                                     PROVIDE * FROM p0002                                                 * FROM p0006 BETWEEN pn­begda AND pn­endda                    WHERE p0006­subty = '1'.                                                     23 Document by:.                                         sy­vline.                                 ENDFORM.                                               WRITE: / p0002­pernr NO­ZERO.                                          PERFORM print_data.                                                    p0002­endda.                                                    (30) name.                                         CONCATENATE p0002­nachn p0002­vorna INTO name                SEPARATED BY SPACE.                                                   sy­vline.                                                    p0002­begda.                              IF p0006_valid EQ 'X'.                                                 sy­vline.                                                     ENDPROVIDE.                                                 sy­vline.                                                    (20) p0006­ort01. check that the table entry to be read for the job key in question is already in the work area.  Only print data for the periods in which organizational assignment information is available. and the length of the job title to 15 characters.  Read texts from time-dependent table entries.  Enter a width of 100 characters for the list (addition LINE-SIZE for keyword REPORT). Suppose you want to create a report which documents how an employee’s job has developed. Separate the resulting field contents in your list by a vertical line (SY-VLINE).Amar Chintam . Project to field P0002-GBDAT for infotype 0002. 24 Document by:. and the job key text. If the required table entry does not exist. use the statement CHECK.Programming in Human Resource ______________________________________________________________________ Look Lookatatthe the example examplebelow below Join and Projection “Projection to Infotype Fields” At the end of this exercise. To do this.  Before reading table T513S. End further processing with the REJECT statement. an error text. you will be able to:  Project to particular fields by joining two infotypes. The created list should contain the following information:       Name Date of birth Start date End date Job key Job title  Project to the fields P0001-STELL and P0001-ENAME for infotype 0001. Restrict the length of the name to 20. print the personnel number.                                                        T513S.     IF p0001_valid EQ 'X'.                                                    (15) t513s­stltx.                                                     PROVIDE stell ename FROM p0001                                       gbdat       FROM p0002 BETWEEN pn­begda and pn­ endda.                                       PERFORM re513s.                                                    p0001­begda.                                            sy­vline.                                                    (20) p0001­ename.                                                     ENDIF.Programming in Human Resource ______________________________________________________________________ REPORT zpsol030 LINE­SIZE 100.                         "Job Titles           INFOTYPES: 0001.                       "Personal Data                                                              *­­ Processing                                               GET pernr.                                                     ENDPROVIDE.                                                    p0001­stell.                                              WRITE: / pernr­pernr. Assignment            0002.                               *­­ Declaration                                              TABLES: pernr.Amar Chintam .                       "Organ.                                                    p0001­endda.                                      ENDIF.                                                 sy­vline.                                            sy­vline.                                                 sy­vline.                                                 sy­vline.                                         IF p0001­stell NE space.                                                    p0002­gbdat.                                                *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­* *       FORM RE513S                                          *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­* *       Read Job Title                                       *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­* 25 Document by:.                                                 sy­vline.                               ENDSELECT.                                                     ENDFORM.Programming in Human Resource ______________________________________________________________________ FORM re513s.                                                    ENDIF.Amar Chintam .                                                 WRITE: / pernr­pernr.                                                ‘No entry in T513S for job key’ (001).                                        REJECT.                     26 Document by:.                 p0001­stell.                                                   IF sy­subrc NE 0.                                              CLEAR t513s.                            SELECT * FROM t513s                                              WHERE sprsl EQ sy­langu                                      AND   stell EQ p0001­stell                                   AND   endda GE p0001­begda                                   AND   begda LE p0001­begda.                                                   CHECK sy­langu    NE t513s­sprsl OR                                p0001­stell NE t513s­stell OR                                p0001­begda LT t513s­begda OR                                p0001­begda GT t513s­endda. macro modules can be used to modularize programs. These macros are defined in program SAPDBPNP (include DBPNPMAC) with the keyword DEFINE. Macro modules are frequently used in HR. the first two letters stand for the application.Amar Chintam . If you want to use these macros in reports that do not use the logical database PNP. you must include program DBPNPMAC with the keyword INCLUDE.      Like subroutines and function modules. In accordance with the naming convention. You can also define your own macros. They can be used in any program that uses the logical database PNP.Programming in Human Resource ______________________________________________________________________ HR Macros and Function Modules: At the conclusion of this chapter you will be able to use HR macros and read infotypes without using logical database. Some macros are also stored in the Macros in ABAP Programs table (TRMAC) 27 Document by:. Programming in Human Resource ______________________________________________________________________     The RP_PROVIDE_FROM_LAST macro retrieves the last valid data record in the data selection period. The parameters for RP_PROVIDE_FROM_LAST are: infotype, subtype, start date, and end date. If you do not want to specify a particular subtype, enter SPACE. You can process not only the last valid data record in the data selection period, but also the first valid data record using the RP_PROVIDE_FROM_FRST macro. The macro return code PNP-SW-FOUND has the value 1 if a suitable entry exists in the infotype table for the specified period. If no entry is found, the value is 0. 28 Document by:- Amar Chintam Programming in Human Resource ______________________________________________________________________  When the START-OF-SELECTION event occurs, the RP_SET_DATA_INTERVAL macro ensures that the only records imported from database table PAnnnn to internal table Pnnnn are those which are valid in the data selection period. 29 Document by:- Amar Chintam Programming in Human Resource ______________________________________________________________________   It is often necessary to read the groupings stored in the Personnel Area/Subarea table because they are required as keys for other tables. This must take place individually for each personnel number to be processed. Each employee's assignment to a personnel area and subarea is stored in infotype 0001. The parameters of the macro are:  Personnel areas  Personnel subareas  Reaction, if no entry is found:  X = Termination of report with error message ‘No entry found in table ...’  SPACE = SY-SUBRC is set to 4.  Alternatively, if you only want to determine the country indicator, you can use the function module HR_COUNTRY_GROUPING_GET.  30 Document by:- Amar Chintam However. 31 Document by:. To do this.Programming in Human Resource ______________________________________________________________________   You can also read infotype records for a particular personnel number without using the logical database. you must ensure that the internal table for the required infotype is declared with the INFOTYPE statement. use the function module HR_READ_INFOTYPE.Amar Chintam . If this is the case. for example. Values are returned in an internal table. If you want to read an infotype separately in one of these reports. The function module performs an authorization check. .Amar Chintam .Programming in Human Resource ______________________________________________________________________     The function module reads the HR infotype records for a person (employee or applicant) in accordance with the specified selection criteria. however. it is incomplete due to missing authorization 8: The return table is empty because no records were found with the specified criteria 12: The return table is empty due to missing authorization Note: You should not use this function module in reports that use the logical database PNP. The following specifications are possible for the return code: 0: The return table contains all required records 4: The return table contains all records. such tables can be declared with the INFOTYPES statement.). 32 Document by:. the structure of which corresponds to the appropriate infotype table. In the calling program. you can call the subroutine READ-INFOTYPE directly in the database program SAPDBPNP (PERFORM READ-INFOTYPE(SAPDBPNP)). An infotype record is selected if its validity period overlaps with the specified period. you declare the infotypes in the statement INFOTYPES with supplement MODE N. . you can determine the initial start date of an employee. To find additional modules.P0016 Contract Elements . Most function modules in HR have the letters 'HR' or 'RP' in the first two characters of their name. The employment status (parameter STATUS2) can also be specified for infotype P0000.P0041 Date Specifications  The transfer parameter CHECK_INFOTYPES is used to determine which of these infotypes are taken into account. only the Entry data field (P0016-EINDT) is taken into account. You can take the following infotypes into account when you determine this date: .P0000 Actions . the corresponding date type can be given in the transfer parameter DATUMSART. use the search function in the Function Builder.  33 Document by:. The date type '01' is usually used for the technical entry date.Amar Chintam .Programming in Human Resource ______________________________________________________________________  With this function module.P0001 Organizational Assignment . In infotype P0016. For infotype P0041. If the step is successful.Message type (field TYPE). If an employee's data has been locked. 34 Document by:. access is denied. this structure contains the following information:. you must lock the personnel number.Message text (field MESSAGE). only the user who has locked the data can access the data records linked to the employee. If an error occurs.Amar Chintam . You can do this with the function module BAPI_EMPLOYEE_ENQUEUE. For this reason. You can do this with the function module BAPI_EMPLOYEE_DEQUEUE.Programming in Human Resource ______________________________________________________________________    Before you change employee data. For other users. Messages are returned in the parameter RETURN. you must remove the lock after the data has been changed. the structure is blank. COPY (copy). 35 Document by:. With the parameter DIALOG_MODE. If an error occurs (with an E or A message). The module returns the same error messages as in the online operation.Amar Chintam . You can specify one data record. The following values are amongst those available for the parameter OPERATION: MOD (change). The update is carried out by a 'Call dialog' to the module pool for the infotype. '1' The changes are generally processed in the background. you can maintain the employee and applicant master data. you specify whether the action is generally run in the background or whether it only runs in the background until an error occurs. Possible values:'0' The changes are generally processed in the background. INS (insert). the system switches to dialog mode so that the user can correct the entries. This means the error messages for the individual maintenance screens are displayed rather than interpreted.Programming in Human Resource ______________________________________________________________________    With this function module. All validations that would normally take place if the infotypes were maintained online with the individual maintenance screens are also carried out here. This means that some restrictions apply to the infotypes processed in that way (see documentation for module). DEL (delete). the complete step is terminated and the module returns the corresponding error message in the structure 'RETURN'. LIS9 (delimit). If an error occurs. '2' The changes are processed in the dialog mode. or whether the changes are generally carried out in the dialog mode. Programming in Human Resource ______________________________________________________________________     If you cannot use the function module HR_INFOTYPE_OPERATION. The field contents is changed from ‚DE' to ‚D'. The incorrect value 'D' in field PA0002-NATION then triggers an error message when the infotype record is changed or copied in dialog mode.  You can use the function module HR_READ_INFOTYPE to read the personal data in reports which do not use an HR logical database. In this example. the field P0002-NATIO (nationality) in DB table PA0002 is updated directly. you can use the UPDATE statement. The system field SY-DBCNT contains the number of changed records. Note that the system does not check the correctness of the new field contents when a direct DB update takes place. 36 Document by:. Authorization checks are not supported by the UPDATE statement and should be carried out on the program level. Their program codes are stored in a table or defined locally using the DEFINE keyword.  Many HR reports use macros.  The RP_PROVIDE_LAST macro writes the last valid record in the data selection period to the header line of the internal Infotype table.Amar Chintam . print:  Wage type  Wage type text  Amount  Start date  End date  Employees who have no recurring payments or deductions should not appear on the list. The list should contain the following information for each employee:  Personnel number  Name  Personnel area  Personnel subarea text In the following lines. to read the Personnel Suppose you need to create a report that will generate a list of the recurring payments and deductions for each employee.Amar Chintam . Use the keyword DESCRIBE to query the characteristics of this table. 37 Document by:. If employees do not have a record for infotype 0014.  Use the macro RP-READ-T001P Area/Personnel Subarea table. the internal table P0014 is empty at the GET PERNR event.Programming in Human Resource ______________________________________________________________________ Look Lookatatthe the example examplebelow below Specific Commands “Macros” At the end of this exercise. you will be able to:  Use the macro RP_PROVIDE_FROM_LAST to retrieve the last valid record in the data selection period. Amar Chintam .                                      PERFORM print USING                                                        p0014­lgart                                                  p0014­betrg                              38 Document by:. Assignment            0014.                                           p0001­werks.                                                     DESCRIBE TABLE p0014 LINES filled_lines.  DATA: filled_lines LIKE sy­index.                 SKIP 2.                                                 t001p­btext. The personnel area text is taken from field T001P-BTEXT. &  Deduc.Programming in Human Resource ______________________________________________________________________  To place the last infotype 0001 record valid in the data selection period in the header of internal table P0001.  Read the accompanying wage type texts for the wage types for infotype 0014 from table T512T. use the statement CHECK. Earn.  To read table T001P (Personnel Area/Subarea). The country indicator is part of the key for table T512T (Wage Type Texts).                                                       t512t.          rp­read­t001p p0001­werks p0001­btrtl space.                                                                                         *­­ Processing                                               GET pernr.                       "Organ. use the macro RP-READT001P. Restrict the length of the name to 20 characters. check that the table entry to be read is already in the workarea.                                          rp_provide_from_last p0001 space pn­begda pn­endda.                                                (20) p0001­ename.                         "Wage type text               t001p. REPORT zpsol040 .                         ”Plant section INFOTYPES: 0001.                     IF filled_lines GT 0. Before reading table T512T. The country indicator is assigned to each personnel area/subarea in the field T001P-MOLGA. To do this.                                                                                                     PROVIDE * FROM p0014 BETWEEN pn­begda AND pn­endda.                       "Recurr.     WRITE: / pernr­pernr.            CHECK p0014­betrg NE 0. use the macro RP_PROVIDE_FROM_LAST.                                           *­­ Declaration                                              TABLES: pernr.                                  ENDPROVIDE.                      WRITE: / wtype UNDER p0001­ename.                                                                                                    PERFORM re512t USING t001p­molga wtype.                                            ENDFORM.                                CHECK t512t­sprsl NE sy­langu                                   OR t512t­molga NE country_grouping                           OR t512t­lgart NE wtype.                                     T512T­LGTXT.                                                      begda.                                  SELECT SINGLE * FROM t512t                                               WHERE sprsl EQ sy­langu                        39 Document by:.Programming in Human Resource ______________________________________________________________________                     p0014­begda                                                  p0014­endda.                                                     *-------------------------------------------------------------* *       FORM RE512T                                          *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­*  *       Read Wage Type Texts                                 *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­*  FORM re512t USING value(country_grouping)                                      value(wtype).                                                     *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­* *       FORM PRINT                                           *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­* *       Print List                                           *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­* FORM print USING                                                        value(wtype)                                                 value(amount)                                                value(begda)                                                 value(endda).                                                       endda.                                                ENDIF.            amount.Amar Chintam .                                                      ENDFORM.                            IF sy­subrc NE 0.                                              CLEAR t512t.Programming in Human Resource ______________________________________________________________________               AND   molga EQ country_grouping                              AND   lgart EQ wtype.                                               ENDIF.Amar Chintam .   40 Document by:. 41 Document by:.Programming in Human Resource ______________________________________________________________________ Few things need to be known about INFOTYPE:    An Infotype has an entry in check table T777D.Amar Chintam . and several infotype-dependent elements in the Repository. and a dialog module.  If you follow these instructions. Creating and enhancing infotypes is discussed in more detail later in this unit.  Some Infotype-dependent settings must be made using Customizing for infotypes. take careful note of the following:  Some Infotype-dependent Infotype objects must be processed using the Data Dictionary. These functions have been created for this specific purpose.  Some Infotype elements must be processed using the Infotype copy functions within Personnel Planning and Personnel Administration. inconsistencies will not affect your Infotypedependent objects and table entries. When you create individual elements. each Infotype has a module pool containing the Infotype-specific entry and list screens with their validations. In addition to the structures and database tables discussed in unit 2 (Data Structures in HR). you should always determine whether the infotypes included in the standard system meet your requirements. which means creating the fields that you require in a cluster include.  You can create a new Infotype with the fields that you require.Programming in Human Resource ______________________________________________________________________   When working with infotypes. Other namespace conventions for standard infotypes:  Time Management infotypes are assigned to namespace 2000-2999  Recruitment infotypes are assigned to namespace 4000-4999 There are three different ways of storing customer-specific information in infotypes:   You can use the fields that already exist in standard infotypes. it is important to comply with the above namespace conventions. you can store the required information in a specific field of a standard infotype that you have not used before.  Before you enhance standard infotypes or create new infotypes.  You can enhance a standard Infotype. For example.Amar Chintam . 42 Document by:.  Example: You want to store the following item of information: “position entitled to company car”.Programming in Human Resource ______________________________________________________________________  Problem:   Procedure: Check all of the standard infotypes to determine whether one of the fields in a standard Infotype can be used to store this information.  You want to store specific information in the system.  Procedure: Use this Infotype to store your specific information.Amar Chintam . Situation: You find an Infotype that contains a suitable field.  Note: Information on specific fields is obtained from Infotype-specific structure Pnnnn (or from structure PSnnnn or HRInnnn). Use standard Infotype 1010 (Authorities/Resources). 43 Document by:. Programming in Human Resource ______________________________________________________________________ These are some of the most important HR Infotypes 0000 0001 0002 0003 0007 0008 0014 0015 0027 0041 0057 0165 0167 0168 0169 0170 0194 0195 0207 0208 0209 0210 0216 0221 0267 2005 2010 1000 Events Org assignment Personal info Payroll data Work time Basic pay Reoccurring pay 1 X pay Cost Center Event Dates Membership dues Over ride to limits on deductions Health Insurance Savings Spending Garnishment reduction Garnishment order Residence Tax Work Tax Unemployment Tax Withholding Garnishment adjustment Adjustment Off cycle OT Catts direct to cluster Infotypes 1000 – 1999 are PD Relationship infotypes 44 Document by:.Amar Chintam . manager. Equal number of positions should be created for each Job.One Position can be assigned to more than one person. Eg.Units. Following is a three level hierarchy. preferences and aspirations.Units. Object type 'C'. Transaction PP02 (Infotype 1001) 45 Document by:. Unit.Programming in Human Resource ______________________________________________________________________ PD ( Planning and Development) : You can use the Personnel Development component to maximize employees’ utility within your company.Amar Chintam . Jobs are linked to Positions. Use transaction PP02 to create Org. A company’s personnel development needs are determined by comparing current or future work requirements with employees’ qualifications.Units. Positions not assigned to employees are known as vacancies. HR Manager. Each Job identifies a unique classification of activity. Org. Table HRP1000. One Org.  Organizational Units: describe the different business areas within your company. Table HRP1000. Object type 'O'. customer service representative. Use transaction PP02 to create Org. Eg. Employees hold positions and not Jobs. Units must exist in a company organization structure and be linked to one another in order to create a hierarchical structure for your company and a link between the objects. Unit can be related to another Org. which are held by employees.  Jobs: A job is the general classification for a set of tasks. Position belongs to a Job which describes the Position. You can plan and implement specific personnel and training measures to promote the professional development of your employees. Each position is occupied by one employee. Table HRP1000 Manager HR Manager Accounting Manager Relationship between objects: Table HRP1001. Use transaction PP02 to create Org. the first employee may work 50% and the other will work the remainder 50%.  Positions: are specific jobs performed by individuals in a company. Eg. Object type 'S'. 46 Document by:.Programming in Human Resource ______________________________________________________________________  In the Dictionary. each HRPnnnn infotype table is defined using the following three include structures:  HRIKEY: contains the key fields of the infotype table  HRIADMIN: contains administrative information on the infotype record (including the date on which it was last changed.Amar Chintam . structure HRInnnn is also included by structure Pnnnn. and the user name of the person who made this last change)  HRInnnn: contains the infotype-specific fields with the actual infotype data or information  To ensure that transparent table HRPnnnn and logical structure Pnnnn always remain mutually consistent. qualification. An infotype’s subtypes can have different time constraints and form their own histories.  BEGDA: end date.  VARYF: variation field of the PLOG file (that contains the target object for relationships).  SUBTY: subtypes are subdivisions of infotypes. All objects and their defining infotypes have a status.  ISTAT: a one-digit key that stands for a planning status. non-mnemonic key that represents a single object (such as an organizational unit.  OTYPE: a one or two-character alphanumeric object key (such as ‘S’ for position. or business event).Amar Chintam .  PLVAR: a one or two-character alphanumeric plan version key that is used to make a distinction between different organizational plans. and ‘E’ for business event).  ENDDA: start date. This enables you to put objects and infotypes through a planning cycle. ‘Q’ for qualification.  OBJID: an eight-digit.Programming in Human Resource ______________________________________________________________________ The primary key of transparent table HRPnnnn consists of the following key fields:  MANDT: legally and organizationally independent participants in the system. 47 Document by:. Programming in Human Resource ______________________________________________________________________  SEQNR: the sequential number is used to make a distinction between infotype records that have the same key and time constraint '3' (any number of valid infotype data records at any one time). For the assignment. it contains the primary record and the table division of the table infotype. Report RHALTD00 uses a sequential dataset to create a batch input session. see table T77AD. Report RHMOVE00 transports Planning data records from the R/3 System to a sequential file. It is assigned by the system automatically.that is. Structure E1PADnn must be used for relationships with additional data of structure PADnn. This is the IDoc segment structure of the infotype. Structure E1Pnnn must be used for records of infotype Pnnnn. 48 Document by:. Structure E1Pnnnn is expanded for table infotypes .Amar Chintam . This sequential dataset can be displayed and edited using report RHMOVE40. you will be able to: Explain the functions and data structures of logical database PCH Create reports for sequential evalutions of the organizational structure Create reports for structural evalutions of the organizational structure Evaluate additional data on relationships Relationships are stored on the database in two directions. 49 Document by:.Amar Chintam .Programming in Human Resource ______________________________________________________________________ Reporting in PD using PCH Logical database: At the end of this chapter . secretary in the marketing department. twenty employees can have the job of secretary. More than one employee can have the same job. sales manager. such as secretary or head of department. For example. for example.Amar Chintam .Programming in Human Resource ______________________________________________________________________ "Job" is used as a general classification. A position is the assignment of an individual employee in your enterprise. You form the structure (organigram) of your enterprise by creating positions and linking them to each other. 50 Document by:. if you want to view the position hierarchy. The position Secretary belongs to the organizational unit Human Resources. 51 Document by:. A position belongs to an organizational unit. you must create a reporting structure by relating positions to each other. An organizational unit can incorporate one or more positions. However.Amar Chintam .Programming in Human Resource ______________________________________________________________________ Positions must be linked to an organizational unit.  Example: The organizational unit Personnel incorporates the positions Head of Department and Secretary. despite the fact that the data is redundant. 52 Document by:.Amar Chintam .Programming in Human Resource ______________________________________________________________________ If Organizational Management is integrated with master data. the holder relationship between position and person is also stored for the person in the Organizational Assignment infotype (0001). The Object Infotype (1000) defines an object's existence. An object is uniquely identified by its: .Amar Chintam .Plan variant. For example: A person is the holder of a position A position belongs to an organizational unit An organizational unit is assigned to a cost center in CO 53 Document by:.Programming in Human Resource ______________________________________________________________________ The Object infotype performs key functions. and determines the validity period of other infotypes that describe the characteristics of existing objects. Once you have used this infotype to create an object. such as organizational units and jobs.Object type . It enables you to create new objects. its characteristics can be described using other infotypes such as the Relationships Infotype (1001) and the Description Infotype (1002).Object identification Records stored in the Relationships Infotype (1001) serve as a descriptive and functional link between objects. You can use it to store a short text and a long text on the object. Each standard relationship has a three-digit code. This enables you to carry out reporting from either perspective.Amar Chintam . the system automatically creates its inverse relationship. then the position is described by the job. 54 Document by:. for example. When you assign a relationship. If a job describes a position. Relationships between objects are reciprocal.Programming in Human Resource ______________________________________________________________________ The relationships between basic object types are defined in the standard system and should not be changed. The customer namespace is from AAA to ZZZ. They can be displayed and created with report RHPLOGI0. The PADnn structure defines additional data for particular relationships. This object directory is the basis of all evaluations using logical database PCH. 55 Document by:.Amar Chintam . Transparent table PLOGI contains an index of all objects on the Personnel Planning database. The PTnnnn structure contains the table infotype data fields for some infotypes. Table infotypes are stored in the HRTnnnn tables. Additional data on relationships is stored in the HRPADnn tables.Programming in Human Resource ______________________________________________________________________ The Pnnnn structure contains an infotype's key fields and data fields. The transparent HRPnnnn tables contain the infotypes used in Personnel Planning. The infotypes from Personnel Administration can also be imported. 56 Document by:. internal table Pnnnn is filled per infotype with all available infotype records.Amar Chintam .Programming in Human Resource ______________________________________________________________________ For each selected object. This ensures that the structure parameters are shown on the standard selection screen. a sequential evaluation is performed.Programming in Human Resource ______________________________________________________________________ The only difference between a structural and sequential evaluation is the additional GDSTR entry in the TABLES statement.  Note: If you do not specify an evaluation path before starting the program.Amar Chintam . 57 Document by:. Programming in Human Resource ______________________________________________________________________ When the INITIALIZATION event occurs. The fields for the object ID are defined in include DBPCHSEL.Amar Chintam . you can set default values for the selection screen. This is an internal table (PCHOBJID) that must be filled with APPEND. 58 Document by:. See also Table Infotypes. These macros are defined in include DBPCHCOM. With this macro. For each selected object. object ID. The GDSTR structure contains information on the current hierarchy. 59 Document by:. In particular. the OBJEC structure contains the most important information from infotype 1000 (plan version. the STRUC structure contains internal structure information. Please note that you cannot use macros for logical databases PCH and PNP at the same time. The parameters for macro RH-GET-TBDAT are: Parameter 1 : Infotype Parameter 2 : Reference field Parameter 3 : Table for structure PTnnnn Macros for logical database PCH must not be confused with macros for logical database PNP. such as the root object and the number of objects within the hierarchy.Programming in Human Resource ______________________________________________________________________ For each selected object. and long text). RH-GET-TBDAT is a macro for logical database PCH.Amar Chintam . short text. it includes information on the relationship used by the system to select the current object along the evaluation path. object type. For each selected object. The value of the structure does not change unless the system reaches a new hierarchy root when a structural evaluation is performed for more than one root object. you can import the data for an infotype with a repetitive structure. internal table Pnnnn is filled per infotype with all available infotype records. The function module reads all of the infotype records for a specific infotype or (parameter INFTY = SPACE) all of the infotypes for the specified set of objects.Programming in Human Resource ______________________________________________________________________ Function module RH_READ_INFTY can be used to read Personnel Planning infotype records (function group RHDB) in programs without logical database PCH (module pools. 60 Document by:.Amar Chintam . Depending on the AUTHORITY and WITH_STRU_AUTH parameters. the function module performs an authorization check. reports of other logical databases). The staff position information is contained in infotype 1003 for the position. gdstr. Display this in one line. use subtype 1 from infotype 0006. For the telephone number. the field P1003-STABS has the value “X”. For the personal data (first name. Select administration infotypes using the logical database PCH. project to the First name. REPORT zhsol010.                                       INFOTYPES: 0002. For these infotypes. and the object name. In the following line. and Subtype fields. Last name. For holders of staff positions only.Amar Chintam . display the name and the telephone number.                                                                                            DATA: stabs LIKE p1003­stabs. If the position is flagged as a staff position. Process the records from infotypes 0006 and 0002 with a join. 0006.  Write a report that lists the staff positions in the organization structure along with the persons assigned to these positions. The object type O and the evaluation path should appear in the selection screen as default values. Understand the evaluation principle ‘search to depth’.                                                                                           61 Document by:. the object identifier. last name).Programming in Human Resource ______________________________________________________________________ Look Lookatatthe the example below example below Logical Database PCH – Exercise At the end of this exercise. Use the evaluation path O-S-P. 1003. use the infotype 0002 records for the person. you will be able to: Program a structural evaluation. display the object ID. Suppose you require an overview of the staff positions with the name of the employees holding these positions and their telephone numbers. Telephone number.                                     name  LIKE p0001­ename.                                            TABLES: objec.                                          WRITE: / name.                                         CLEAR stabs.                                         stabs = 'X'.                                                      IF objec­otype = 'P' AND stabs = 'X'.                                                    ENDPROVIDE.                                               ENDIF.                         PROVIDE vorna nachn FROM p0002                                      subty telnr FROM p0006                                      BETWEEN pc­begda and pc­endda                               WHERE p0006­subty = '1'.Programming in Human Resource ______________________________________________________________________ INITIALIZATION.                                         CONCATENATE p0002­vorna p0002­nachn INTO name               SEPARATED BY SPACE.Amar Chintam .                                                    IF objec­otype = 'S'.                                                WRITE : / objec­objid.  62 Document by:. objec­short.                                                    ENDLOOP.                                                     ENDIF.                                                  ENDIF.                                                                                                   GET objec.                                 SKIP. p0006­telnr.                              IF p0006_valid = 'X'.          ENDIF.                                                LOOP AT p1003 WHERE begda LE pc­endda                                       AND endda GE pc­begda.                                               pchotype = 'O'.                        IF p1003­stabs = 'X'.                                             pchwegid = 'O­S­P'. objec­stext. It also automatically calculates leave accruals.Amar Chintam . 63 Document by:. Payroll needs Time data to process: Hours worked Overtime Shift times Vacation Absence to be paid Time is also used for Internal reporting .tracking of time data for Labor Union requirement etc. External reporting . overtime. Time data is used to process Payroll. Labor union requires statistical data concerning the amount of overtime spent on certain shifts etc. shift premiums and bonuses. evaluation of time and absence data for payroll. leave management and reporting. For eg.Programming in Human Resource ______________________________________________________________________ Time Management SAP HR Time Management functionality includes time collection. internal & external reporting.by management to evaluate and project costs. reporting etc. 64 Document by:. All the absence's and attendance in a day are uploaded into SAP and analysed using the pre-defined times in the employees Work Schedule rule. Punch cards. Manual time sheets that stores hours worked for each day alongwith any absenses. After processing the time events. Time data is recorded in various ways. the system generates wage types and time types based on pre-defined rules within the time evaluation program. eg.Programming in Human Resource ______________________________________________________________________ Time data is stored in various infotypes. These wage types and time types are then used for Interfacing to payroll. This data is evaluated according to various rules during time evalution and the processed data is transferred to payroll. Time data is generally collected by a third party recording terminal.Amar Chintam . The period work schedule is applied to the calendar. planned working time is used as the basis for time evaluation. You assign a work schedule to an employee in the Planned Working Time infotype (0007) using work schedule rules.Programming in Human Resource ______________________________________________________________________ The employee work schedule is an integral part of R/3 Time Management containing the planned specifications for employee working time. The daily work schedule contains information on a day’s working time including breaks. Examples: The work schedule shows how many hours salaried employees must work to be entitled to their full salary. The period work schedule comprises a set sequence of daily work schedules. The work schedule is generated from a period work schedule and a public holiday calendar. Depending on the specifications defined for the individual employee. The work schedule rule encompasses all the specifications required to define the work schedule. The work schedule is used as the basis for time data evaluation.Amar Chintam . The sequence can reflect regular and variable working times. 65 Document by:. any additional hours worked are identified as overtime in R/3 Time Evaluation. taking into account specifications in the public holiday calendar. An employee’s planned working time is represented in a work schedule. If you only record deviations to the work schedule. You assign a public holiday calendar to a personnel subarea. You can change existing and define new public holidays in the public holiday list. Public holidays are taken into account when determining bonuses or calculating leave. for example. 66 Document by:. In addition.Amar Chintam . you can change existing or define new public holiday calendars.Programming in Human Resource ______________________________________________________________________ The standard R/3 System already contains public holiday calendars that include regional public holidays. Amar Chintam . such as R/3 Payroll Accounting or R/3 Personnel Planning and Development. determining whether the employee‘s time data is processed in R/3 Time Evaluation or in R/3 Payroll Accounting. there are certain infotype records that you must create for every employee. Time Recording Info (0050): This infotype is used in R/3 Time Evaluation. The following master data infotypes are required for Time Management: Organizational Assignment (0001) Personal Data (0002) Planned Working Time (0007): You must have entered the appropriate Time Management status.Programming in Human Resource ______________________________________________________________________      In R/3 Time Management. Time management data is stored in the same master data records used by other HR areas. 67 Document by:. Employees leave entitlement is managed in the Absence Quotas infotype (2006). It can contain interface data on the subsystem and additional data on the employee that is relevant for time evaluation. The infotype contains information on the origin of the record (whether it was recorded manually or by a subsystem) and on the terminal ID. different pay scale group. and so on) or a different cost center. The infotype can also store information on a different payment (premium. The information can either be entered manually or by a time recording system.Programming in Human Resource ______________________________________________________________________ If an employee records his or her actual times at a time recording system. you can view the recorded time events in the Time Events infotype (2011). You can use list entry to enter several time events for one personnel number at the same time. You can use the Time Events infotype (2011) to enter or correct time events that were not uploaded or that were incorrectly uploaded to the SAP R/3 System. for instance.Amar Chintam . 68 Document by:. or for particular past evaluation periods. overnight. and is started using a batch job. This function is particularly useful for test purposes.Amar Chintam . It evaluates employees' time data that has been recorded either at the time recording terminals or in the time management infotypes. for example. The time evaluation report can also be run for future periods. 69 Document by:. It is normally used for large groups of employees. You can also run time evaluation for individual employees or groups of employees.Programming in Human Resource ______________________________________________________________________ Time evaluation is performed by the time evaluation driver RPTIME00. for example. Time evaluation generally runs once daily.  You want to evaluate planned times in shift planning while taking anticipated overtime income into account. A future evaluation can be useful in the following situations:  You want time evaluation to determine an employee’s anticiapted absence entitlements when absence quotas are built up automatically. especially if a front-end time recording system is connected to your HR system. LOOP AT P2001. When you enter an absence record. new partial periods are created without any changes being made to infotype data. Infotypes are declared with the INFOTYPE statement. 70 Document by:. since this data depends on the validity period. several special features must be taken into account when processing time data. In master data. if. This would lead to incorrect results in time infotypes. ENDLOOP. The leave record is then delimited on the first day of the sickness. a leave record extends from the middle of January to the middle of February and 20 days of leave are calculated for this period. INFOTYPES: 2001 MODE N. For example. Let us assume that an employee becomes sick during vacation. the time constraint is a definite feature of the infotype or subtype. The time data in these infotypes stored in tables PA2000 to PA2999. An ABAP/4 macro reads the time data. You should not load all time infotype records from the lowest to highest system dates into the main memory. WRITE: / P2001-ABWTG. then a view for the month of February would result in a leave record which extends from the beginning to the middle of February.Programming in Human Resource ______________________________________________________________________ Reading Data Infotypes 2000 to 2999 are time infotypes. Use the infotype declaration supplement MODE N to define that the internal time infotype tables should be declared but not filled at the GET PERNR time point. This would quickly lead to a memory overload.Amar Chintam . There are no time dependencies between infotypes and subtypes. the number of days of absence is calculated on the basis of the absence period. In time infotypes. In a view. This macro uses the data selection period parameter of the selection screen. Time data is basically different. and the sickness record follows. Use the following report to read time data: REPORT RPABAP05. and data is made available for processing in the internal infotype tables (infotype 2011 is an exception). GET PERNR. Later you can fill these tables using a statement with selection period parameters. Due to the time constraint of infotypes. The number of days of leave would not have changed and the information would be incorrect. RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA. data is determined on the basis of the validity period. This is why time data should be read only for a specific period. TABLES: PERNR. Views of time data are generally not practical. you should not use joins and projections for time data.Programming in Human Resource ______________________________________________________________________ Likewise. · The validity periods of different types of time data are not always the same as the date selection period specified in the selection screen. The same also applies to overtime during a sickness. the infotype begin and end dates to the data selection period. certain time infotype records have specific clock-in/clock out times. If P0021-XYZ = ' '. · Dependence of time data on validity period · Importing time data · Processing time data using internal tables Time Data and Validity Period · Time data always applies to a specific validity period. The time dependency of time infotype records is not limited only to dependencies between records of one and the same infotype. GET PERNR. Endif. A=B. The time constraint of time infotypes is not an attribute but is defined by the relationships between infotypes. RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA. Several records may therefore exist for one infotype on a particular day. add MODE N to the infotype declaration. · Use macro RP-READ-ALL-TIME-ITY to fill infotype table.Amar Chintam . Date selection period |---------------| Leave |-------------| · PROVIDE in this case is therefore not used for time infotypes. Since views require explicit data and this prerequisite is not fulfilled by time infotypes. LOOP AT P0021. · To prevent memory overload. Moreover. Time infotype tables are processed with the LOOP statement since the PROVIDE statement limits. but covers all infotypes and subtypes. 71 Document by:. the system prohibits the entry of a leave record that coincides with a sickness record. not only those within the date selection period. Processing 'Time Data'. Importing Time Data · GET PERNR reads all time infotypes from the lowest to highest system data. This prevents the logical database from importing all data into infotype tables at GET PERNR. and thus changes. ENDLOOP. INFOTYPES: 2001 MODE N. "ABS./ATTEND.) ENDLOOP. DATA: BEGIN OF ITAB OCCURS 0.Amar Chintam . you can use an internal table to process the interested data. CLEAR ITAB. ITAB-AWART = P2001-AWART. TYPE ASWTG LIKE P2001-ASWTG. "ABS./ATTEND.Programming in Human Resource ______________________________________________________________________ Processing Time Data · Once data is imported into infotype tables. RP-PROVIDE-FROM-LAST P0001 SAPCE PN-BEGDA PN-ENDDA. LOOP AT P2001. 72 Document by:. "PERSONNEL AREA AWART LIKE P2001-AWART. RP-READ-ALL-TIME-ITY PN/BEGDA PN/ENDDA. ITAB-BUKRS = P0001-BURKS. ITAB-ASWTG = P2001-ASWTG. DAYS END OF ITAB. GET PERNR. ITAB-WERKS = P0001-WERKS. (OR: APPEND ITAB. "COMPANY WERKS LIKE P0001-WERKS. BUKRS LIKE P0001-BUKRS. COLLECT ITAB. IMPORT TO DATABASE and DELETE FROM DATABASE are used to process data in the cluster tables.Programming in Human Resource ______________________________________________________________________ Cluster Tables and Payroll : Cluster tables combine the data from several tables with identical (or almost identical) keys into one physical record on the database. travel expense and payroll).Documents.Amar Chintam . Each HR subarea has its own cluster.Applicant tracking data. PCL3 . Cluster tables are defined in the data dictionary as transparent tables.g RU for US payroll result.Accounting Results (time. Data Clusters are identified by a two-character code.. B2 for time evaluation result.. Retrieval of data is very fast if the primary key is known. Each subarea has its own key. Special language elements EXPORT TO DATABASE. PCL2 . e. Database Table PCL1 The database table PCL1 contains the following data areas: B1 time events/PDC G1 group incentive wages L1 individual incentive wages PC personal calendar TE travel expenses/payroll results TS travel expenses/master data TX infotype texts ZI PDC interface -> cost account Database Table PCL2 The database table PCL2 contains the following data areas: B2 time accounting results CD cluster directory of the CD manager PS generated schemas 73 Document by:. PCL4 . Data is written to a database in compressed form. PCL1 . Payroll year-end Tax data Database Tables PCLn PCLn database tables are divided into subareas known as data clusters.Database for HR work area. External programs can NOT interpret the data in a cluster table. They are defined as INCLUDE programs (RPCnxxy0). A unique key has to be used when reading data from or writing data to the PCLn.B2. The following naming convention applies: n = 1 or 2 (PCL1 or PCL2) xx = Relation ID (e. Field Name KEY Length Text MANDT X 3 Client RELID X 2 Relation ID (RU.g.Programming in Human Resource ______________________________________________________________________ PT texts for generated schemas RX payroll accounting results/international Rn payroll accounting results/country-specific ( n = HR country indicator ) ZL personal work schedule Database Table PCL3 The database table PCL3 contains the following data areas: AP action log / time schedule TY texts for applicant data infotypes Data Management of PCLn The ABAP commands IMPORT and EXPORT are used for management of read/write to database tables PCLn.Amar Chintam .. key Cluster Definition The data definition of a work area for PCLn is specified in separate programs which comply with fixed naming conventions. RX) y = 0 for international clusters or country indicator (T500L) for different country cluster 74 Document by:.) SRTFD X 40 Work Area Key SRTF2 X 4 Sort key for dup. Payroll Calendar . Wage types . Payroll components include:           Payroll area . eg.salary payment. eg.401K deduction. Eg.used for segregation of employees payscales based on the type of union contracts in a company. Payroll function does the following: Compute employees gross salary Make necessary deductions Calculate Net salary Generate Checks or direct deposits.for monthly pay periods. regular and off-cycle payroll processing. compensation programs.Subdivision of employees payscales. Holidays. 75 Document by:. 10 California.Differentiates payscales based on geographical area. GR02 .groups employees based on the frequency of their paydates. 10 . GR01 . Eg. net-to-gross. SAP's complex Payroll process handles everything including vacation policies. Date Modifier .grouping for junior clerks. Control Record . Eg. create and maintain data anytime. B001 . Eg.The payments and deductions for an employee are coded as wage types.It determines the current payroll period for a payroll area.level 1 clerk. anywhere. Period Modifier . benefits and purchasing departments.for senior clerks. Payscale area . Z1 for salaried staff paid monthly.for monthly pay period but with the pay date being 5th of every month. work schedules. Eg. overtime pay etc. quaterly or yearly sum totals. via Web-based technology and interactive voice response functionality. Payscale type .Distinguishes periods with same frequency but different date. SAP Payroll delivers powerful and efficient gross-to-net. payroll. ESS is an effective means for providing real-time access and data maintenance capabilities to the source or owner of the data.Differentiates employees payscales based on functionality.collective agreement for secretaries contract. Eg.Amar Chintam . Payscale level . 10 .Generating calendars for cumulating wage types to get monthly. L1 . SAP's ESS (Employee Self Service) function allows employees to view. Payscale group . A001 . It has the ability to offload much of the data entry and related customer service activities that may be typically performed in an organization's human resources.non union workers 20 . 10 .Programming in Human Resource ______________________________________________________________________ Payroll is used to calculate the remuneration for work done for each employee.Period in which payroll accounting is carried out. L2 level 2 clerk. Payroll accounting calculates the payment of work done by an employee. 0210. benefits data. 0001. These infotypes maintain personal details. Payroll Process involves:       Maintaining payroll related infotypes Periodic payroll run Transferring data to FI/CO Transferring third party remittance data to Accounts Payable Tax reporting Standard reporting Payroll program name: RPCALCx0 76 Document by:. which includes. payment and deduction info. 0007.Programming in Human Resource ______________________________________________________________________ Payroll Infotypes: Payroll data is stored in various infotypes. 0009. tax data. 0234. 0207. 0209. garnishment data.Amar Chintam . 0208. 0008. etc. payroll accounting comprises a number of work processes including the generation of payroll results and remuneration statements. More specifically.Amar Chintam .Programming in Human Resource ______________________________________________________________________ Broadly speaking. Payroll accounting also includes a number of subsequent activities:  transfer of payroll results to Accounting  various evaluations. payroll accounting is the calculation of payment for work performed by each employee. 77 Document by:. however.  etc. such as evaluating the payroll account. bank transfers and check payments. The employee is usually paid by bank transfer or check and the payment amount is printed in a form for the employee. which are calculated for an employee during a payroll period.Programming in Human Resource ______________________________________________________________________ The calculation of payment comprises two main steps:  Calculation of remuneration elements  Statutory and voluntary deductions (country-specific) Both the remuneration elements and the statutory and voluntary deductions consist of individual payments and deductions. These payments and deductions are included in the payment calculation by means of different wage types.Amar Chintam . 78 Document by:. Payments such as basic pay. company-sponsored day care or similar benefits. the philosophy of the company. 79 Document by:. Deductions can be made for items such as a company-owned flat. Different factors determine whether such benefits increase or reduce the taxable income. This is determined by country-specific regulations and.Amar Chintam .Programming in Human Resource ______________________________________________________________________ The remuneration elements for an employee are formed from individual wage and salary types that are used during a payroll period. An employee's remuneration consists of all wage types calculated for him or her during a payroll period. in some countries. various bonuses and gratuities are included in the remuneration calculation. Amar Chintam . total gross amount. and these totals are be used for subsequent processing. The Payroll Run steps 80 Document by:.Programming in Human Resource ______________________________________________________________________ Voluntary and statutory deductions. such as tax and social insurance contributions. Different gross values. for example. and gross tax amount. are taken from the gross calculation to determine the payment amount. For this reason. different totals are formed during the payroll run. are used to calculate the deductions. The payroll area serves two functions. Employees for whom payroll is performed at the same time and for the same payroll period are assigned to the same payroll area.Amar Chintam . 81 Document by:.Programming in Human Resource ______________________________________________________________________ The payroll program is usually run separately for different employee groups. both of which are prerequisites for running the payroll. A typical example is that of salaried employees and hourly employees. Personnel numbers are assigned to a payroll area in the Organizational Assignment infotype (0001). The payroll area determines when payroll is run. for whom payroll is performed using two different payroll periods. The payroll area groups together personnel numbers that must be processed in the same payroll run The payroll area determines the payroll period. In a live run. The current payroll period is. the payroll period is determined by the system.Programming in Human Resource ______________________________________________________________________ The personnel numbers to be included in the payroll run are selected by specifying a payroll area in the payroll driver selection screen. plus one.Amar Chintam . The last period to be included in a payroll run is stored in the payroll control record for each payroll area. The payroll period is transferred directly from the payroll control record to the payroll program. Hint: Payroll driver should be started by Personnel Number or Payroll Area only. 82 Document by:. therefore. the last period to be included in a payroll run. the field RELID contains the cluster name RX and the field SRTFD contains the eight-digit personnel number as well as a five-digit sequence number for each individual payroll result for a payroll period. To enable the import of a record from a PCLn database table. The fields CLIENT and SRTF2 are filled by the system. In the international payroll results.Programming in Human Resource ______________________________________________________________________ The structure of PCLn database tables provides a basic structure for individual subareas. The name of each subarea must include a two-character cluster name or relation ID. 40 bytes are available in field SRTFD for this purpose. the RELID field must contain the cluster identifier and the SRTFD field must contain the cluster key.Amar Chintam .   83 Document by:. A key structure must also be defined. for example. and retrieved from the buffer by the report.Programming in Human Resource ______________________________________________________________________ If data is imported using macros.Amar Chintam . Instead. the buffer directory is checked to determine whether the main memory already contains a record with the same key. where xy = cluster name. the system checks the cluster authorization. If data is read using a buffer. the record is read from PCLn to the buffer. 84 Document by:. If this is not the case. The standard import programs follow the RPCLSTxy naming convention. the data records are not read directly from table PCLn. Each payroll result has a status indicator:  A = Current result  P = Previous result  O = All other results 85 Document by:. Green: Results exist Red: No results exist Gray: No authorization for displaying personnel numbers Payroll results are stored as structures and internal tables on the database. The indicator behind each name shows whether results exist in the selected period.Programming in Human Resource ______________________________________________________________________ With this report.Amar Chintam . you can display the payroll results for any country. replaces reports RPCLSTxy and HxyCLSTR.Programming in Human Resource ______________________________________________________________________ The payroll driver. for example. lists the formatted result as a payroll form (n = HR country indicator from table T500L). In many cases. Report RPCEDTn0. 86 Document by:. The report is used in all country versions and the overview of payroll results is automatically displayed according to the particular country. Report H99_DISPLAY_PAYRESULT displays the payroll results for PCL2 and. the function is enhanced by rules for specific control of the subroutines. The payroll result generated by the payroll driver is stored in cluster xy of the database table PCL2. RPCALCn0. from Release 4. uses HR data (stored in the database tables PAnnnn) and the last payroll result (stored in the database table PCL2) to run the payroll for the specified period The program (payroll driver) imports the processing logic in the form of a schema.Amar Chintam . The schema contains functions that call the subroutines contained in the payroll driver.6C. Wage type text .For-payroll area 3rd line: . Write a report to import the results of international payroll to cluster RX and then display them. The report should evaluate the last payroll result for the for-period. Process the cluster directory with CD_READ_LAST.Amount 87 Document by:.Programming in Human Resource ______________________________________________________________________ Look Lookatatthe the example below example below Exporting/Importing DB Tables in HR “Displaying the Last Payroll Result” At the end of this exercise. Display the wage types from the results table RT. The created list should contain the following information for each employee: 1st line: . Suppose you need a report with a list of wage types from the results table for the current (last) payroll result in a for-period.For-period . you will be able to: Read the cluster directory with CU_READ_RGDIR. Read the payroll result with PYXX_READ_PAYROLL_RESULT.In-payroll area 4th line: .Name .Wage type .In-period .Personnel area 2nd line: . Test your program using the personnel number assigned by your trainer.Personnel number .Amar Chintam . First use function module CU_READ_RGDIR to read table RGDIR from cluster CU. The text belonging to the wage types can be found in table T512T. The information on the period and payroll area can be found in the fields for the field string VERSC. REPORT zpsol080. transfer table RGDIR to function module CD_READ_LAST.Programming in Human Resource ______________________________________________________________________ Take the name of the employee from the field P0001-ENAME. To determin the spequential number for the last payroll result. Then read the payroll result for the sequential number you have determined using the function module PYXX_READ_PAYROLL_RESULT.                                                       t512t.                              DATA: rt_header TYPE LINE OF hrpay99_rt. "Organizational Assignment *Table data containing directory to PCL2 payroll results  file  DATA: BEGIN OF rgdir OCCURS 100.                      "Wage type texts         INFOTYPES: 0001.                                             TABLES: pernr.                             DATA: END OF rgdir. The wage types and amounts are saved in table RT.                                     INCLUDE STRUCTURE pc261. "Number of last payroll  result GET pernr. Only display the first 15 characters of the employee name.                                    number  LIKE pc261­seqnr.                                                                                                       DATA: result TYPE pay99_result.                                                                       CALL FUNCTION 'CU_READ_RGDIR'        EXPORTING                                                    persnr          = p0001­pernr                           IMPORTING             molga           = country                               TABLES             in_rgdir        = rgdir                                 EXCEPTIONS 88 Document by:.                                                     rp_provide_from_last p0001 space pn­begda pn­endda.Amar Chintam . which is a structure in cluster RX.                                                                                                                                               DATA: country LIKE t001p­molga.   ELSE.                                                                                                                  CALL FUNCTION 'CD_READ_LAST'                                   EXPORTING                                                    begin_date      = pn­begda                                   end_date        = pn­endda                              IMPORTING             out_seqnr       = number                                TABLES             rgdir           = rgdir                                 EXCEPTIONS             no_record_found = 1                                          OTHERS                   = 2.                                               WRITE: / 'No payroll result found for'(002).Programming in Human Resource ______________________________________________________________________             no_record_found = 1                                          OTHERS                   = 2.                                                          CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'                       EXPORTING                                                      clusterid                    = 'RX'                          employeenumber               = p0001­pernr                   sequencenumber               = number          *         READ_ONLY_BUFFER             = ' '              *         READ_ONLY_INTERNATIONAL      = ' '              *         CHECK_READ_AUTHORITY         = 'X'              *    IMPORTING                                               *         VERSION_NUMBER_PAYVN         =                     *         VERSION_NUMBER_PCL2          =                              CHANGING                                                       payroll_result               = result                   EXCEPTIONS               illegal_isocode_or_clusterid = 1                             error_generating_import      = 2                             import_mismatch_error        = 3                             subpool_dir_full             = 4                             no_read_authority            = 5                             no_record_found = 6                                          versions_do_not_match        = 7               89 Document by:.      ENDIF. pn­paper.                                                                                   IF sy­subrc = 1. pernr­pernr.Amar Chintam .                                               WRITE: / 'No records found for '(001).                                                                                   IF sy­subrc = 1.                                                  p0001­ename(15).                      IF sy­subrc = 0.                                          ELSE.                                                          WRITE: / 'Result could not be read (003).                                                     *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­* *       FORM PRINT_RX                                        * *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­* *       Print Payroll Result                                 * *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­* FORM print_rx.                                                 p0001­btrtl.                            result­inter­versc­inper+0(4).                          SKIP 1.                         30 result­inter­versc­fpper+4(2).                                             p0001­werks.                               SKIP 1.        ENDIF.            30 result­inter­versc­inper+4(2).                                                 FORMAT INTENSIFIED ON.                               result­inter­versc­abkrs. 90 Document by:.   WRITE: / 'For period/payroll area: '(004).                                               PERFORM print_rx.                                      SKIP 1.Programming in Human Resource ______________________________________________________________________               OTHERS                   = 8.Amar Chintam .                               result­inter­versc­iabkrs.                            result­inter­versc­fpper+0(4).   WRITE: 'Results table: '(006).                                        FORMAT INTENSIFIED OFF.                                                     ENDIF.                                    / 'In­period/payroll area: '(005).                                       WRITE: / p0001­pernr.                                                ENDIF.                        WRITE: / rt_header­lgart.              rt_header­betrg CURRENCY rt_header­amt_curr.                            IF sy­subrc NE 0.                                CHECK t512t­sprsl NE sy­langu                                   OR t512t­molga NE country_grouping                           OR t512t­lgart NE wtype.                                                   ENDFORM.                                  *END*                             ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ User Exits Enhancement PBAS0001 has two function exits.Amar Chintam .                                                     ENDFORM.                                  SELECT SINGLE * FROM t512t                                               WHERE sprsl EQ sy­langu                                      AND   molga EQ country_grouping                              AND   lgart EQ wtype.                                                     *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­* *       FORM RE512T                                          * *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­* *       Read Wage Type Texts                                 *­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ ­* FORM re512t USING value(country_grouping)                                      value(wtype).                                             T512T­LGTXT.Programming in Human Resource ______________________________________________________________________   LOOP AT result­inter­rt INTO rt_header.      ENDLOOP.                        PERFORM re512t USING result­inter­versc­molga                                     rt_header­lgart.                                              CLEAR t512t. 91 Document by:. You will be *taken to the function module exit. tfdir. SELECTION­SCREEN BEGIN OF BLOCK selection                              WITH FRAME TITLE text­z80. TABLES : tstc. PARAMETERS : p_tcode LIKE tstc­tcode OBLIGATORY. *(This program when executed will give you all the user exit  *associated *with the Tcode.   MOVE : tadir­devclass TO v_devclass. SELECTION­SCREEN END OF BLOCK selection. SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode. IF sy­subrc EQ 0. DATA : v_devclass LIKE tadir­devclass. User exit name : ZXPADU01 Function exit EXIT_SAPF50M_002 allows an additional customer-specific check to be performed after data has been entered in a single screen and the fields have been validated. 92 Document by:. Click on the exit you will be taken to the SMODE. modact. TABLES : tstct. User Exit name: ZXPADU02 REPORT zuexit_amar_ar . *Select the components radio button and click on display.   IF sy­subrc NE 0. trdir. Clicking on the function exit you *will be taken to the actual function module which has the include in *it where you need to  put the extra code). tadir. DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.   SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'                    AND object = 'PROG'                    AND obj_name = tstc­pgmna. DATA : field1(30).Amar Chintam .Programming in Human Resource ______________________________________________________________________ Function exit EXIT_SAPFP50M_001 allows customer-specific defaults to be entered in a single screen when infotypes are created or copied. modsapt. enlfdir.   SELECT SINGLE * FROM tstct WHERE sprsl EQ sy­langu AND                                    tcode EQ p_tcode.   SKIP.     WRITE:/(95) sy­uline.     WRITE:/1 sy­vline.   FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.       SELECT SINGLE * FROM tfdir WHERE pname = tstc­pgmna.     LOOP AT jtab.Programming in Human Resource ______________________________________________________________________     SELECT SINGLE * FROM trdir WHERE name = tstc­pgmna.   ENDIF.           95 sy­vline.        45(50) tstct­ttext.     ENDIF.            2 'Exit Name'.     IF trdir­subc EQ 'F'.       SELECT SINGLE * FROM enlfdir WHERE funcname =       tfdir­funcname.           22 'Description'.     WRITE:/(95) sy­uline. 93 Document by:.       MOVE : tadir­devclass TO v_devclass.   WRITE:/(19) 'Transaction Code ­ '.       SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'                          AND object = 'FUGR'                          AND obj_name EQ enlfdir­area.Amar Chintam .     FORMAT COLOR COL_HEADING INTENSIFIED ON.       SELECT SINGLE * FROM modsapt              WHERE sprsl = sy­langu AND                     name = jtab­obj_name.       WRITE:/1 sy­vline.        20(20) p_tcode.       FORMAT COLOR COL_NORMAL INTENSIFIED OFF.   IF NOT jtab[] IS INITIAL.           21 sy­vline .   SELECT * FROM tadir INTO TABLE jtab                 WHERE pgmid = 'R3TR'                   AND object = 'SMOD'                   AND devclass = v_devclass.              2 jtab­obj_name HOTSPOT ON. ENDIF.     ENDLOOP.   SET PARAMETER ID 'MON' FIELD sy­lisel+1(10).     DESCRIBE TABLE jtab.   FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.   ELSE. ELSE.   WRITE:/(95) 'Transaction Code Does Not Exist'.     SKIP.     WRITE:/(95) sy­uline.Programming in Human Resource ______________________________________________________________________             21 sy­vline .     WRITE:/ 'No of Exits:' . AT LINE­SELECTION.   CHECK field1(4) EQ 'JTAB'.Amar Chintam .   CALL TRANSACTION 'SMOD' AND SKIP FIRST   SCREEN.   ENDIF.             22 modsapt­modtext.     FORMAT COLOR COL_NEGATIVE INTENSIFIED ON. sy­tfill.   GET CURSOR FIELD field1.     FORMAT COLOR COL_TOTAL INTENSIFIED ON.     WRITE:/(95) 'No User Exit exists'. 94 Document by:.             95 sy­vline. Programming in Human Resource ______________________________________________________________________ HR Transactions Master Data PA10 Personnel File PA20 Display HR Master Data PA30 Maintain HR Master Data PA40 Personnel Events PA41 Change Hiring Data PA42 Fast Data Entry for Events PRMD Maintain HR Master Data PRMF Travel Expenses: Feature TRVFD PRML Set Country Grouping via Popup PRMM Personnel Events PRMO Travel Expenses: Feature TRVCO PRMP Travel Expenses: Feature TRVPA PRMS Display HR Master Data PRMT Update Matchcode PSO3 Infotype overview PSO4 Individual maintenance of infotypes Time PA51 PA53 PA61 PA62 PA63 PA64 PA70 PA71 PBAB PT01 PT02 PT03 Management Display Time Data Display Time Data Maintain Time Data List Entry of Additional Data Maintain Time Data Calendar Entry Fast Data Entry Fast Entry of Time Data Maintain vacancy assignments Create Work Schedule Change Work Schedule Display Work Schedules Payroll PC00 Run Payroll PC10 Payroll menu USA PE00 Starts Transactions PE01.PE03 PE01 Schemas PE02 Calculation Rules PE03 Features PE04 Create functions and operations PE51 HR form editor PRCA Payroll calendar PRCT Current Settings PRCU Printing Checks USA PRD1 Create DME SM31 Maintain Tables SM12 Locked Secessions TSTC Table lookup 95 Document by:.Amar Chintam .PE02. Forms PA92 Benefits Tables .Programming in Human Resource ______________________________________________________________________ SPR0 IMG SE16 Data Browser (Table reports) PP03 PD Tables PP0M Change Org Unit P013 Maintain Positions PO03 Maintain Jobs Benefits PA85 Benefits .Call RPLBEN11 PA86 Benefits .Call RPLBEN09 96 Document by:. .Call RPLBEN07 PA87 Benefits .Call RPLBEN11 PA86 Benefits .Display PA94 Benefits .PE03 PE01 Schemas PE02 Calculation Rules PE03 Features PE04 Create functions and operations PE51 HR form editor PRCA Payroll calendar PRCT Current Settings PRCU Printing Checks USA PRD1 Create DME SM31 Maintain Tables SM12 Locked Secessions TSTC Table lookup SPR0 IMG SE16 Data Browser (Table reports) PP03 PD Tables PP0M Change Org Unit P013 Maintain Positions PO03 Maintain Jobs Benefits PA85 Benefits .Jump to Views PA96 Benefits reporting PA97 Salary Administration .Amar Chintam .rel.PE02. interface Payroll PC00 Run Payroll PC10 Payroll menu USA PE00 Starts Transactions PE01.Call RPLBEN09 PA89 COBRA Administration PA90 Benefits Enrollment – Individual PA91 Benefits .Access Reporting Tree PA95 Benefits IMG .Matrix PA98 Salary Administration PA99 Compensation Admin.changes PACP HR-CH: Pension fund.Call RPLBEN07 PA87 Benefits .Maintain PA93 Benefits Tables . rel.Jump to Views Benefits reporting Salary Administration .Create custom infotypes PRF0 Standard Form PSVT Dynamic Tools Menu PAR1 Flexible employee data PAR2 Employee list PD .changes HR-CH: Pension fund.Display Benefits .Programming in Human Resource ______________________________________________________________________ PA89 PA90 PA91 PA92 PA93 PA94 PA95 PA96 PA97 PA98 PA99 PACP COBRA Administration Benefits Enrollment – Individual Benefits . .Maintain Benefits Tables .Organizational Management PP0M Change Org Unit PO03 Maintain Jobs PO13 Maintain Position PO10 Maintain Organizational Unit PP01 Maintain Plan Data (menu-guided) PP02 Maintain Plan Data (Open) PP03 Maintain Plan Data (event-guided) PP05 Number Ranges PP06 Number Range Maintenance: HRADATA PP07 Tasks/Descriptions PP69 Choose Text for Organizational Unit PP90 Set Up Organization PPO1 Change Cost Center Assignment PPO2 Display Cost Center Assignment PPO3 Change Reporting Structure PPO4 Display Reporting Structure PPO5 Change Object Indicators (O/S) PPO6 Change Object Indicators O/S PPOA Display Menu Interface (with dyn.Matrix Salary Administration Compensation Admin. interface General/Reporting PM00 Menu for HR Reports PM01 Dialogs in HR .Forms Benefits Tables .Access Reporting Tree Benefits IMG .) PPOC Create Organizational Unit PPOM Maintain Organizational Plan PPOS Display Organizational Plan PQ01 Events for Work Center PQ02 Events for Training Program PQ03 Events for Job PQ04 Events for Business Event Type PQ06 Location Events PQ07 Resource Events PQ08 Events for External Person 97 Document by:.Amar Chintam . also shows who changed it last and when Displays PCRs full source text Time Management RPTQTA10 RPTQTA00 Display Leave Quotas Bulk Leave Quotas Update Transfer of Remaining Leave from Infotype 0005 to Infotype RPTLEACONV 2006 98 Document by:.Amar Chintam .Programming in Human Resource ______________________________________________________________________ PQ09 PQ10 PQ11 PQ12 PQ13 PQ14 PQ15 PSO5 PSOA PSOC PSOG PSOI PSOO PSOS PSOT Events for Business Event Group Events for Organizational Unit Events for Qualification Resource Type Events Events for Position Events for Task Events for Company PD: Administration Tools Work Center Reporting Job Reporting OrgManagement General Reporting Tools Integration PA-PD Organizational Unit Reporting Position Reporting Task Reporting Recruitment PB10 Init.entry of applicant master data PB20 Display applicant master data PB30 Maintain applicant master data PB40 Applicant events PB50 Display applicant actions PB60 Maintain applicant actions PB80 Evaluate vacancies PBA0 Evaluate advertisements PBA1 Applicant index PBA2 List of applications PBA3 Applicant vacancy assignment list PBA4 Receipt of application Useful programs for Schemas and PCRs RPUCTF00 RPUCTI00 RPUCTJ00 RPUCCOSE RPUCTX00 RPUSCD10 RPUCTC00 Change Attributes for Schemas and PCRs (change owner) Lists Subschemas not called up in any other schema Lists Personnel Calculation Rules which are not called up Source text search in PC rules Copy Personnel Calculation Rules from client 000 to other clients Schema directory – useful after LCP to see changed schemas. Amar Chintam . cumulations and evaluation classes created with RPU12W0S in T512W Creates a backup of T512W in T599U or reloads the backup into T512W.g.Programming in Human Resource ______________________________________________________________________ Wage Type Utilities RPU12W0C RPU12W0S RPU99U0V RPU5XX0D (HR utility 512W-classes) allows you to reload backups of specific processing classes. Displays T599U Generically deletes entries in T599U. BACS transfer) to PC file File transfer between TemSe and disc 99 Document by:. T512W or T512T Other Useful programs RSHOWTIM RSANAL00 RSABAPIV RCCLBISC RPUTRBK0 RPUEUSUP RPUDEL20 RPDSYS00 RSBDCSUB RSUSR006 RSPARAM RPABRIDD RPUPROTU RPINCL10 RPCIFU03 RPLTEMV0 Displays tips and tricks for ABAP Programming Program analysis Lists all ABAP commands Display contents of logical filename Updates infotype 0003 dates after data transfer Activate Additional Actions infotype 0302 Deletes payroll results (be careful !) Display System Documentation Release batch-input sessions automaticly List users last login Display all instance parameters Deletes data in payroll infotypes maintain/delete the log of report starts Use RPINCL10 to search through ABAP source code Move TemSe Unix file (e. The following tools were used to do this document: Snagit Smart draw Mspaint 100 Document by:.planetsap.com www.Programming in Human Resource ______________________________________________________________________ References: The following documents from SAP were referred to do this document: HR 350 HR 550 HR 050 HR 530 HR 580 The following websites were referred to do this document: www.Amar Chintam .atomhr.com The online help of SAP was also used to do this document.sap-img.com www.abaptools.com www.
Copyright © 2024 DOKUMEN.SITE Inc.