‎2006 Mar 07 5:29 AM
Hi Friends,
Is there any FM to update the database table in ABAP?
Thanx in Advance.
‎2006 Mar 07 5:30 AM
‎2006 Mar 07 5:32 AM
To update DB table from internal table:
UPDATE DBTABLE FROM itab.
‎2006 Mar 07 5:33 AM
use update dbtab.
set set as u required.for update query just click f1 on update.
‎2006 Mar 07 5:36 AM
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
‎2006 Mar 07 5:33 AM
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.
‎2006 Mar 07 5:34 AM
Y u need a function module?
Instead U can use UPDATE .....
DO a F1 on update u can get the syntax and sample program.
‎2006 Mar 07 5:36 AM
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
‎2006 Mar 07 5:37 AM
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.
‎2006 Mar 07 5:44 AM
‎2006 Mar 07 5:49 AM
‎2006 Mar 07 5:50 AM
‎2006 Mar 07 5:51 AM
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
‎2006 Mar 07 5:56 AM
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