07-02-2007 10:27 AM
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
07-02-2007 10:35 AM
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.
07-02-2007 10:30 AM
07-02-2007 10:35 AM
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.
07-02-2007 10:41 AM
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 .
07-02-2007 10:43 AM
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
07-02-2007 10:50 AM
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