2007 Dec 12 8:33 AM
Hello
pls give any documentation regarding HR ABAP
Thanking you
2007 Dec 12 8:36 AM
HI,
Best PDF file to learn HR Programming
http://www.melayu.plus.com/SAP%20HR%20Programming.pdf
HR deals with the INFOTYPES which are similar to Tables in General ABAP.
There are different ways of fetching data from these infotypes.
There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
Infotypes for these areas are different from one another area.
storing of records data in each type of area is different
LDBS like PNP are used in HR programing.
Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
On the whole Normal ABAP is different from HR abap.
For Personal Admn the Infotypes start with PA0000 to PA1999
Time Related Infotypes start with PA2000 to PA2999.
Orgn related Infotypes start with HRP1000 to HRP1999.
All custom developed infotypes stsrat with PA9000 onwards.
In payroll processing we use Clusters like PCL1,2,3 and 4.
Instead of Select query we use PROVIDE and ENDPROVIDE..
You have to assign a Logical Database in the attributes PNP.
Go through the SAp doc for HR programming and start doing.
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
sites regarding hr-abap:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one ...
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
These are the FAQ's that might helps you as well.
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://www.atomhr.com/library_full.htm
HR Long texts Upload
Look at the below link
HR
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
you can see some Standard Program examples in this one..
http://www.sapdevelopment.co.uk/programs/programshr.htm
These are the FAQ's that might helps you
http://www.sap-img.com/human/hr-faq.htm
http://www.sapgenie.com/faq/hr.htm
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
http://www.sapfans.com/forums/viewtopic.php?p=498530&sid=d7ec5866e3fb26880da129de45ce79de
http://www.sapcookbook.com/preview_hr_questions.htm
http://www.atomhr.com/library_full.htm
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://www.planetsap.com/hr_abap_main_page.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci983590,00.html
http://www.allsaplinks.com/HRmaterial.html
http://www.allsaplinks.com/timemanagement.html
http://www.allsaplinks.com/payrollcompletefunctional.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/HRINF/HRINF.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYXXFORM/PYINT_FORMBUILDER.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://www.planetsap.com/hr_abap_main_page.htm
Regards,
Satish
2007 Dec 12 8:38 AM
2008 Feb 26 3:10 AM
hi
i am david.
1.what is main use of ldb and wt is main diffarent bt ldb and database.
2. can u tell me about ldb fecture
2008 Feb 26 3:44 AM
Hi,
HR deals with the INFOTYPES which are similar to Tables in General ABAP.
There are different ways of fetching data from these infotypes.
There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
Infotypes for these areas are different from one another area.
storing of records data in each type of area is different
LDBS like PNP are used in HR programing.
Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
On the whole Normal ABAP is different from HR abap.
Few notes are below:
InfoSets in the HR Application
You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
If you want to create InfoSets for HR, you can use logical databases PNP, PNPCE, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
The reports you can execute using InfoSets based on logical databases PNP (or PNPCE) or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
Logical database PNP/PNPCE* PCH PAP
Selection of Persons Objects from Personnel Planning Applicants
Infotypes that can be included in the InfoSet Infotypes for· Personnel Administration (0000-0999) · Time Management (2000-2999) · Payroll infotypes · Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:· Infotypes for the object type · Infotypes for objects that can be related to the specified object typeIf the object type is not specified:· All infotypes · Infotypes for Recruitment (4000-4999)· Some infotypes for Personnel Administration (such as 0001 and 0002)
· Customer infotypes
Reporting examples · Selection of all persons who participated in a specific business event, output of prices for reserved business events · Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons · Selection of all business events held in London in March, output of all persons who participated in these business events · Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions · Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
Logical database PNPCE (PNP Concurrent Employment) functions just like logical database PNP. The procedure for creating InfoSets is also the same. It only becomes significant if you work with Concurrent Employment.
Creating InfoSets
The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
3. Choose .
This takes you to the Infotype Selection for InfoSet screen. You now have the option of creating field groups and assigning fields as required for non-HR InfoSets. Field groups that correspond to infotypes and already contain fields, however, are always created for HR InfoSets. The field groups are displayed in an overview tree in the top right section of the screen.
The infotypes that you included in the InfoSet are displayed in an overview tree on the left of the screen. The infotype fields that are already included in field groups are displayed in a different color, and the corresponding field group ID is displayed.
In the standard system, a field group is created automatically for each infotype that you included in the InfoSet (a field group corresponds to an infotype).
In the standard system, each field group contains the infotype-specific fields. To ensure that working with the InfoSet is as easy as possible, you are advised to restrict your use of fields in each field group to those you really require. This means you should remove fields that are not required.
An infotype's fields must only be assigned to the pertinent field group. Make sure this assignment is correct. If the assignment is incorrect, the InfoSet could be rendered unusable.
When an InfoSet is created, the following fields are transferred automatically to the first field group:
§ Logical database PNPCE or PNP Personnel number
§ Logical database PAP Applicant number
§ Logical database PCH Object ID, plan version, and object type
6. Determine the fields that must be included in the field groups of your InfoSet. If you require further information, see Assigning Fields to a Field Group.
If you want, you can change the default sequence of field groups and fields as required using Drag&Drop.
7. To save the InfoSet, choose .
8. To generate the InfoSet, choose .
On the Change InfoSet (InfoSet name) screen, you can choose Edit ® Change infotype selection to add more infotypes to the InfoSet, or to remove infotypes from the InfoSet. Remember to regenerate the InfoSet afterwards.
This screen also enables you to update InfoSets if, for example, the system contains new additional fields for specific key values. To do so, choose InfoSet ® Additional functions ® Update additional HR fields.
9. Go back to the initial screen for InfoSet maintenance.
10. Choose User group assignment.
11. Select a user group, and save your entry.
sample code
START-OF-SELECTION.
GET pernr.
rp_provide_from_frst p0000 space pn-begda pn-endda.
if pnp-sw-found EQ '1'.
READ TABLE p0001 WITH KEY pernr = p0000-pernr.
if sy-subrc = 0.
write : p0001-plans. " earliest.
endif.
endif.
rp_provide_from_last p0014 space pn-begda pn-endda.
if pnp-sw-found EQ '1'.
READ TABLE p0014 WITH KEY pernr = p0000-pernr.
if sy-subrc = 0.
write : p0014-LGART. .
endif.
endif.
cheers,
vasavi.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 26, 2008 2:21 PM
2008 Feb 26 11:13 AM
The aim in the Human Resources component is to be able to process employee related data according to business requirements in an effective structure.
The Human Resources module uses a system of data grouped together called infotypes.
Infotypes mirror a quantity of connected data records; infotypes are identifiable through a four character numerical string [e.g. infotype Addresses (0006)] and a complete listing is included.
You can save the infotypes as time-dependent to enable a retroactive evaluation of
Employee data
The infotypes appear as an entry screen for the user, through which you can maintain infotype records. Infotypes can be processed individually or in fast entry mode.
2.1.2 Difference from conventional ABAP
Advanced Business Application Programming ABAP is SAP's fourth generation language. All of R/3's applications and even parts of its basic system are developed in ABAP. ABAP is used for customization and modification of SAP applications.
In HR ABAP use of select statements significantly less than in other areas of ABAP development, Logical databases have limited applications in other modules but are very useful in HR. Also, you really need to understand the infotype time constraint concept, When you cannot get the information that you need out of the logical DB look at the function modules starting with HR* and RH*. These function modules will provide you with multiple ways of accessing data to save time. Worst-case scenario, use a select statement.
2.1.3 Overview of PA/PD/& Integration between PA & PD
This explains how to use the ABAP programs, which set integration between PA and PD/OM. They are mainly used after data conversion, bulk updates or to correct errors caused by other programs.
Each program is explained in detail so you can decide which ones you need to run. To set up/fix full integration between PA and PD, they should be run in this sequence:
1. RHINTE00 Transfer PA records into PD positions batch
2. RHINTE20 Create OM objects in PA tables Online
3. RHINTE30 Bulk update of infotype 0001
4. RHINTECHECK Program to check PA to PD
5. RHCHECKV - Checks all inverse relationships
Overview
It is important to realize that in PA, there are tables that contain objects from OM, i.e. for those items displayed on infotype 0001 Organizational Assignment. Sometimes the tables can get out of step with those in PD table HRP1000.
The tables are:
T513, T513S Object type C (Job)
T528B, T528T Object types S (Position) and A (Work center)
T527X Object type O (Organizational unit)
RHINTE00
This loops through all employees in PA by looking at positions on infotype 0001. It checks the corresponding person to position relationship exists in PD (A008), if not it is created.
RHINTE10
Generally, the program RHINTE20 will be used instead of this one. This program loops through the PD table HRP1000. For each job, position, work centre and organization unit, corresponding entry is created in the PA tables, which are shown above. Run this with evaluation path o_s_p, which runs through Org units, jobs and positions or find a suitable alternative if you wish to update work centers also. The main difference with this program as opposed to RHINTE20 is that this one has the option to delete items from the PA tables, which no longer exist in PD.
RHINTE20
This program loops through the PD table HRP1000. For each job, position, work centre and organization unit, corresponding entry is created in the PA tables, which are shown above. Run this with evaluation path o_s_p, which runs through Org units, jobs and positions or find a suitable alternative if you wish to update work centers also. An example output will show:
Expand the tree items to display a list of objects that can be created:
RHINTECHECK
When the above programs have been run, use this check program, which looks through all employees and reports any inconsistencies found between PA and PD.
Tick each item that you wish to be created, or click on the text and click select subtree to select them all then click to perform multiple updates. This program can prove to be problematic. If difficulties arise with it, try using RHINTE10 instead.
RHINTE30
This will create an infotype 0001 record with correct entries for org unit, job, position and work centre by looking through the organization structure. It creates a batch job, which must be run via SM35. More details to follow.
RHCHECKV
This will check inverse relationships and create missing ones.
2.1.4 Concepts of Infotypes (Structure/Processing etc.)
Infotypes:
An infotype represents a group of related data fields, provides information structure, facilitates data entry, and allows time dependent storage.
In other words we can say infotypes are information units used to enter the time dependent data of the employee.
Master data in HR is stored in infotypes. Each infotype pertains to a specific type of data.
Each infotype has a database table associated with it.
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.
Transparent tables for infotype
Each infotype has a transparent table. Each logical field for an infotype has a corresponding physical field on the database.
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
Example: For Infotype 0000, the corresponding database table associated with it is PA0000
Check and Control Tables for HR Infotypes
Table T777D Infotypes - Dialog/Database Assignment is the central check table (domain INFOTYP) for all HR infotypes (Administration and planning infotypes). It is used to store the names of all infotype-dependent repository objects (tables, structures, programs, and so on).
Table T77ID Infotypes: Enhancements to T777D is simply an enhancement of table T777D that exists for reasons of memory space.
Table T582A Infotypes - Customer-Specific Settings is used for customer settings in Administration infotypes.
Table T77CD Infotypes - Customer-Specific Settings is used for customer settings in planning infotypes.
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 employees master data and working time data (infotypes).
SUBTY: subtypes are subdivisions of infotypes. An infotypes 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.
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). Unlike the object identification, it is assigned by the system automatically.
Structure:
The Data Dictionary contains a Pnnnn structure for each infotype nnnn. The infotype structure Pnnnn corresponds to the table PAnnnn. The Pnnnn structure of the infotype is used as the field structure for the infotype entry screen (Transaction code PA30).
Basic form of an infotype:
Infotypes nnnn [name c] [occurs m] [mode n] [valid from comp1 to comp2].
nnnn can be 0000 to 9999.
0000 0999 are HR Master Data infotypes.
1000 1999 are HR Planning data infotypes.
2000 2999 are HR time data infotypes.
3000 8999 are not used
9000 9999 are used for the custom infotypes
Effect of the above syntax is
It creates an internal table as below...
DATA BEGIN OF c OCCURS m.
INCLUDE STRUCTURE Pnnnn.
DATA END OF c VALID BETWEEN comp1 AND comp2
If name option is not given in the syntax then the internal table will be created with the name p<nnnn>
If occurs clause in not given then the size of an internal table would be 10 * size of the structure pnnnn. That is in the place of m it would be 10.
If valid clause is not given then the comp1 and comp2 values will be 01/01/1800 and 31/12/9999 respectively.
Mode n this clause can only be used with the LDBs PCH and PNP. This addition stops this infotype being automatically filled at the GET PERNR command.
The infotype records can be processed using the infotype structure when the report is run.
Processing Infotypes
Processing Single Infotype Record
We can process the Single records of an infotype using the following macros.
1. RP_PROVIDE_FROM_LAST Pnnnn SPACE PN-BEGDA PN-ENDDA.
This macro is used to retrieve the most recent record in the PN-BEGDA and PN-ENDDA data selection period available in the structure Pnnnn for infotype nnnn
2. RP_PROVIDE_FROM_FIRST Pnnnn SPACE PN-BEGDA PN-ENDDA
This macro retrieves the earliest record for the given selection period.
If the infotype has subtypes, then replace SPACE with the subtype so, the data is retrieved based on that subtype. If the retrieval is successful then the return code PNP-SW-FOUND will be 1.
Processing All Infotype Records
Processing of infotype records is time-dependent; by this we mean dependent on the data selection period entered on the selection screen. The data of several infotypes can be processed at the same time and made available for a specific partial period
To process all records of internal tables of an infotypes we use the PROVIDE statement
Syntax:
PROVIDE * FROM Pnnnn BETWEEN PN-BEGDA AND PN-ENDDA.
ENDPROVIDE
nnnn stands for 4-digit infotype number. The relationship between the data and the selection period is established using the PN-BEGDA and PN- ENDDA variables.
Infotype List
Infotype Number Infotype Text Description
0000 Actions
0001 Organizational Assignment
0002 Personal Data
0004 Challenge
0006 Addresses
0007 Planned Working Time
0008 Basic Pay
0009 Bank Details
0013 Social Insurance Deductions
0014 Recurring Payments/Deds
0015 Additional Payments
0019 Monitoring of Dates
0021 Family/Related Person
0022 Education
0025 Appraisals
0034 Corporate Function
0035 Company Instructions
0040 Objects on Loan
0041 Date Specifications
0048 Residence Status
0077 Additional Personal Data
0094 Residence Status
0105 Communication
0167 Health Plans
0168 Insurance Plans
0169 Savings Plans
0170 Flexible Spending Accounts
0171 General Benefits Information
0172 FSA Claims
0207 Residence Tax Area
0208 Work Tax Area
0209 Unemployment State
0210 Withholding info W4/W5 US
0377 Miscellaneous Plans
0378 Adjustment Reasons
9001 DOD/MWR Specific Data
9002 Payroll Import Data
9003 Retirement Plan Data at Termination
9005 KRONOS Information
2.1.5 Concepts of Clusters (Import/Export etc.), cluster directory
Definition
Each database object, for example, PCL1 or PCL2, with the type Import/Export file consists of related areas. These areas are known as clusters, for example. RX, RD. Cluster objects are dependent on the super ordinate database object.
Cluster objects RX, RD, B2 can be selected for the database PCL2. If the database object has the type master data then there will be no cluster object.
Import/Export files
They are 4 types of files.
PCL1: Basis for HR Work area data. Contains information from time data recording.
PCL2: Contains derived information like payroll results and generated payroll schemas.
PCL3: Contains Applicant Data
PCL4: Contains change documents for HR master data and recruitment.
Importing and Exporting of data is managed with the commands IMPORT and EXPORT These commands store objects such as fields, field strings, or internal tables on the database, or read these from the database. Data is read from and written to the database using a unique key. RMAC provides two macros for importing and exporting data RP-IMP-Cn-xx and RP-EXP-Cn-xx; only these macros should be used.
Export Cluster data using standard include.
o The EXPORT command causes one or more 'xy' KEY data objects to be written to cluster xy.
o The cluster definition is integrated with the INCLUDE statement.
REPORT ZHREXPRT.
TABLES: PCLn.
INCLUDE: RPCnxxy0. "Cluster definition
Fill cluster KEY
xy-key-field = <value>.
Fill data object
....
Export record
EXPORT TABLE1 TO DATABASE PCLn (xy) ID xy-KEY.
IF SY-SUBRC EQ 0.
WRITE: / 'Update successful'.
ENDIF.
Export Cluster data using the macro
. Export data using macro RP-EXP-Cn-xy.
When data records are exported using macro, they are not written to the database but to a main memory buffer.
To save data, use the PREPARE_UPDATE routine with the USING parameter 'V'.
REPORT ZHREXPRT.
*Buffer definition
INCLUDE RPPPXD00. INCLUDE RPPPXM00. "Buffer management
DATA: BEGIN OF COMMON PART 'BUFFER'.
INCLUDE RPPPXD10.
DATA: END OF COMMON PART 'BUFFER'.
...
RP-EXP-Cn-xy.
IF SY-SUBRC EQ 0.
PERFORM PREPARE_UPDATE USING V.
ENDIF.
Importing Cluster Data using standard include
The IMPORT command causes data objects with the specified key values to be read from PCLn.
If the import is successful, SY-SUBRC is 0; if not, it is 4.
REPORT RPIMPORT.
TABLES: PCLn.
INCLUDE RPCnxxy0. "Cluster definition
Fill cluster Key
Import record
IMPORT TABLE1 FROM DATABASE PCLn (xy) ID xy-KEY.
IF SY-SUBRC EQ 0.
Display data object
ENDIF.
Importing Cluster data using Macro
Import data using macro RP-IMP-Cn-xy.
Check return code SY-SUBRC. If 0, it is successful. If 4, error.
Need include buffer management routines RPPPXM00
Example
REPORT RPIMPORT.
*Buffer definition
INCLUDE RPPPXD00.
DATA: BEGIN OF COMMON PART 'BUFFER'.
INCLUDE RPPPXD10.
DATA: END OF COMMON PART 'BUFFER'.
*Import data to buffer
RP-IMP-Cn-xy.
....
*Buffer management routines
INCLUDE RPPPXM00.
Cluster Authorization
Simple EXPORT/IMPORT statement does not check for cluster authorization.
Use EXPORT/IMPORT via buffer, the buffer management routines check for cluster
authorization.
How to read the Payroll Results
Payroll results are stored in cluster Rn of PCL2 as field string and internal tables.
n - Country identifier.
Standard reports read the results from cluster Rn. Report RPCLSTRn lists all payroll results;
Report RPCEDTn0 lists the results on a payroll form.
The cluster definition of payroll results is stored in two INLCUDE reports:
include: rpc2rx09. "Definition Cluster Ru (I)
include: rpc2ruu0.Definition Cluster Ru (II)
o This first INCLUDE defines the country-independent part; the second
INCLUDE defines the country-specific part (US).
o The cluster key is stored in the field string RX-KEY.
All the field string and internal tables stored in PCL2 are defined in the ABAP/4 dictionary. This allows you to use the same structures in different definitions and nonetheless maintain data consistency.
The structures for cluster definition comply with the name convention PCnnn
Unfortunately 'nnn' can be any set of alphanumeric characters.
*Key definition
DATA: BEGIN OF RX-KEY.
INCLUDE STRUCTURE PC200.
DATA: END OF RX-KEY.
*Payroll directory
DATA: BEGIN OF RGDIR OCCURS 100.
INCLUDE STRUCTURE PC261.
DATA: END OF RGDIR.
How to retrieve Payroll results
o To read payroll results, you need two keys: pernr and seqno
o You can get SEQNO by importing the cluster directory (CD) first.
Example
REPORT ZHRIMPRT.
TABLES: PERNR, PCL1, PCL2.
INLCUDE: rpc2cd09. "Definition cluster CD
PARAMETERS: PERSON LIKE PERNR-PERNR.
...
RP-INIT-BUFFER.
*Import cluster Directory
CD-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-CU.
CHECK SY-SUBRC = 0.
LOOP AT RGDIR.
RX-KEY-PERNR = PERSON.
UNPACK RGDIR-SEQNR TO RX-KEY-SEQNO.
*Import data from PCL2
RP-IMP-C2-RU.
ENDLOOP.
o Reading records from the Payroll directory
after importing the payroll directory, which record to read is up to the programmer
o Each payroll result has a status.
'P' - previous result
'A' - current (actual) result
'O' - old result
o Function module CD_EVALUATION_PERIODS will restore the payroll result status for a period when that payroll is initially run. It also will select all the relevant periods to be evaluated.
Example
Call function 'CD_EVALUATION_PERIODS'
exporting
bonus_date = ref_periods-bondt
inper_modif = pn-permo
inper = ref_periods-inper
pay_type = ref_periods-payty
pay_ident = ref_periods-payid
tables
rgdir = rgdir
evpdir = evp
iabkrs = pnpabkrs
exceptions
no_record_found = 1.
Authorization Check
Authorization for Persons
In the authorization check for persons, the system determines whether the user has the authorizations required for the organizational features of the employees selected with GET PERNR.
Recruits for which the user has no authorization are skipped and appear in a list at the end of the report.
Authorization object: 'HR: Master data'
Authorization for Data
In the authorization check for data, the system determines whether the user is authorized to read the infotypes specified in the report.
If the authorization for a particular infotype is missing, the evaluation is terminated and an error message is displayed.
Deactivating the Authorization Check
In certain reports, it may be useful to deactivate the authorization check in order to improve performance. (E.g. when running payroll)
You can store this information in the object 'HR: Reporting'.
2.1.6 Concepts of Macros (Import/Export etc.)
Macros:
Introduction
Programs that process the cluster data (for example, RX) do not access the cluster independently. The data is accessed using a defined interface created with macros.
Macro contains some part of source code, which it will be useful for number of applications. Macro is module, which is stored
Naming Conventions of Macro:
RP-aaa-bb-cc
aaa is the type of Macro. It takes two values
o IMP Import Macro
o EXP Export Macro
bb is the Database table where the data is saved:
o C1 Database object PCL1
o C2 Database object PCL2
o C3 Database object PCL3
o C4 Database object PCL4
Cc is the cluster, it may take
o RX Cluster object RX
o RD Cluster object RD
o B2 Cluster object B2 and so on.
Defining and Calling the Macros
Defining:
There are two options for defining the Macros
Macros are defined using the ABAP Commands DEFINE . END-OF-DEFINITION. A macro can be used within a report or within include. If a macro is used in a report, and the macro is defined in include with the DEFINE command, include must be integrated.
Macros can also be defined as RMAC macros. The source code of these modules is stored in the function section of the control table TRMAC. The coding is grouped under a specific name in the table key.
According to conventions, the first two letters of the name must stand for the application. The rest of the name is freely definable.
Difference between the two methods is:
If a macro is changed, each report using this macro is automatically regenerated when it is executed.
When you change a RMAC macro in the table TRMAC, the reports that use this macro are not regenerated automatically. You must regenerate them manually.
Standard HR Macros
o The macro RP-PROVIDE-FROM-FRST retrieves the first (start) data record, which is valid in the data selection period.
o The macro RP-PROVIDE-FROM-LAST retrieves the last (latest) data record, which is valid in the data selection period.
o The macro RP-READ-INFOTYPE retrieves the data record(s), which is valid in the data selection period.
How to check whether the macro operation is successful or not
For every macro, whether the operation was successful or not will be checked with
PNP-SW-FOUND.
If PNP-SW-FOUND = 1, then the operation is successful.
Where exactly the Macrocode is stored
The program code pertaining to this macro is stored in the control table RMAC
Guidelines for how and when to use the Standard Macros
o RP_PROVIDE_FROM_FRST
Use macro RP_PROVIDE_FROM_FRST in programs for the logical databases PNP and PAP where the first data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype has time constraint 1 or 2.
Prerequisites
The validity begin date of the time period must be before or the same as the validity end date.
Validity start and end dates are correct (preferably of the type DATE).
The infotype table is sorted in ascending order. Otherwise, you would receive the first fitting table entry that might not necessarily correspond to the first time entry.
Features
The first entry for a specified period is placed in the table header entry from an internal infotype table.
Parameters
RP_PROVIDE_FROM_FRST inftytab subty beg end
IN: 1) Name of the internal table
2) Subtype required or SPACE if no subtype is being specified
3) Validity start date of the time interval
4) Validity end date of the time interval
OUT: 1) PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1.
2) The matching table header entry if PNP-SW-FOUND = 1 or
the initial table header entry if PNP-SW-FOUND = 0
Example
(RP_PROVIDE_FROM_FRST inftytab subty beg end)
RP_PROVIDE_FROM_FIRST P0021 '1' PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND EQ '1'.
...
ENDIF.
or
RP_PROVIDE_FROM_FRST P0001 SPACE PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND EQ '0'.
WRITE: / 'Error: Org. assignment is missing' REJECT.
ENDIF.
o RP_PROVIDE_FROM_LAST
You use macro RP_PROVIDE_FROM_LAST in programs for the logical databases PNP and PAP where the last data record for a period (can be a subtype) is read from an infotype table. The infotype table has been filled earlier (for example, with GET PERNR or RP_READ_INFOTYPE). This macro is only helpful if the infotype (or subtype) has time constraint 1 or 2.
Prerequisites
The validity begin date of the time period must be before or the same as the validity end date.
Validity start and end dates are correct (preferably of the type DATE).
The infotype table is sorted in ascending order. Otherwise, you would receive the last fitting table entry that might not necessarily correspond to the last time entry.
Features
The macro RP_PROVIDE_FROM_LAST makes sure that the last entry for a specified period is placed in the table header entry of the report output list.
Parameters
RP_PROVIDE_FROM_LAST inftytab subty beg end
IN: 1) Name of the internal table
2) Subtype required or SPACE if no subtype is being specified
3) Validity begin date of the time interval
4) Validity end date of the time interval
OUT: 1) PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1.
2) The matching table header entry if PNP-SW-FOUND = 1 or
the cleared table header entry if PNP-SW-FOUND = 0
Example:
RP_PROVIDE_FROM_LAST P0021 '1' PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND EQ '1'.
...
ENDIF.
OR
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND EQ '0'.
WRITE: / 'Error: Org. assignment is missing'. REJECT.
ENDIF.
RP_READ_INFOTYPE
You can use the macro in all programs at any point. You can also use it in function modules. In database PNP, an infotype is usually read with GET PERNR. Using macro RP_READ_INFOTYPE is an exception.
You can also use the function module HR_READ_INFOTYPE. For information on how to use the function module, see the documentation on Function Modules.
Prerequisites
The validity begin date of the time period must be before or the same as the validity end date.
Validity begin and end are correct date specifications (preferably of the type DATE).
The infotype table must match the infotype number.
The program using the macro must contain the include DBPNPMAC.
Features
The macro RP_READ_INFOTYPE makes sure that all data records for a person for the specified period are placed in an internal infotype table.
Parameters
RP_READ_INFOTYPE pernr infty inftytab beg end
IN: 1) Personnel number of the person requested
2) Infotype number of the required infotype
3) Name of the internal infotype table
4) Validity start date of the time interval
5) Validity end date of the time interval
OUT: 1) PNP-SW-FOUND = 0, if there is no matching record in the dataset
PNP-SW-FOUND = 1, if there is no matching record in the dataset
2) PNP-SW-AUTH-SKIPPED-RECORD = 0, if the HR authorization check has not retained any records due to incorrect authorizations.
PNP-SW-AUTH-SKIPPED-RECORD = 1 , if the HR authorization check has retained at least one record due to lack of authorization
3) Internal infotype table, containing all matching records for which the user is authorized (this table can also be empty).
Example
(RP_READ_INFOTYPE pernr infty inftytab beg end)
INFOTYPES: 0001.
RP-LOWDATE-HIGHDATE.
DATA: PERNR LIKE P0001-PERNR.
DATA: BEGDA LIKE P0001-BEGDA, ENDDA LIKE P0001-ENDDA.
PERNR = '12345678'.
BEGDA = LOW-DATE + 15
ENDDA = HIGH-DATE - 5.
RP-READ-INFOTYPE PERNR 0001 P0001 BEGDA ENDDA.
IF PNP-SW-AUT-SKIPPED-RECORD EQ '1'.
WRITE: / 'Insufficient authorization'. STOP.
ENDIF.
IF PNP-SW-FOUND EQ '0'.
WRITE: / 'Infotype 0001 missing'. STOP.
ENDIF.
2.1.7 Retrieval of data using LDBs (PNP/PAP/APP/PCH) without LDBs.
Logical database
A logical database is a special ABAP/4 program which combines the contents of certain database tables. Using logical databases facilitates the process of reading database tables.
HR Logical Database is PNP
Main Functions of the logical database PNP:
Standard Selection screen
Data Retrieval
Authorization check
To use logical database PNP in your program, specify in your program attributes.
Standard Selection Screen
Date selection
Date selection delimits the time period for which data is evaluated. GET PERNR retrieves all records of the relevant infotypes from the database. 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.
Sorting Data
The standard sort sequence lists personnel numbers in ascending order.
SORT function allows you to sort the report data otherwise. All the sorting fields are from infotype 0001.
Report Class
You can suppress input fields, which are not used on the selection screen by assigning a report class to your program.
If SAP standard delivered report classes do not satisfy your requirements, you can create your own report class through the IMG.
Data Retrieval from LDB
1. Create data structures for infotypes.
INFOTYPES: 0001, "ORG ASSIGNMENT
0002, "PERSONAL DATA
0008. "BASIC PAY
2. Fill data structures with the infotype records.
Start-of-selection.
GET PERNR.
End-0f-selection.
Read Master Data
Infotype structures (after GET PERNR) are internal tables loaded with data.
The infotype records (selected within the period) are processed sequentially by the PROVIDE - ENDPROVIDE loop.
GET PERNR.
PROVIDE * FROM Pnnnn BETWEEN PN/BEGDA AND PN/ENDDA
If Pnnnn-XXXX = ' '. write:/ Pnnnn-XXXX. Endif.
ENDPROVIDE.
Period-Related Data
All infotype records are time stamped.
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. PN/BEGDA PN/ENDDA.
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.
For example, pn/begda = '19990931' pn/endda = '99991231'
IT0006 subtype 1 is resident address
RP-PROVIDE-FROM-LAST P0006 1 PN/BEGDA PN/ENDDA.
2.2 Personnel Administration (PA)
PA involves administrating employee data, commonly referred to Master Data. Master Data contains all employee data used in HR processing. Master Data includes Personal (E.g. address), Organizational (Position description), Benefits (Insurance, Pension), Time & Payroll.
Master Data is stored in Infotypes. Infotypes are tables (for user Data entry screen) that contain logically related employee data. Data can be stored for specific periods, which includes current and historical.
Components of PA:
Personnel Area: represents a division of a company code into subunits. It is an organizational entity representing an area within an organization defined by specific aspects of personnel administration, time management and payroll. Personnel areas are subdivided into personnel subareas. Personnel area is specific to HR and is a four character alphanumeric identification. E.g. Personnel area 100 is for employees in Karnataka, 200 is for Chennai.
Personnel Subarea: is a further subdivision of Personnel area. It may represent geographical locations. Functions include:
1. Set groupings for Time Management, so that work schedules, substitution and absence and leave types can be setup for individual personnel subareas.
2. Generate default pay scale type and area for an employee's basic pay.
3. Define public holiday calendar.
Employee Groups: divides or groups employees into various categories. E.g. Active employees, Retired employees, Contractors Employee groups are used to generate default values for payroll accounting area and basic pay.
Employee Subgroups: are further differentiated within the employee group. E.g. Salaried employees, Hourly employees, unionized employees, Executives The employee subgroup grouping for the payroll rule allows you to define different payroll procedures for different employee subgroups. For e.g. you can specify whether an employee's pay should be determined on hourly or monthly basis. The employee subgroup grouping for the work schedule defines the validity of work schedule, and the attendance or absence quota type determines the validity of time quotas.
Here a Data Model
2.2.1 Importance of Dates and periods in payroll
Here is a simple ABAP example of reading DATE types stored in infotype 0041.
There can be a maximum of 12 dates stored in this infotype. Here is an example of an infotype 0041 record:
The date types are stored in PA0041-DAR01, PA0041-DAR02, etc.
In the example above, PA0041-DAR01 is 01, PA0041-DAR02 is 09.
The dates themselves are stored in PA0041-DAT01, PA0041-DAT02, etc
To read through this in ABAP, the easiest way is to use the DO VARYING statement. Here is a simple demonstration ABAP:
Note: to print the text of the date type, e.g. Leave year entry select from table T548T.
REPORT ZDATES1.
TABLES: PERNR.
DATA: BEGIN OF MYDATES,
DAR LIKE P0041-DAR01,
DAT LIKE P0041-DAT01,
END OF MYDATES.
INFOTYPES 0041.
GET PERNR.
WRITE: PERNR-PERNR, PERNR-ENAME. "Show employee number and name
RP-PROVIDE-FROM-LAST P0041 SPACE PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND = 1.
DO 12 TIMES VARYING MYDATES
FROM P0041-DAR01
NEXT P0041-DAR02.
If mydates-dar ne space.
WRITE: /, MYDATES-DAR, MYDATES-DAT.
Endif.
ENDDO.
ENDIF.
2.2.2 Overview of date fields and period-Ex. for period/in-period/ payroll
FOR-PERIOD: Payroll period (start and end date of a period) for which a payroll result is created or generated.
IN-PERIOD: The payroll period (start and end date of a period) in which a payroll result is created or generated.
Example: For every employee payroll should be run, it may be bi-weekly, monthly, or quarterly. Say it is monthly, then for an employee a payroll should be run for this month and it is run next month then. For-period start date is 01/9/2003 and end date is 30 and in-period end date will be the date it is run 15/10/2003.
In-Period View
An in-period view is a selection of payroll results from the payroll directory (for example, RPCLSTRD Payroll Result for Germany,) for a number of in-periods. The payroll results that were generated for the required number of payroll periods in the selected period are selected.
Payroll Result
For-Period View
A for-period view is a selection of payroll results from the payroll directory (for example, RPCLSTRC Payroll Result for Switzerland) for a number of for-periods. The payroll results that were generated in the required number of payroll periods for the selected period are selected.
Example: For-Period View / In-Period View
Payroll
result For-period
view Start date
for-per. view End date
for-per. view In-period
view End date
in-per. view
1 01/1997 01.01.1997. 31.01.1997 02/1997 28.02.1997
2 02/1997 01.02.1997 28.02.1997 02/1997 28.02.1997
Explanation
The payroll result 1 for the payroll period (for-period) 01/1997 has the start date 01.01.1997 and the end date 31.01.1997. This payroll result was generated in the payroll period (in-period) 02/1997.
2.2.3 Repetitive Structures processing
In many master data infotypes the data is stored in the form of repetitive structures. For example infotype 0008, the structure wage type line is available for 20 times, that is an employee is eligible for having 20 different wage types based on his benefits. When evaluating repeat structures, you must ensure that all fields are entered. In the case of the Basic Pay infotype, 20 * 5 = 100 fields are queried.
To use this method of evaluation, define a field string whose structure corresponds to the fields in one line of the repetitive structure.
Example for understanding the repetitive Structure
Say, for an employee you want to know that for what all wage types an employee is eligible for the latest period you mentioned on the selection screen.
Using LDB (PNP)
Program:
Report zhk_repstru.
Tables Pernr.
Infotypes 0008.
You have to declare a structure same as repetitive structure in the 0008 infotype
Data: begin of s_wagetypes,
Wagetype type p0008-lga01,
Amount type p0008-bet01,
Hours type p0008-anz01,
Unit type p0008-ein01,
Ind type p0008-opk01,
End of s_wagetypes,
Selecting data from the Data base Get pernr
Getting the latest record based on the selection period.
RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
Now knowing for what all wage types the employee is eligible.
Do 20 times varying s_wagetypes from p0008-lga01 next p0008-lga02. If s_wagetypes-wagetype is initial.
o Here the data is stored sequentially, i.e., if the employee is eligible for 5 wage types then all the 5 wage types are stored sequentially in lga01 to lga05 respectively. So, if say the lga05 is initial then it is understood that, employee is eligible for only 4 wage types and from lga05 to lga20 structures will be empty so, we need not process further
Exit.
Else.
Write: / s_wagetypes-wagetype,
S_wagetypes-amount.
Endif.
Enddo.
2.2.4 Guidelines to retrieve Payroll data (Mainly US/UK/Ireland)
Before directly going into the Guidelines to retrieve Payroll Data let us look in to the basic concepts of the Payroll.
Introduction to Payroll
To calculate the remuneration for work done for each employee
Payroll does not just involve the calculation of remuneration, but consists of a variety of processes that are becoming increasingly important due to the employers increased obligation to supply benefits and medical welfare. These benefits are products of:
Labor law
Tax law
Contribution law
Benefits law
Civil law
Reporting law
Information law
Statistics law
Payroll in the SAP System: In the SAP Human Resources Management System, payroll accounting is executed using the Payroll driver.
Process Flow:
When you access Payroll, the payroll driver calls the accompanying payroll schema, which consists of a sequence of functions. For each activity, the individual functions import data from internal tables and payroll relevant files.
Payroll Integration:
Payroll can be integrated in Personnel Administration, Time Management, Incentive Wages and Accounting:
Standardized data retention enables you to use master data and other payroll relevant data from Personnel Administration.
Time data, entered via Time Management, is automatically included in the Payroll and is valuated during the payroll run. Data from the Incentive Wages component is used to calculate piecework wages and premium wages directly in Payroll.
Information on expenses and payables from Payroll is posted for accounting directly in Financial Accounting, and you assign the costs to the appropriate cost center. You can also control the financial system of third-party providers.
Payroll Driver
Payroll driver is a special report for Payroll.
SAP has developed country-specific payroll drivers, which are based on report RPCALCx0.
The country-specific net calculation of pay must be developed explicitly for every country.
Separate country programs, which meet the tax and insurance requirements of the respective country, can be created from the basic report RPCALCx0. Since the payroll driver has a modular structure, you can use the Customizing functions to quickly modify the payroll procedure to meet the particular requirements of your enterprise.
Integration
Calculation rules and other reports are stored in an accompanying schema, which also contains the activities carried out by the payroll driver during payroll. All data is stored in internal tables and saved in files with a cluster structure.
When you access Payroll, the payroll driver calls the accompanying payroll schema, which consists of a sequence of functions. For each activity, the individual functions import data from internal tables and payroll relevant files.
Payroll Schema:
It contains calculation rules to be used by the payroll driver during payroll.
SAP has developed country-specific schemas, which are based on schema X000.
With country-specific reports, the first character in the name refers to the country indicator.
For example,
D for Germany
F for France
U for USA
Schema Structure A schema consists of the following parts:
1. Initialization
Where system performs the following steps:
Updates the databases
Imports required infotypes
2. Gross calculation of pay
Where system performs the following steps:
Processes basic data and time data
Reads payroll account of the last period accounted
Processes time data and calculate the individual gross values
Performs factoring
3. Net calculation of pay
where system performs the following steps:
Calculates net remuneration
Performs bank transfers
Example:
The classic example is the payroll for salaried employees at the end of the month in contrast to the wage accounting of hourly workers in the middle of the following month.
Enter the organizational assignment of employees to a payroll accounting area (ABKRS) in Infotype 0001. Payroll accounting area also determines the two functions necessary for payroll accounting:
The summarization of personnel numbers to be accounted and
The determination of the exact payroll period.
Select Personnel Numbers:
Personnel numbers are selected for payroll accounting by specifying a payroll area in the payroll driver. Infotype 0001 Organizational Assignment enables you to assign an employee to the appropriate payroll area.
These Pernrs are locked during Payroll Run.
Determine Payroll Period:
On the Selection screen, you can give Payroll Period Parameter as per the requirement else you can give Payroll Area, by which system calculates the payroll period.
Finding Payroll Results for a Specific Query:
Payroll results are stored in cluster Rx of the PCL2. The cluster key is not mnemonic; it contains only the PERNR (personnel number) and SEQNO (sequential number) fields.
The internal table RGDIR (PC261 - Cluster Directory for Export and Import of Payroll Results) contains a directory entry for each payroll result.
This entry is a sequential number (RGDIR-SEQNR), which uniquely identifies the payroll result.
Payroll results can only be imported if the payroll cluster key (PC200) contains the personnel number and sequential number.
Function Modules for Selecting Payroll Results
You will probably always have the same queries when importing payroll records. For example, "Which payroll results (original and retroactively accounted records) were written for a specific payroll run (defined by IN payroll category, IN payroll area, IN period)"? To save programmers from having to write their own reports for this functionality, standard modules are available for the most important queries. The employee's payroll directory is always transferred to the function modules using the table RGDIR (PC261). The modules then transfer the payroll records, which satisfy the specified selection criteria using a table whose type corresponds to that of the RGDIR (PC261) but which has a different name.
Exporting Pernr Personal Number
Importing Molga Country
Tables Rgdir Payroll Results Directory
This Function Module populates payroll results of all employees with PERNR & SEQNR as key.
Macro Modules:
We have populated Results Directory & retrieved Sequential Number, we need to call an import macro module for retrieving the required payroll results. For this we need to pass the unique identification of an Employee payroll Result i.e. rx-key-pernr = v_pernr.
rx-key-seqno = v_seqnr.
To that import macro.
Calling Import Module: RP-imp-c2-RU.
This Macro populates all the cluster tables required for Payroll, by importing from PCL2 Cluster Directory. After that we can loop through these cluster tables for required fields.
Guideline to write a program, which retrieves the data for, specified country
Use Logical Database As per the Requirement.
Include Payroll Driver with reference to Country- Specific modules which inturn includes Country-specific Schemas etc.
Get the PERNRs for which you want to obtain payroll results.
Populate Results Directory RGDIR with PERNR & Molga (Country) calling FM CU_READ_RGDIR.
Get the Unique Sequential Number with PERNR, From Date & Last Date calling CD_READ_LAST.
Pass these KEY Field (PERNR, SEQNR) to IMPORT MACRO
RP-IMP-C2- RU to import all the relevant field entries from PCL2
DIRECTORY to all the cluster tables
Get the required fields by looping through cluster tables.
Integration
All data is stored in internal tables and saved in files with a cluster structure.
Internal Tables: Internal tables store data during payroll.
The system imports data to these tables and used them to calculate new data. This data is then also saved in internal tables.
At the start of the payroll run, the system reads the values from the results tables to the old results table (ORT). Data from the previous period is, therefore, available in the current payroll period.
The most important internal tables are:
Input table (IT)
Table IT contains data that can be edited. The table exists only during processing.
Output table (OT)
Table OT contains the results of an activity. These results are written to the input table for further processing. The table exists only during processing.
Results table (RT)
Table RT contains the results of the period for which payroll has been run. The system saves this data in the PCL2 file in cluster RX.
Interaction of IT, OT and RT:
The necessary data for the respective processing step is loaded into the input table and is thus available for various processing procedures. The results of a processing step are stored either in the output table or the results table. At the end of a processing step, the data from the OT is loaded back into the IT, where it is available for further processing steps. The IT and OT are only temporarily filled, whereas the RT is stored on the database. In one of the first processing steps, the RT of the last payroll accounting period is imported into the old results table (ORT) and can consequently be used for further processing.
Payroll Relevant Files:
Payroll files contain data for payroll and payroll results.
Structure
The system requires the following files for payroll:
Pnnnn (nnnn = number of the infotype)
The Pnnnn files contain data that has been entered in the respective infotypes for an employee.
Example
P0000 - Actions Infotype
P0008 - Basic Pay Infotype
PCL1
The PCL1 file contains primary information, in other words, data from the master data and time recording systems.
PCL2
The PCL2 file contains secondary information, in other words, derived data and all generated schemas
Integration
When you start payroll, the system imports the relevant master data from the Pnnnn files (for example, basic pay and tax class) and imports the time data from the PCL1 file to the IT table.
The system imports the payroll results from the previous month from table ORT (for example, to form averages).
The system processes this data and saves the payroll results and generated schemas in the PCL2 file.
Payroll Control
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |