BSEG will contains all items data.
try to make use of this FM
AC_DOCUMENT_RECORD.
or

1
2
3
4
5
6
7
8
9
10
11
12
call function ‘FI_DOCUMENT_RECORD’
exporting
i_awtyp = ‘RMRP’
i_awref = w_awref1 —>IR number of PO
i_aworg = w_gjahr1—-.year
 
I_AWSYS = ‘ ‘
I_AWTYP_INCL = ‘ ‘
I_AWTYP_EXCL = ‘ ‘
I_BUKRS = ‘ ‘
tables
t_documents = t_doc.