Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update table using table control data

Former Member
0 Likes
520

Hi All,

Please let me know how to update the table with table control data from the screen??

Thanks & Regards

Santhosh

3 REPLIES 3
Read only

Former Member
0 Likes
391

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?

Read only

Former Member
0 Likes
391

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

Read only

Former Member
0 Likes
391

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