‎2008 Dec 06 7:08 AM
HI experts
I have one reqirement in which i need to shift fields with data to without data..
E.g
If internal table 2nd field is empty and 3rd field is having data then it should shift data to 2nd field...
‎2008 Dec 06 7:10 AM
Hi,
Just use like this.
If itab-field1 is initial.
Move itab-field2 to itab-field1.
Endif.P.S But make sure that both fields are of same data type and no loss of data is happening.
Thanks
Nitesh
‎2008 Dec 06 7:11 AM
Hi,
you can use the following simple logic
IF itab-field2 is initial and
itab-field3 is not initial.
itab-field2 = itab-field3.
modify itab index sy-tabix.
endif.
Hope this helps you.
Raj
‎2008 Dec 06 7:15 AM
use this ogic:
if itab-field2 is initial and
itab-field3 is not initial
mov itab-filed3 to itab-field2.
modify itab index sy-tabix.
endif.
Hope this helps,
Rahul
Edited by: Rahul Kumar Sinha on Dec 6, 2008 8:17 AM
‎2008 Dec 06 7:17 AM
I have 10 fields like this and need to do same for all these fields...
‎2008 Dec 06 7:20 AM
use move corresponding fields statement.
Hope it will help u.
Regards,
Rahul
‎2008 Dec 08 11:36 AM