Hi Gurus,
I'm in a situation where in i have to calculate the values of one column and write the result in another coulmn,
Please anybody help me,
Suggestios and code snippets are welcome.
Regards.
Hi Krupa,
This program is helpfull, But for me the result of one column should automatically get updated
into another column.
Any suggestions.
thanks
In PBO modify the internal table by copying the col1 data to col2.Add this code in the PBO module which should come before the table control internal table loop in the flow logic.
automatically not possible you have to assign logic to col.2
PROCESS AFTER INPUT.
LOOP AT itab.
field : zline-col1,
zline-col2.
MODULE modify_tab.
ENDLOOP.
module modify_tab input.
zline-col2 = calculation with the help of zline-col1.
read table itab into wa_itab index cntrl-CURRENT_LINE .
wa_itab-col2 = zline-col2.
modify itab from wa_itab transporting col2.
endmodule.
zline is structure of table control line on the screen.
cntrl is the name of the the control u define in top include.
Also in PBO loop make sure you set back data from itab to screen. ( I assume this is already being done )
Basic - locked.
Rob