Use following after get pernr to have the matching record in the header line.
rp-provide-from-last: p0000 space pn-begda pn-endda.
or you can use following function module
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
tclas = 'A'
pernr = p0000-pernr
infty = '0000'
begda = pnpbegda
endda = pnpendda
bypass_buffer = ' '
legacy_mode = ' '
IMPORTING
subrc = l_subrc
TABLES
infty_tab = p0000
Thanks,
Mona