From: http://www.planetsap.com/HR_ABAP_payroll.htm
PCL1 - Database for HR work area;
PCL2 - Accounting Results (time, travel expense and payroll);
PCL3 - Applicant tracking data;
PCL4 - Documents, Payroll year-end Tax data
Database Table
PCL1
The database table PCL1 contains the following
data areas:
The database table PCL2 contains the following
data areas:
The database table PCL3 contains the following
data areas:
The ABAP commands IMPORT and EXPORT are used for
management of read/write to database tables PCLn.
A unique key has to be used when reading data from or writing data
to the PCLn.
|
Field Name |
KEY |
Length |
Text |
|
MANDT |
X |
3 |
Client |
|
RELID |
X |
2 |
Relation ID (RU,B2..) |
|
SRTFD |
X |
40 |
Work Area Key |
|
SRTF2 |
X |
4 |
Sort key for dup. key |
Exporting Data (I)
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.
Exporting Data
(II)
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 Data (I)
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 data (II)
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.
Payroll Results
(II)
The cluster definition of payroll results is
stored in two INLCUDE reports:
The first INCLUDE defines the country-independent part; The second INCLUDE defines the country-specific part (US).
The cluster key is stored in the field string RX-KEY.
Payroll Results
(III)
*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.
Payroll Cluster Directory
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.
INLCUDE: RPPPXM00. "PCL1/PCL2 BUFFER HANDLING
Function Module
(I)
CD_EVALUATION_PERIODS
After importing the payroll directory, which record to read is up
to the programmer. Each payroll result has a status.
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.
Function Module (II)
CD_EVALUATION_PERIODS
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
Authorization for
Data
Deactivating the
Authorization Check
| Converted from CHM to HTML with chm2web Standard 2.7 (unicode) |