‎2008 Dec 16 3:05 AM
Hi everyone,
I have a question: I need to update database in a SAP LUW. And I develop a method in my class
to update the database.how can I update database in SAP LUW.
‎2008 Dec 16 3:11 AM
Hi Aaron
Normally you use INSERT, UPDATE, MODIFY, and DELETE to modify or update the database and check this link for more info:
http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4bfa79e11d1950f0000e82de14a/content.htm
Neha
‎2008 Dec 16 3:11 AM
Hi Aaron
Normally you use INSERT, UPDATE, MODIFY, and DELETE to modify or update the database and check this link for more info:
http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4bfa79e11d1950f0000e82de14a/content.htm
Neha
‎2008 Dec 16 3:13 AM
Use can use "COMMIT WORK " and Database operate command SQL
Within an LUW, database changes are not made until after a database commit. Prior to this, any database change can be canceled by a database rollback.
In the R/3 System, a database commit is triggered either automatically or by the ABAP/4 command COMMIT WORK or the appropriate Native SQL command for the database system.
Similarly, a database rollback is triggered either automatically or by the ABAP/4 command ROLLBACK WORK or the appropriate Native SQL command for the database system.
After the COMMIT WORK has been executed, the event RAISE_TRANSACTION_FINISHED of the class CL_SYSTEM_TRANSACTION_STATE with parameter value CL_SYSTEM_TRANSACTION_STATE=>COMMIT_WORK is triggered. However, this does not apply to the COMMIT WORK at the end of the update.
Edited by: Jack Wu on Dec 16, 2008 11:13 AM
‎2008 Dec 16 3:28 AM
hi,pls refer this link
http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4bfa79e11d1950f0000e82de14a/content.htm
thanks
‎2008 Dec 16 5:06 AM
Use a function module for this requirement.
function module attributes > normal Function module with start immediately radio button checked.
While calling this FM..
the syntax wud like -> CALL FUNCTION 'XYZ' in update task..
within this FM you can write the update database commands.