Hi Cleo,
Below is the sample code,
`Begin of GlobalTYPES : BEGIN OF TYPE_ZTS1,
ZAMOUNT TYPE /BIC/OIZAMOUNT,
END OF TYPE_ZTS1.
DATA: IT_TS1 TYPE STANDARD TABLE OF TYPE_TS1 ,
WA_TS1 TYPE TYPE_TS1.
Being of Routine
DATA : IT_SP type STANDARD TABLE OF _ty_s_SC_1.
IF SOURCE_PACKAGE IS NOT INITIAL.
REFRESH IT_SP.
IT_SP = SOURCE_PACKAGE.
IF NOT IT_SP IS INITIAL.
SORT IT_SP.
ENDIF.
SELECT ZAMOUNT FROM /BIC/ZBILL_O0200
INTO TABLE IT_TS1 FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE bill_doc = bill_doc-/bic/zbil_o01.
IF NOT IT_SP IS INITIAL.
SORT IT_ZTS1.
ENDIF.
ENDIF.
Write this in the Field Routine
READ TABLE IT_TS1 INTO WA_TS1 WITH KEY
bill_doc= SOURCE_FIELDS-bill_doc.
IF SY-SUBRC = 0.
RESULT = WA_TS1-ZAMOUNT.
ENDIF.
Hope this Helps.
Rgds
SVU