SAP HR Programming
SAP HR Programming
HR Data Structure
PAnnnn
Master data / Time data
PCL1 PCL2
HRPnnnn
Personnel Planning
Documents
HR cost planning
Transparent Tables
Data Clusters
List of infotypes is available in table V_T582A. Infotype can be subdivided into subtype which also controls the actions of the infotype. E.g. Family/Related Person (IT0021). Infotype can be subdivided further by object identification. E.g. Family/Related Person (IT0021), subtype Child.
structure PSHD1
other basic information for each infotype
PAYGB_RESULT
EVP
INTER
NAT
Report categories
Determines which function keys are available, which selection parameters appear and the properties of the selection parameters.
GET PERNR.
Populates PERNR structure and all infotypes declared in the INFOTYPES statement. Infotypes declared with MODE N will not be populated during this event.
HR Programming - LDB - PY
Using LDB for HR-PY programming:
Available from SAP R/3 4.6c and above. Screen 900 is assigned as the selection-screen at the program attribute. PYORGSCREEN and PYTIMESCREEN need to be declared in TABLES statement for the extra payroll related selection-screen. PAYROLL node to be declared in the NODE statement with reference type to PAYGB_RESULT for UK or PAY99_RESULT for international. HR report category can be changed to use Payroll Results (Cluster) for selection screen customisation.
HR Programming - LDB - PY
HR Programming - LDB - PY
GET PAYROLL.
PAYROLL structure will be populated. If more than one payroll period is specified at the selection screen, this event will be executed for each period. Payroll results internal table may contains more than one result depending on the status of result selection. To evaluate payroll result, LOOP through the PAYROLL-INTER-RT internal table.
HR Programming - LDB - PY
Things to remember when doing HR-PY programming:
PYBEGDA / PYENDDA - end/start of PAYROLL DATA selection period. Data evaluation will be based on HRPY_RGDIR (Payroll directory information) rather than from HR-PA master data. Example program available in Development client 010/020 ZHRPYTRAINING.
HR Programming - LDB - PY
RP-SEL-EIN-AUS-INIT (TRMAC)
exclude employee with employment status NE 0.
RP_PROVIDE_FROM_LAST (PNP)
reads the last valid record of an internal table in the specified selection period.
Example: rp_provide_from_last p0002 SPACE pn-begda pn-endda.
Otherwise:
Using function module PYXX_GET_EVALUATION_PERIODS or Using function module HR_GET_PAYROLL_RESULTS to import current payroll results.
Examples:
RPMUST01 - Model report for monthly payroll results RPMUST02 - Model report for monthly payroll results - more than one period.