‎2007 Oct 30 5:58 PM
i am using a table control to display data in the form of a table in a dialog program . I have 4 fields on the table control . after displaying the data based on the input criterial , i should be able to modify a value on the screen and should be stored internally in a table . How do i do that?
‎2007 Oct 30 6:02 PM
Hi,
you need to have table control in edit mode in the screen (for desired columns which user can change). Once user modifies column values, and does any action (like press a button), you can validate user entries in CHAIN ENDCHAIN and also upload those values to your internal table.
http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
http://hometown.aol.com/skarkada/sap/table_control/table_control.htm
ashish
‎2007 Oct 30 9:04 PM
i displayed the data on the table control on the screen . I need to modify a field value now . How do i retrieve the new value in the program . Can someone send me a sample code for that ?
‎2007 Oct 30 9:13 PM
Hi,
As per the table control logic, in PAI you will be looping at the Table control and passing the data to internal table.
For eg : This is a piece of code from PAI
LOOP WITH CONTROL TCTRL_USERDATA.
MODULE EXTRACT_USERDATA.
ENDLOOP.
Here Table control data is moved back to internal table in module EXTRACT_USERDATA.
In this way you can get values entered on screen to your internal table.
Hope this helps.
ashish
‎2007 Oct 30 9:41 PM
Hi,
you don't need to do any code... when you modify your values on table control they are automaticaly passed to your program variables after PAI...
cya,
dimas