Processing a Specific Infotype Record (PA-PAD) 

You often only require the most recent or earliest infotype record, not all infotype records.

In this case, use one of the following statements:

RP_PROVIDE_FROM_LAST Pnnnn SPACE PN-BEGDA PN-ENDDA.

or

RP_PROVIDE_FROM_FIRST Pnnnn SPACE PN-BEGDA PN-ENDDA.

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 infotype nnnn .

If the infotype has subtypes, replace the SPACE parameter by the appropriate subtype number.

When a record has been successfully read, the return code PNP-SW-FOUND = 1 is returned.

Example report:

REPORT RPDEMO02.
TABLES: PERNR.
INFOTYPES: 0001.

GET PERNR.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA
IF PNP-SW-FOUND eq ‘1’.
WRITE: / PERNR-PERNR, P0001-STELL, PN-BEGDA, PN-ENDDA.
ELSE.
REJECT.
ENDIF.

The above statements are ABAP macros.

For more information, see Specific Commands.