Académique Documents
Professionnel Documents
Culture Documents
Now click on ‘Allowable selection criteria’ option on the right hand side of
the screen as shown below.
Click on ‘New Entries’ and select all the required select options from the
F4 help option.
These are the fields which will be shown on the selection screen of your
report.
Click on ‘Save’ to save the newly created ‘Report Category’. Now go back
and save and activate all your work. Press F8 to test the newly created
selection screen using the Logical Database and HR Report Category.
To fetch the data from the database we use the GET PERAS event.
When the program is executed the LDB reads the selected data and the
internal table of each declared Infotypes is filled with all the records which
are available for a specific personnel number.
Field PERNR-PERNR contains the personnel number for which the
records are being fetched.
Note that the GET event has no ENDGET statement, so the code block
started by the GET event can only be ended with next event statement
we define in our program.
Other useful HR related ABAP Statements
The PROVIDE…..ENDPROVIDE is useful when you want to work with employee data at
a specific point in time. Because HR data is time dependant it can be difficult/laborious to
create the code that selects all the data you need from specific Infotypes. By using
the Provide statement you can cut out a lot of coding and make use of this inbuilt loop
designed specifically for time dependant data selection.
RP_PROVIDE_FROM_LAST Macro provides last entry from the Infotype according to the
data selection period. More details here.
By using these statements you can fetch and process all the required
data. After adding the required code ensure you save your program.
Step 5: Activate and Test
Activate and test your program to see the output.
I hope you find this quick guide useful. It has helped demonstrate how
easy you can generate HR reports using the SAP delivered Logical
Databases.
Write a comment below and tell me what you though of the article.