Providing the Last Entry in the Time Period
Name
RP-PROVIDE-FROM-LAST (PROVIDE FROM LAST)
Function
The last entry of the time period (or subtype) you want is taken from an internal infotype table (defined by means of the programming language declaration INFOTYPES) and placed in the table header.
Parameters
RP-PROVIDE-FROM-LAST inftytab subty beg end
IN : |
1. |
Name of the internal table |
|
2. |
Subtype wanted or SPACE if no subtype is being specified | |
|
3. |
Validity begin date of the time interval | |
|
4. |
Validity end date of the time interval | |
OUT: |
1. |
PNP-SW-FOUND: has the value 0 if there is no matching entry in the infotype table in the given time period. Otherwise it has the value 1 . |
|
2. |
The matching table header entry if PNP-SW-FOUND = 1 orthe cleared table header entry if PNP-SW-FOUND = 0 |
Check
none
Prerequisites
Usage
In programs using the database PNP where you wish to read the last time record of a period (or of a subtype) from an infotype table (which was filled earlier by using, for example, GET PERNR or RP-READ-INFOTYPE). This is only worthwhile if the infotype table (or subtype, if specified) contains time constraint 1 or 2.

RP-PROVIDE-FROM-LAST P0021 '1' PN/BEGDA PN/ENDDA.
IF PNP-SW-FOUND EQ '1'. "spouse data?
...
ENDIF.
or
RP-PROVIDE-FROM-LAST P0001 SPACE PN/BEGDA PN/ENDDA.
IF PNP-SW-FOUND EQ '0'.
WRITE: / 'Error: Organizational assignment lacking'.
REJECT.
ENDIF.
Remarks
The (mothballed) module PROVIDE-FROM-FINAL is a special case of PROVIDE-FROM-LAST:
PROVIDE-FROM-FINAL inftytab subty beg end =