‎2007 Jul 30 7:58 AM
What would happen if the following code is executed
Select * from vbak.
commit work .
Endselect.
‎2007 Jul 30 7:59 AM
Hi,
It will show Error that 'Statement is not Accessible'.
Regards,
Padmam.
‎2007 Jul 30 8:00 AM
Hi
To apply the changes made to the runtime objects of persistent classes to the actual persistent objects in the database, execute the COMMIT WORK statement. (Alternatively, use COMMIT WORK AND WAIT or SET UPDATE TASK LOCAL). Unless you are executing an object-oriented transaction from within the Transaction Service, you must include the COMMIT WORK statement explicitly in the program. Otherwise, it is encapsulated in the Transaction Service. (If you explicitly include the COMMIT WORK statement as described here, the t op-level transaction runs in compatibility mode).
The function of the COMMIT WORK statement is extended when you use it in conjunction with Object Services. Before COMMIT WORK closes the SAP LUW and triggers an update, it calls internal methods of the Persistence Service. These methods bundle the changes made to managed objects of the Persistence Service and pass them to a special update function module using CALL FUNCTION ... IN UPDATE TASK. Thus the Persistence Service works with traditional update methods. The update module is usually registered after any update modules that have already been registered. The update is then triggered and the update task executes the update module in the order in which they were registered.
Reward all helpfull answers
Regards
Pavan
‎2007 Jul 30 8:03 AM
This code will give dump.you should not commit before executing dababase selection.
you can do like...
select * from vbak.
endselect.
commit work .
Rewards the point if helpful.
‎2007 Jul 30 8:08 AM
First of all u haven't declared a target area where the data will be stored.
It will give syntax error.
and if u declare the internal table also, runtime error will occur because of the commit statement as it is not able to perform database selection fully.
reward if useful
anju