2005 Nov 25 4:57 PM
My internal table contains 3 fields f1 f2 f3
f2 and f2 has given i want to put the out put in f3 please help me
F1 F2 F3
123 546
768 865
222 229
222 229
222 229
345 888
345 864
345 756
667 233
ouput will be in internal table as follow:
F1 F2 F3
123 546 10
768 865 10
222 229 10
222 229 10
222 229 10
345 888 10
345 864 20
345 756 30
667 233 10
f3 will be start with 10 and where f1 repeats and f2 doesn't then increment with 10.
2005 Nov 28 6:02 AM
In ur Itab,
loop at itab.
Itab-F3 = some value.
Modify Itab
transporting F3
where
F1 = itab-F1
and F2 = Itab-F2.
endloop.
My internal table contains 3 fields f1 f2 f3
f2 and f2 has given i want to put the out put in f3 please help me
F1 F2 F3
123 546
768 865
222 229
222 229
222 229
345 888
345 864
345 756
667 233
ouput will be in internal table as follow:
F1 F2 F3
123 546 10
768 865 10
222 229 10
222 229 10
222 229 10
345 888 10
345 864 20
345 756 30
667 233 10
f3 will be start with 10 and where f1 repeats and f2 doesn't then increment with 10.
2005 Nov 25 5:00 PM
data: vf1 type f1,vf2 type f2.
data: v_10 type i.
loop at itab.
if vf1 is initial.
v_f1 = 10.
vf1 = itab-f1.
itab-f3 = v_10.
else.
if vf1 = itab-vf1.
itab-f3 = v_10 + 10.
esle.
itab-f3 = 10.
endif.
endif.
modify itab.
endloop.
hope this will help you
2005 Nov 25 5:01 PM
Please close this one as you opened another one with the same issue.
Regards,
Srinivas
2005 Nov 28 4:16 AM
try this:
seq = 0.
loop at tb1.
at new f2.
seq = seq + 10.
endat.
at new f1.
seq = 10.
endat.
tb1-f3 = seq.
modify tb1.
write:/ tb1-f1,tb1-f2,tb1-f3.
endloop.
2005 Nov 28 6:02 AM
In ur Itab,
loop at itab.
Itab-F3 = some value.
Modify Itab
transporting F3
where
F1 = itab-F1
and F2 = Itab-F2.
endloop.
2005 Nov 28 3:55 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |