Example of an HR report
An HR report which uses the logical database has the following basic structure:
REPORT RPABAP01.
TABLES: PERNR.
INFOTYPES: 0001.
GET PERNR.
PROVIDE * FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA.
WRITE: / P0001-PERNR,
P0001-STELL,
P0001-BEGDA,
P0001-ENDDA.
ENDPROVIDE.
This report evaluates the Organizational Assignment infotype records in the specified data selection period.
Infotype Declaration
All infotypes to be processed in the report are listed in the ABAP
INFOTYPES keyword.The database usually contains several records with different validity periods and not just one record for each infotype and personnel number . Infotypes are time-dependent since their data changes over time. For this reason, one structure or work area would not suffice for the provision of infotype data in the main memory.
Therefore, the
INFOTYPES statement is used to create an internal table for each of the listed infotypes. The structure of this table corresponds to that of the relevant infotype.Data Retrieval
Data is retrieved at the
GET PERNR event. The GET PERNR action is executed for all personnel numbers that were selected on the basis of selection screen entries. The event should therefore be viewed as a loop using the selected personnel numbers.GET PERNR
fills the internal tables of infotypes that are declared for each employee using the INFOTYPES statement.The internal infotype table is filled with all records existing between the lowest and highest system date. The internal table has the name
Pnnnn, where nnnn is the infotype number.
The header of the internal table
For information on processing infotype records, see
Infotype Processing (PA-PAD).PERNR
is a Data Dictionary structure without a database. You must declare this structure in the report using the TABLES statement.See also:
Infotype Processing (PA-PAD) Views