GET PERAS
TABLES pernr.
NODES peras.
INFOTYPES: 0000, 0001, 0002, 0006.
START-OF-SELECTION.
GET peras.
LOOP AT p0006 WHERE endda GE pn-begda
AND begda LE pn-endda.
WRITE: p0006-endda.
ENDLOOP.
PROVIDE nachn FROM p0002
BETWEEN pn-begda AND pn-endda.
WRITE: p0002-nachn.
ENDPROVIDE.
rp_provide_from_last p0001 '1' pn-begda pn-endda.
rp_provide_from_frst p0002 '1' pn-begda pn-endda.
END-OF-SELECTION.