‎2006 Mar 20 4:23 AM
Hi experts,
Iam having itab like this.
VBELN VKBUR KUNNR AUART AUDAT FBUDA
100000001|9003 |0000110065|ZR01 |20060207|20060208|
100000001|9003 |0000110065|ZR01 |20060207|00000000|
100000006|9003 |0000110065|ZR01 |20060208|00000000|
100000007|9003 |0000110065|ZR01 |20060207|20060208|
100000008|9003 |0000110065|ZR01 |20060207|20060208|
100000009|9003 |0000110065|ZR01 |20060208|20060208|
If any one of the FBUDA is not having value i want to delete all VBELNs.
So my output should be like this.
100000007|9003 |0000110065|ZR01 |20060207|20060208|
100000008|9003 |0000110065|ZR01 |20060207|20060208|
100000009|9003 |0000110065|ZR01 |20060208|20060208|
For example
I have values
VBELN FBUDA
100000001|9003 |0000110065|ZR01 |20060207|20060208|
100000001|9003 |0000110065|ZR01 |20060207|00000000|
since 100000001 having FBUDA value 00000000, i want to delete <b>all 100000001</b>.
Can any one tell me how can i do this?
Reward guaranteed
thanks
kaki
‎2006 Mar 20 4:39 AM
Loop at itab where fbuda = '00000000'.
delete itab where vbeln = itab-vbeln.
endloop.
‎2006 Mar 20 4:26 AM
Kaki,
Did you try
Delete itab where FBUDA is initial.
If this doesn't work
DELETE ITABE where FBUDA = '00000000'.
Regards,
Ravi
‎2006 Mar 20 4:28 AM
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln,
END OF itab.
LOOP AT itab.
IF FBUDA IS INITIAL.
itab1-vbeln = itab-vbeln.
APPEND itab1.
DELETE ADJACENT DUPLICATES FROM itab1.
ENDLOOP.
LOOP AT itab1.
DELETE itab WHERE vbeln = itab1-vbeln.
ENDLOOP.
‎2006 Mar 20 4:31 AM
Hi kaki,
i think you cannot use
<b> delete itab where ..</b>
for initial values..
so
loop at itab.
if itab-FBUDA is initial.
delete itab where vbeln eq itab-vbeln.
endif.
endloop.regards
satesh
‎2006 Mar 20 4:39 AM
Loop at itab where fbuda = '00000000'.
delete itab where vbeln = itab-vbeln.
endloop.
‎2006 Mar 20 5:05 AM