Database Tables in HR
· Cluster tables combine the data from several tables with identical (or almost identical) keys
into one physical record on the database.
. Data is written to a database in compressed form.
· Retrieval of data is very fast if the primary key is known.
· Cluster tables are defined in the data dictionary as transparent tables.
· External programs can NOT interpret the data in a cluster table.
· Special language elements EXPORT TO DATABASE, IMPORT TO DATABASE and DELETE
FROM DATABASE are used to process data in the cluster tables.
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 Tables PCLn
· PCLn database tables are divided into subareas known as data clusters.
· Data Clusters are identified by a two-character code. e.g RU for US payroll result, B2 for
time evaluation result...
· Each HR subarea has its own cluster.
· Each subarea has its own key.
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
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.
· 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
Cluster Definition
· The data definition of a work area for PCLn is specified in separate programs which comply
with fixed naming conventions.
· They are defined as INCLUDE programs (RPCnxxy0). The following naming convention applies:
n = 1 or 2 (PCL1 or PCL2)
xx = Relation ID (e.g. RX)
y = 0 for international clusters or country indicator (T500L) for different country cluster
Exporting Data (I)
· The EXPORT command causes one or more 'xy' KEY data objects to be written to cluster xy.
· 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.
Exporting Data (II)
. 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 Data (I)
· 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 data (II)
· 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
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.
Payroll Results (I)
· 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.
Payroll Results (II)
· The cluster definition of payroll results is stored in two INLCUDE reports:
include: rpc2rx09. "Definition Cluster Ru (I)
include: rpc2ruu0. "Definition Cluster Ru (II)
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)
· 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.
Payroll Cluster Directory
· To read payroll results, you need two keys: pernr and seqno
. You can get SEQNO by importing the cluster directory (CD) first.
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.
'P' - previous result
'A' - current (actual) result
'O' - old result
· 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
· 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.
· Employees 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'.
* e-abap님에 의해서 게시물 이동되었습니다 (2007-04-24 11:53)
- Personnel Administration (PA) - master and time data infotype tables (transparent tables). PAnnnn: e.g. PA0001 for infotype 0001
- Personnel Development (PD) - Org Unit, Job, Position, etc. (transparent tables). HRPnnnn: e.g. HRP1000 for infotype 1000
- Time/Travel expense/Payroll/Applicant Tracking data/HR work areas/Documents (cluster PCLn: e.g. PCL2 for time/payroll results.
· Cluster tables combine the data from several tables with identical (or almost identical) keys
into one physical record on the database.
. Data is written to a database in compressed form.
· Retrieval of data is very fast if the primary key is known.
· Cluster tables are defined in the data dictionary as transparent tables.
· External programs can NOT interpret the data in a cluster table.
· Special language elements EXPORT TO DATABASE, IMPORT TO DATABASE and DELETE
FROM DATABASE are used to process data in the cluster tables.
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 Tables PCLn
· PCLn database tables are divided into subareas known as data clusters.
· Data Clusters are identified by a two-character code. e.g RU for US payroll result, B2 for
time evaluation result...
· Each HR subarea has its own cluster.
· Each subarea has its own key.
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
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.
· 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
Cluster Definition
· The data definition of a work area for PCLn is specified in separate programs which comply
with fixed naming conventions.
· They are defined as INCLUDE programs (RPCnxxy0). The following naming convention applies:
n = 1 or 2 (PCL1 or PCL2)
xx = Relation ID (e.g. RX)
y = 0 for international clusters or country indicator (T500L) for different country cluster
Exporting Data (I)
· The EXPORT command causes one or more 'xy' KEY data objects to be written to cluster xy.
· 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.
Exporting Data (II)
. 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 Data (I)
· 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 data (II)
· 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
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.
Payroll Results (I)
· 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.
Payroll Results (II)
· The cluster definition of payroll results is stored in two INLCUDE reports:
include: rpc2rx09. "Definition Cluster Ru (I)
include: rpc2ruu0. "Definition Cluster Ru (II)
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)
· 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.
Payroll Cluster Directory
· To read payroll results, you need two keys: pernr and seqno
. You can get SEQNO by importing the cluster directory (CD) first.
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.
'P' - previous result
'A' - current (actual) result
'O' - old result
· 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
· 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.
· Employees 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'.
** 출처 : http://www.erpgenie.com/
* e-abap님에 의해서 게시물 이동되었습니다 (2007-04-24 11:53)
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
70 | 발령시 등록번호(주민번호) 제어 관련 문의 드립니다. [3] | oracleuser | 2015.11.30 | 12355 |
69 | HR 급여 스키마 셋팅 및 보는 방법 [4] | 슈퍼아밥퍼가되련다 | 2010.09.16 | 9755 |
68 | HR 공부 방법~ | 히로2000 | 2011.09.02 | 7509 |
67 | 년차는 어떻게 생성해주나여? [1] | 날아 | 2010.12.28 | 7494 |
66 | HR 프로세스 자료입니다. [28] | 서키트 | 2009.11.25 | 7320 |
65 | SAP HR Overview [31] | 윤뚱 | 2009.06.24 | 7161 |
64 | 발령 - 시작일자 변경 방법 문의 [3] | 왕창부셔다부셔 | 2010.12.23 | 7127 |
63 | HR관련(테이블,T-CODE 등) [16] | 나더몰라 | 2008.03.14 | 6666 |
62 | Payroll Engine ? [1] | 윤뚱 | 2010.09.16 | 5761 |
61 | 해당 T-code 에서 IMG 찾는 법 [3] | 슈퍼아밥퍼가되련다 | 2010.09.02 | 5692 |
60 | 급여스키마 흐름이해 [25] | 바다 | 2008.05.14 | 5181 |
59 | 인포 타입 생성 방법 | v.persie | 2012.05.30 | 5180 |
58 | [re] SAP HR Overview | 바보사랑 | 2009.07.03 | 5095 |
» | Processing Payroll infotypes/Cluster [1] | 김대영 | 2007.04.24 | 5080 |
56 | PeopleSoft HCM vs SAP 비교자료 [4] | GURI | 2008.11.11 | 5062 |
55 | HR Certi 관련 질문 | 슈퍼아밥퍼가되련다 | 2010.11.23 | 5056 |
54 | HR 족보가 필요합니다 ㅠ.ㅡ | 낭망야옹이 | 2012.03.15 | 5002 |
53 | 제가 자주 사용하는 T-Code를 정리한것입니다[20080220업데이트] [24] | 혀나미 | 2007.12.04 | 4964 |
52 | hr_용어집 [16] | 동키호테 | 2008.09.16 | 4947 |
51 | 안녕하세요 도움좀 부탁드립니다.^^; | 월계동정씨 | 2012.01.06 | 4856 |