‎2009 Jul 16 11:55 AM
Hi Friends,
I want a logic if i populate value to 3 fields of a item table out of 5 fiels, i should pass X value to the corresponding fields of Xtable which is of same type of item table. same way i have to do for more than 10 table. if any one have implemented same before please help me.
Thanks
‎2009 Jul 16 12:01 PM
Hi
data: counter type i.
data: f1,f2,f3,f4,f5.
loop at it into wa.
clear: counter,f1,f2,f3,f4,f5.
if wa-f1 is not initial.
counter = counter + 1.
f1 = 'X'.
endif.
if wa-f1 is not initial.
counter = counter + 1.
f2 = 'X'.
endif.
if wa-f1 is not initial.
counter = counter + 1.
f3 = 'X'.
endif.
if wa-f1 is not initial.
counter = counter + 1.
f4 = 'X'.
endif.
if wa-f1 is not initial.
counter = counter + 1.
f5 = 'X'.
endif.
if counter ge 3.
clear xtable. "no workarea for this table.
xtable-f1 = f1.
xtable-f2 = f2.
xtable-f3 = f3.
xtable-f4 = f4.
xtable-f5 = f5.
append xtable.
endif.
endloop.i am sure with the above logic you can do for 10 fields or any number of fields.
Regards
Sajid
Edited by: shaik sajid on Jul 16, 2009 1:02 PM