‎2007 Apr 12 4:26 AM
‎2007 Apr 12 4:29 AM
Hi,
Not clear with your requirement...
not only flag...We can compare any variables / work areas / internal tables using IF statement..
Thanks,
Naren
‎2007 Apr 12 4:33 AM
flag is used as a mediator,
In the below example records of itab are appended to itab1 except the first record on every change of MATNR , chk how the flag is used
loop at itab.
at new matnr.
v_flag = 'X'.
endat.
if v_flag eq 'X'.
clear flag.
else.
append itab to itab1.
endif.
endloop.Message was edited by:
Chandrasekhar Jagarlamudi
Message was edited by:
Chandrasekhar Jagarlamudi
‎2007 Apr 12 4:59 AM
hi,,
You can use flag for different purposes.Suppose we need to check any of the records being checked for a table you can use flag for that thing .If ther is any changes we can also use flag for that thing also.It depends on different situations.
regards,
veeresh
‎2007 Apr 12 7:25 AM
Hi Silla,
LOOP AT TAB.
IF TAB-FLAG IS INITIAL.
TAB-FLAG = 'X'.
ENDIF.
MODIFY TAB.
ENDLOOP.
TAB-FLAG = 'X'.
MODIFY TAB TRANSPORTING FLAG
WHERE FLAG IS INITIAL.
Rewords if it is helpful.
Rgds,
P.Nag