05-07-2009 1:34 PM
Hi guru's,
I have to do a test which checks if the records uploaded from the file are already present in the table system and if the records already present in table for profit center/controlling area.
Anyone can help me please.
Regards,
Mohamed.
DATA:
wa_cepc_segm TYPE zst_cepc_segm,
wa_cepc_segm2 TYPE zst_cepc_segm,
i_cepc_segm TYPE STANDARD TABLE OF zst_cepc_segm,
l_kokrs TYPE kokrs,
l_prctr TYPE prctr,
l_segment TYPE segment,
l_check TYPE sy-subrc,
wa_prtcr TYPE cepc.
>........<
LOOP at i_cepc_segm TO wa_cepc_segm.
READ TABLE zst_cepc_segm into wa_cepc_segm2.
ENDLOOP.
05-07-2009 1:38 PM
get the file data and table data into two internal tables and
check by looping the file data internal table and reading the ztable data internal table.
05-07-2009 1:39 PM
Hi,
1. Get the data into the internal table i_input from File .
2. Check the record existence in the database from the internal table using the FOR ALL ENTRIES on i_input in Select statement from DB table . Get the data into i_itab.
3. Now loop the i_input and check the entry exists in the i_itab. if doesnot exist append the data into i_final.
4. update the data from i_final to DB table.