Can you post the code you have written now?
*********************************************************
WHEN '0FI_AR_4'."Customers: Line Items with Delta Extraction
TYPES:BEGIN OF ty_VBAK,
VBELN TYPE VBELN,
SPART TYPE SPART,
GSBER TYPE GSBER,
VKBUR TYPE VKBUR,
END OF ty_VBAK.
TYPES:BEGIN OF ty_VBrp,
VBELN TYPE VBELN,
aubel TYPE aubel,
END OF ty_VBrp.
DATA: it_vbak TYPE STANDARD TABLE OF ty_vbak,
it_data TYPE STANDARD TABLE OF DTFIAR_3.
DATA: it_vbrp TYPE STANDARD TABLE OF ty_vbrp,
wa_vbrp TYPE ty_vbrp.
FIELD-SYMBOLS: <FS_VBAK> TYPE ty_vbak,
<fs_data> TYPE DTFIAR_3.
IF not c_t_data[] is INITIAL.
*--Copy data to Temp Table
it_data[] = c_t_data[].
CLEAR c_t_data[].
*--Fetch the cus. Sales. Org Details
SELECT VBELN AUBEL from vbrp
INTO TABLE it_vbrp FOR ALL ENTRIES IN it_data WHERE VBELN = it_data-VBELN.
IF it_vrbp is not initial.
delete adjacent duplicates from it_vbrp comparing vbeln.
SELECT VBELN spart gsber vkbur from vbak
INTO TABLE it_vbak FOR ALL ENTRIES IN it_vbrp WHERE VBELN = it_vbrp-aubel.
endif. " VBRP select
*--Populate the data to output
LOOP AT it_data ASSIGNING <fs_data>.
if it_vbak is not initial.
READ TABLE it_vbak assigning <fs_vbak> WITH KEY VBELN = <fs_data>-VBELN.
IF sy-subrc EQ 0.
<fs_data>-ZZSPART = <fs_vbak>-spart.
<fs_data>-ZZGSBER = <fs_vbak>-gsber.
<fs_data>-ZZSALESOFFICE = <fs_vbak>-vkbur.
endif. "read tbale
ENDIF. " vbak
ENDLOOP.
c_t_data[] = it_data[].
FREE it_data[].
ENDIF. " check c_t_data not initial
***********************************************************
I want you to check first
Go to VBAP table -> get few SD number which are billed.
Go to VBRP table -> field AUGEL - Search for whose SD numbers.-> Get Billing numbers.
Go BSID/BSAD table -> FIELD VBELN -> Search for those Billing numbers.
Regards,
Sandeep