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

Former Member
0 Likes
1,348

Hi Friends,

Is there any FM to update the database table in ABAP?

Thanx in Advance.

13 REPLIES 13
Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,320

UPDATE statement itself upadtes

UPDATE DBTAB.

Read only

0 Likes
1,320

To update DB table from internal table:

UPDATE DBTABLE FROM itab.

Read only

0 Likes
1,320

use update dbtab.

set set as u required.for update query just click f1 on update.

Read only

0 Likes
1,320

Hi ,

I know using update statement we can update the table.

But i want to know for my knowledge is there any FM (i think there is some FM in BAPI) to update db table.

Thanks & Regards

Read only

Former Member
0 Likes
1,320

Hi jak,

1. use like this.

loop at itab.

<b>modify DBTAB from itab.</b>

endloop.

2. This will take care of two things automatically :

3. Depending upon the primary key of that table,

if the record is found, then UPDATE will

be done AUTOMATICALLY

4. If the record is not found,

then APPEND will be done automatically.

regards,

amit m.

Read only

Former Member
0 Likes
1,320

Y u need a function module?

Instead U can use UPDATE .....

DO a F1 on update u can get the syntax and sample program.

Read only

Former Member
0 Likes
1,320

hi Jak,

you can update like this..

a sample

UPDATE SFLIGHT SET PLANETYPE = 'A310'
PRICE = PRICE - '100.00'
WHERE CARRID = 'LH' AND CONNID = '0402'.

or use..

UPDATE SPFLI FROM TABLE ITAB..

regards

satesh

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,320

Hi,

You can use Update or MOdify statement to accomplish it.

Update db from table itab.

This will update the records in database table according to the match (primary key values) in internal table.That is it will update fields other than primary key for the matching primary key value record.

Modify db from table itab.

This will insert new records in database table if no matching records( primary key values ) found in db table for internal table itab.If matching records found,it will update the existing db record.

Read only

0 Likes
1,320

RSDU_TABLE_UPDATE_DB6, CHECK THIS

Read only

Former Member
0 Likes
1,320

hi

u can update a table using Update statements

Read only

Former Member
0 Likes
1,320

hi

u can update a table using Update statements

Read only

Former Member
0 Likes
1,320

HI

THE VARIOUS METHODS AVAILABLE TO UPDATE A TABLE IS DESCRIBED UNDER THE LINK

<a href="http://www.geocities.com/SiliconValley/Campus/6345/update.htm">http://www.geocities.com/SiliconValley/Campus/6345/update.htm</a>

IF THIS FINDS USEFUL PLEASE REWARD POINTS

REGARDS,

ANOOP

Read only

Former Member
0 Likes
1,320

Hi,

There are FMs / BAPI's to update the standard tables.

but these are table specific.

you can search in SE37 by giving update and pressing F4.

you can also use UPDATE and MODIFY statements to update the db tables. but it is not recommended to update standard tables directly. you should use BAPI's / FM's to update the table.

ex.

UPDATE dbtab SET field1 = value1 [where...].

MODIFY dbtab from itab.

hope this helps..

Regards,

Shashank