Hi Muhammad,
You have fetched data from EKPO into I_EKKO and data from RSEG into I_RSEG.
You need to use both these internal tables together and display the data. You are appeinding the records to IT_RSEG incorrectly.
Refer below code.
Loop at IT_EKKO into wa_ekko.
read table I_RSEG into wa_rseg with key EBELN = WA_EKKO-EBELN
EBELP = WA_EKKO-EBELP.
if sy-subrc eq 0.
*- Write data directly or fill internal table IT_RSEG.
endif.