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

INCREMENTING

Former Member
0 Likes
1,295

HI ALL

i'm have a field PINCR which holds the value 10 n i've to move this value to another field ANFPS n the value of ANFPS should increment by 10 .

like

10

20

30...

in table conrol

can u please find me the solution .

regards

suprith

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
968

Hi Suprith,

In the Internal Table that you are passing to the Table control, put another field ANFPS. And Loop this table and write

itab-ANFPS = itab-ANFPS + itab-PINCR.

This should be passed to the TAB Control.

5 REPLIES 5
Read only

Former Member
0 Likes
968

Hi,

use

ANFPS = PINCR + 10.

Sandeep Kaushik

Read only

Former Member
0 Likes
969

Hi Suprith,

In the Internal Table that you are passing to the Table control, put another field ANFPS. And Loop this table and write

itab-ANFPS = itab-ANFPS + itab-PINCR.

This should be passed to the TAB Control.

Read only

Former Member
0 Likes
968

I have the same in my program which will have similar to VA01 salesorder.

Sort itab by posnr by descending.

read table itab index 1.

l_posnr = itab-posnr.

with in internal table....when ever u r entering a new record use

l_posnr = l_posnr + 10.

itab-posnr = l_posnr .

Read only

Former Member
0 Likes
968

hi,

try this:

data : begin of itab occurs 0,

i1 type i,

i2 type i,

end of itab.

*

do 10 times.

itab-i1 = 10.

itab-i2 = itab-i1 * sy-index.

append itab.

enddo.

*

loop at itab.

write: / itab-i1, itab-i2.

endloop.

regards, Dieter

Read only

Former Member
0 Likes
968

hi suprith,

take a feild in your internal table and fill it by the desired values ,

that is simpally can do by using a loop on the internal table and by using the modify statement. and then use that table in the table control..

USE THIS AFTER THE SELECT QUERY.

READ TABLE I_TEMP INDEX 1.

i_temp-ANFPS = i_temp-PINCR .

modify i_temp.

loop at i_temp.

i_temp-ANFPS = i_temp-ANFPS + 10.

modify i_temp.

endloop.

REWARD THE POINTS