Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help me to do build the internal table data

Former Member
0 Likes
796

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
774

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.

5 REPLIES 5
Read only

Former Member
0 Likes
774

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

Read only

Former Member
0 Likes
774

Please close this one as you opened another one with the same issue.

Regards,

Srinivas

Read only

former_member186741
Active Contributor
0 Likes
774

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.

Read only

Former Member
0 Likes
775

In ur Itab,

loop at itab.

Itab-F3 = some value.

Modify Itab

transporting F3

where

F1 = itab-F1

and F2 = Itab-F2.

endloop.

Read only

0 Likes
774

Can you please close this post if answered?

Thanks,

Srinivas