Macro in personnel administration.

RP_PROVIDE_FROM_LAST Pnnnn SPACE PN-BEGDA PN-ENDDA.
or
RP_PROVIDE_FROM_FIRST Pnnnn SPACE PN-BEGDA PN-ENDDA.

Important note for those macros :

  1. These statements make the most recent or earliest record in the PN/BEGDA to PN/ENDDA data
    selection period available in the structure Pnnnn for info type nnnn.
    If the infotype has subtypes, replace the SPACE parameter by the appropriate subtype number.
  2. When a record has been successfully read, the return code PNP-SW-FOUND = 1 is returned.
  3. Use PNP logical database in the attributes of the program.

 

Get First Record from the Infotype

 

Get Last Record from the Infotype

 

Macro in applicant data.

Use PAP logical database in the attributes of the program

PAP_PROVIDE_FROM_LAST Pnnnn SPACE PA$BEGDA PA$ENDDA.
or
PAP_PROVIDE_FROM_FIRST Pnnnn SPACE PA$BEGDA PA$ENDDA.

If the infotype has subtypes, replace the SPACE parameter by the appropriate subtype number.
The return code PNP-SW-FOUND = 1 is returned if data is found.
Declare TABLES: APPLICANT to display default selection screen from PAP LDB.

 

 

Macro in time management.

You should not load all time infotype records from the earliest because the data is big. This would quickly lead to a memory overload, especially if a front-end time recording system is connected to your HR system.

Use the infotype declaration supplement MODE N to define that the internal time infotype tables
should be declared but not filled at the GET PERNR event.

You can use macro RP_READ_ALL_TIME_ITY to get data from Time Management

Use PNP logical database in the attributes of the program

 

 

Macro in payroll.

For repetitive structures( do varying)

When evaluating repeat structures, you must ensure that all fields are entered. In the case of the
Basic Pay infotype, 20 * 5 = 100 fields are queried.

A loop offers a more streamlined method of evaluation. Here, one line of the repeat structure is
evaluated each time the loop is executed.To use this method of evaluation, define a field string whose structure corresponds to the fields inone line of the repetitive structure. In this field string, one line of the basic pay wage types is evaluated each time the loop is executed.

You can use DO .. VARYING to get all value from each of Wage Type

Use PNP logical database in the attributes of the program

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *