Application Development 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: 

Table Control code for multiple records insertion to Ztable

Former Member
0 Kudos

Dear all

Can anybody send me the : Table Control code for multiple records insertion to a Ztable plz.....

Thnx

moni

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Moni,

Its pretty simple.

Behind your table control you have an internal table. Assuming that you have handled all the table control logic to ensure that your internal table accurately reflects the changes on the table control, then:

Its simply-> MODIFY dbtab FROM TABLE itab.

This will handle both inserts and updates. BUT you should not forget deletes!!!. If records are to be deleted you should maintain a seperate internal table with records to be deleted and then issue:

DELETE dbtab FROM TABLE itab.

Don't forget to commit work!!!

Hope that helps.

Brad

1 REPLY 1

Former Member
0 Kudos

Hi Moni,

Its pretty simple.

Behind your table control you have an internal table. Assuming that you have handled all the table control logic to ensure that your internal table accurately reflects the changes on the table control, then:

Its simply-> MODIFY dbtab FROM TABLE itab.

This will handle both inserts and updates. BUT you should not forget deletes!!!. If records are to be deleted you should maintain a seperate internal table with records to be deleted and then issue:

DELETE dbtab FROM TABLE itab.

Don't forget to commit work!!!

Hope that helps.

Brad