Skip to Content
0
Oct 22, 2012 at 05:36 AM

Help needed in cancellation logic

20 Views

Hello experts,

I have one requirement in which if the business area and the g/l amount is the same, then those values should not be displayed inthe final table.

My coding is given below:

IF it_bsis1 is NOT INITIAL.
SELECT bukrs hkont budat blart bschl shkzg gsber pswbt bewar FROM bsis
INTO CORRESPONDING FIELDS OF TABLE it_bsis_s1
FOR ALL ENTRIES IN it_bsis1
WHERE shkzg = 'S'
AND bewar IN ('120', '170')
AND bschl = 70
AND blart = 'AA'
AND budat in s_date
AND gsber in s_werks
AND bukrs = it_bsis1-bukrs
AND hkont = it_bsis1-hkont.
ENDIF.

IF it_bsis1 is NOT INITIAL.
SELECT bukrs hkont budat blart bschl shkzg gsber pswbt bewar FROM bsis
INTO CORRESPONDING FIELDS OF TABLE it_bsis_s11
FOR ALL ENTRIES IN it_bsis1
WHERE shkzg = 'S'
AND bewar IN ('120', '170')
AND bschl = 70
AND blart = 'AA'
AND budat in s_date
AND gsber in s_werks
AND bukrs = it_bsis1-bukrs
AND hkont = it_bsis1-hkont.
ENDIF.

LOOP AT it_bsis_s1 INTO wa_bsis_s1.
LOOP AT it_bsis_s11 INTO wa_bsis_s11.
DELETE it_bsis_s11 WHERE gsber = wa_bsis_s1-gsber.
ENDLOOP.
ENDLOOP.

After this coding i m not able to cancel out all the values of the above condition. Please guide me where I m wrong in the cancellation logic.

Thanks and regards,

Satvik