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 custom table through ABAP

Former Member
0 Likes
16,864

Hi,

I have a general question.

How do we update the custom table through ABAP. Like any database, just using update statement, we can update custom table. Because I need to do some update to the custom table using ABAP. Please let me know the procedure.

Thanks.

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
6,587

Hi,

Yes.You can use update/modify statements.

UPDATE dbtab SET f1 = value1 where condition.

UPDATE dbtab FROM TABLE itab.

Here from itab internal table, you can update the ztable.

But if you are not sure wherether the particular record exists in ztable,you can use modify statement. It will insert the record if it is not there already.If record exists in ztable,it will update the record.

Modify dbtab from table itab.

3 REPLIES 3
Read only

Former Member
0 Likes
6,587

Deepan,

If you need to get the data from some other tables and have to update the ztable then you can go with program by writing Insert/Modify/Update statements.

Otherwise just maintain the table maintanance generator and Create the entries from SM30 Transaction.

Regards,

Satish

Read only

Former Member
0 Likes
6,587

You may do it like this :

UPDATE ztable SET column_a = 'abc'

column_b = column_b + '55'

WHERE column_a = 'test'.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
6,588

Hi,

Yes.You can use update/modify statements.

UPDATE dbtab SET f1 = value1 where condition.

UPDATE dbtab FROM TABLE itab.

Here from itab internal table, you can update the ztable.

But if you are not sure wherether the particular record exists in ztable,you can use modify statement. It will insert the record if it is not there already.If record exists in ztable,it will update the record.

Modify dbtab from table itab.