‎2007 Sep 05 1:17 PM
Hi All,
I have to read a table control which will be filled by end user and update the same in a custom table. Im aware of displaying a table control with data from a table. But im not sure how to capture and move data from screen (i.e. table control) to custom table. Please let me know how to do it?
Regards,
Vinny
‎2007 Sep 05 5:50 PM
‎2007 Sep 05 5:46 PM
Basically the data transport is done in the PBO and PAI of your screen
PBO:
LOOP AT internal_table
INTO wa_for_internal_table
WITH CONTROL table_control_name
Here the fields of structure wa_for_internal_table are the ones you specify in the table control as columns (screen painter).
This loop takes care of the data tranport from the internal table to the table control.
The user can now make changes on the table control (change/add/delete) and when he hits enter the 'internal_table' contains the correct values.
PBO:
loop at internal_table.
the fields of structure wa_for_internal_table contain the values from the dynpro for each line of the table control.
endloop.
Make sure that you use wa_for_internal_table-field1, wa_for_internal_table-field2 etc when you define the table control columns.
I hope that helps.
Michael
‎2007 Sep 05 5:49 PM
You can either look at internal_table when you hit save (assumed it is defined globally in your program) or at the time when you loop at internal_table in the PAI move the data out of wa_for_internal_table into whatever internal table you need it to be in.
Regards,
Michael
‎2007 Sep 05 5:50 PM
‎2007 Sep 07 1:07 PM