0% found this document useful (0 votes)
169 views6 pages

Commit (Abap Keyword)

The document discusses the ABAP keyword COMMIT and its use and effects in committing database changes. COMMIT ends a logical unit of work and makes database changes permanent, releasing locks and closing cursors. It also calls any subroutines specified with PERFORM ON COMMIT and processes background tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
169 views6 pages

Commit (Abap Keyword)

The document discusses the ABAP keyword COMMIT and its use and effects in committing database changes. COMMIT ends a logical unit of work and makes database changes permanent, releasing locks and closing cursors. It also calls any subroutines specified with PERFORM ON COMMIT and processes background tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

08/12/2014

COMMIT(ABAPKeyword)

sapbrainsonline.com
Search
PrimaryMenu

Skiptocontent

HOME
ABAPTutorial
SAPDictionary
ABAPSyntax
ABAPSourceCodes&SampleProjects
ALV(ABAPListViewer)Tutorial
SAPABAPOBJECTSTutorials
SAPMENUPAINTER&SCREENPAINTERTUTORIAL
SAPUSEREXITStutorial
LSMW
SAPBDC
SapSMARTFORMS
SAPSCRIPTStutorial
SAPModules
SapMMModuleTutorial
SAPCOTutorial
SAPCrossApplicationTutorials
SAPFIModule
SAPHRModule
SAPLogistics
SAPPM
SAPPPModule
SAPPSModule
SAPQMModule
SAPSDModule
SAPTreasuryModule
SAPWarehouseManagement
SAPWORKFLOW
SAPCTS
SAPITS
SAPALE
SAPIDOCTutorial
SAPEDITutorial
SAPBAPITutorial
Searchfor: Search

Search

COMMIT(ABAPKeyword)

http://sapbrainsonline.com/abaptutorial/syntax/commitabapkeyword.html

1/6

08/12/2014

COMMIT(ABAPKeyword)

COMMIT(ABAPKeyword)introduction&details

COMMIT
Basicform
COMMITWORK.
Addition
AND
WAIT
Effect
Executesadatabasecommitandthusclosesalogical
processingunitorLogicalUnitofWork(LUW)(seealsoTransactionprocessing
).Thismeansthat
alldatabasechangesaremadeirrevocableandcannot
bereversedwithROLLBACKWORKand
alldatabaselocksare
released.
COMMITWORKalso
callsthesubroutinesspecifiedby
PERFORMONCOMMIT,
executesasynchronouslyanyupdaterequests(see
CALLFUNCTIONINUPDATETASK)specifiedinthesesubroutinesorstarted
justbefore,
processesthefunctionmodulesspecifiedinCALLFUNCTION
INBACKGROUNDTASK,
http://sapbrainsonline.com/abaptutorial/syntax/commitabapkeyword.html

2/6

08/12/2014

COMMIT(ABAPKeyword)

cancelsallexistinglocks(seeSAPlocking
concept)ifnoupdaterequestsexist,
closesallopendatabasecursors
(seeOPENCURSOR)and
resetsthetimeslicecounterto0.
COMMIT
WORKbelongstotheOpenSQLcommandset.
Returncodevalue
TheSYSUBRC
issetto0.
Notes
AllsubroutinescalledwithPERFORMONCOMMIT
areprocessedintheLUWconcludedbytheCOMMITWORKcommand.AllV1update
requestsspecifiedinCALLFUNCTIONINUPDATETASKarealsoexecutedinone
LUW.WhenallV1updaterequestshavebeensuccessfullyconcluded,theV2
updaterequests(updatewithstartdelayed)areprocessed,eachinoneLUW.
Paralleltothis,thefunctionmodulesspecifiedinCALLFUNCTIONIN
BACKGROUNDTASKareeachexecutedinoneLUWperdestination.
COMMITWORK
commandsprocessedwithinCALLDIALOGprocessing
executeadatabase
commit(seeabove),
closeallopendatabasecursors,
resetthetime
slicecounterand
callthefunctionmodulesspecifiedbyCALLFUNCTION
IN
BACKGROUNDTASKintheCALLDIALOGprocessing.
However,subroutines
andfunctionmodulescalledwithPERFORMONCOMMITorCALLFUNCTIONIN
UPDATETASKintheCALLDIALOGprocessingarenotexecutedinthecalling
transactionuntilaCOMMITWORKoccurs.
SinceCOMMITWORKclosesallopen
databasecursors,anyattempttocontinueaSELECTloopafteraCOMMITWORK
resultsinaruntimeerror.Forthesamereason,aFETCHafteraCOMMITWORKon
thenowclosedcursorsalsoproducesaruntimeerror.Youmustthereforeensure
thatanyopencursorsarenolongerusedaftertheCOMMITWORK.
Withbatch
inputandCALLTRANSACTIONUSING,COMMITWORKsuccessfullyconcludesthe
processing.
Addition
ANDWAIT
Effect
http://sapbrainsonline.com/abaptutorial/syntax/commitabapkeyword.html

3/6

08/12/2014

COMMIT(ABAPKeyword)

Theaddition
ANDWAITmakestheprogramwaituntilthetypeV1updateshavebeen
completed.
Thereturncodevalueissetasfollows:
SYSUBRC=
0Theupdatewassuccessfullyperformed.
SYSUBRC<>0Theupdatecould
notbesuccessfullyperformed.
Note
Runtime
errors
COMMIT_IN_PERFORM_ON_COMMIT:COMMITWORKisnotallowedinaFORM
callledwithPERFORMONCOMMIT.
COMMIT_IN_POSTING:COMMITWORKisnot
allowedintheupdatetask.

Villa Plots in North


BLR
Le LexuZ StoneView an
Integrated Residential
Community. Know More!

0
Like

Postnavigation
PreviousPostCNT(ABAPKeyword)NextPostCOMMUNICATION(ABAPKeyword)

FreeSubscribebyEmail

JOIN

QuickGuides
http://sapbrainsonline.com/abaptutorial/syntax/commitabapkeyword.html

4/6

08/12/2014

COMMIT(ABAPKeyword)

SAPBasis
SAPHANA
Crystalreports
SAPLUMIRA
PredictiveAnalysis
EnterprisePerformanceManagement
SAPFiori
SAPR3ARCHITECTUREINTRODUCTION
SAPCertificationHelp&Details
SAPInterviewQuestions
HRTables&Infotypes
SAPHELP
Syam Sasi
Follow

sapbrainsonline.com
Like

781peoplelikesapbrainsonline.com.

Facebooksocialplugin

Latest
SAPSOP(Sales&OperationsPlanning)Tutorials,TablesandTcodes
SAPHANACloudPlatformfreedeveloperaccountcreation
SAPConsignmentstocksProcessingTutorial,TablesandTcodes
SAPCOPA(profitabilityanalysis)Tutorial,tablesandTransactioncodes
SAPSalesSupport(SDCAS)ModuleTutorial,tablesandTransactioncodes

ImportantTables
MaterialMasterTables
SDTables
HRTables
FI&COtables
SAPSystemtables
http://sapbrainsonline.com/abaptutorial/syntax/commitabapkeyword.html

5/6

08/12/2014

COMMIT(ABAPKeyword)

TCODES
SDTransactionCodes
MMTransactionCodes
HRTransactionCodes
FITransactionCodes
ABAPTransactionCodes
Home|Contact|PrivacyPolicy|Sitemap|Google+
Disclaimer:Alloftheproductnamesherearetrademarksoftheirrespectivecompanies.Thesitesapbrainsonline.comisnot
affiliatedwithSAPAG.Useinformationonthissiteatyourownrisk.Thissitedoesnothostanyfilesonitsserver.Ifany
complaintsaboutthepostspleasecontactusatsapbrain.support@gmail.com.20132014

http://sapbrainsonline.com/abaptutorial/syntax/commitabapkeyword.html

6/6

You might also like