04-24-2007 6:37 PM
Hello,
I have an internal table with many vendors and each vendor may have multiple line items. Now if a line item has incorrect data then that vendor shudnt get created and move on to the next vendor..As i show here
v1,12,ea,3444
v1,12,ea,3445
v1,12,ea,3446
v2,12,ea,3448
v2,12,ea,3447
If 3445 is incorrect then I shud move on to next vendor v2..How do i do this in an internal table.
Thanks
Viky
04-24-2007 6:39 PM
04-24-2007 6:44 PM
Loop at internal table
if vendor_abc is "incorrect".
CONTINUE.
endif.
endloop.
Regards,
Amey
04-24-2007 6:50 PM
Hi,
You can also use CHECK statement..
LOOP AT ITAB.
CHECK error_flag = 'N'.
ENDLOOP.
Thanks,
Naren
04-24-2007 6:56 PM
Hi,
You can make use of the AT control statements, something like this:
Loop at itab.
Check if the line item is ok.
IF OK.
flag = Y.
ELSE.
CONTINUE.
ENDIF.
AT END OF <vendor>.
check flag = Y.
Send vendor details.
ENDAT.
Endloop.
Hope this helps,
Sumant.