Structure of a Report (PA-APP)Example of a report in HR Recruitment
An HR report which uses the logical database has the following basic structure:
REPORT RPABAP01.
TABLES: APPLICANT.
INFOTYPES: 0001.
GET APPLICANT.
PROVIDE * FROM P0001 BETWEEN PA$BEGDA AND PA$ENDDA.
WRITE: / P0001-PERNR,
P0001-ENAME,
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 does not normally contain only one record for each infotype and personnel number but several records with different validity periods. 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 APPLICANT event. The GET APPLICANT 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 via the selected personnel numbers.
GET APPLICANT 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.
Caution
Note that the header of the internal tables Pnnnn is undefined after the GET APPLICANT action. These headers are reset to their initial values if no records are found for a new personnel number.
For information on processing infotype records, see Infotype Processing (PA-APP) .
APPLICANT is a Data Dictionary structure without a database and must be declared in the report under TABLES .
See also: