‎2008 Nov 12 2:52 PM
Hi All,
Please let me know how to update the table with table control data from the screen??
Thanks & Regards
Santhosh
‎2008 Nov 15 4:50 AM
Hi,
Table u r referring is it database table or internal table??
Also let me know how have u created the table control whether manually or using wizard?
‎2008 Nov 15 5:25 AM
is this what you are searching on SCN,and not able to succeed?
https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=howtoupdatedatabasetablefromtable+control&adv=false&sortby=cm_rnd_rankvalue
‎2008 Nov 15 5:27 AM
Hi,
The general technique is that on clicking of a button(usually the SAVE button)or a particular identifiable user action .......in the PAI of screen flow logic ,we write the code to update the standard table or Ztable ....using modify ABAP statement.
We can modify the database table directly from an internal table which is the preferred method or we can take each line in the internal table or work area and modify the database table as situation demands.
The PAI of the screen containing the table control will consist of validations and after all the validations are done........ write a module which updates the databsae table..remember that the internal table must have the same structure as that of the table to be updated
eg: to update table VBAK the internal table should be preferrably
int_vbak type table of vbak for an internal table of wa_vbak type vbak for a workarea...
Whatever data manipulations we do...in the end the internal table to update the database table should have the same structure/fields and must contain data...so we can always do a check like
if not int_vbak[] is initial.
Modify vbak from int_vbak.
endif.
Hope it helps
Regards
Byju