2007 Sep 03 4:47 AM
2007 Sep 03 4:52 AM
Hi,
commit work is useful to send the confirmation of changes done to data base..
usuually we use it like this
modify ztable from wa.
if sy-subrc eq 0.
<b>commit work.</b>
if we dont use it
then the data base changes will be done after the progam exectuion
if you use this commit work then , the changes will be done immediately after the execution of this statement
else.
roll back . " this is to with draw the changes done to database.
endif.
thanks & regards,
Venkatesh
2007 Sep 03 4:49 AM
Hi N Naresh
You will use this syntax in your program after you update , insert or delete data in the database . after that It like you confirm to change the data in the data base and you can not change it back again.
Regards
Wiboon
Message was edited by:
Wiboon Chaiyabutsakul
2007 Sep 03 4:51 AM
Hi,
It is to tell SAP to Update the tables as your confirm about the table contents/data.
If you are not sure about the data & you dont want to save it, then you can give ROLLBACK.
for eg.
You insert record in ZSD_SALES table.
Then you try to insert record in ZSD_DELIVERY table. But record already exists.
So you want to also remove data from ZSD_SALES table.
If you want to remove data then you will give ROLLBACK else you want to save the data in both tables then you will give COMMIT WORK.
2007 Sep 03 4:52 AM
Hi,
commit work is useful to send the confirmation of changes done to data base..
usuually we use it like this
modify ztable from wa.
if sy-subrc eq 0.
<b>commit work.</b>
if we dont use it
then the data base changes will be done after the progam exectuion
if you use this commit work then , the changes will be done immediately after the execution of this statement
else.
roll back . " this is to with draw the changes done to database.
endif.
thanks & regards,
Venkatesh