11-01-2008 4:28 PM
Hi all,
I have an requirement like this, i have a internal table like the one below, iam fetching the values in a final internal table from other internal tables used in my report .Now i want to fill the fields f2, f3 and f4 in such way that based upon field f1 i want to fill other fields.Could you please let me know how to acheive this.Like i want to do a compare on the field f1 and then if the condition is satisfied i want to fill f2,f3& f4 correspondingly.For eg if f1 is 4, f2 should be poulated on the second row, if f1 is 1 f2 should be poulated on the first row similar to that.
f1 f2 f3 f4
1 0 0 0
4 0 0 0
3 0 0 0
Thanks in advance..
Best Regards
Meenakshi
11-01-2008 4:48 PM
Hi Meena,
Have you tried with any CASE statements.
According to your values how you next internal table records has to be filled based on your first record write using CASE syntax.
Cheers!!
VEnk@
11-01-2008 4:48 PM
Hi Meena,
Have you tried with any CASE statements.
According to your values how you next internal table records has to be filled based on your first record write using CASE syntax.
Cheers!!
VEnk@
11-01-2008 5:09 PM
Hello,
Please try to use Condition statements
For eg: case
loop at gt_finaltab in to wa_finaltab.
read table gt_yourtab into wa_yourtab "<<< Internal Table you have mentioned
case wa_yourtab-f1
when 1.
wa_finaltab-field1 = wa_yourtab-f2.
when 2.
wa_finaltab-field2 = wa_yourtab-f3.
when 3.
wa_finaltab-field3 = wa_yourtab-f4
..................
endcase
endloop
Regards,
Lijo
11-02-2008 6:08 AM
hi ,
loop at ohter table .
read table itab with key f1 = ohter table-f1 .
move corresponding itab into othertable .
transport othertable.
endloop.
Thanks and regards.
Priyank dixit
02-02-2010 1:52 PM