Académique Documents
Professionnel Documents
Culture Documents
performoncommit|SCN
GettingStarted Newsletters
Hi,Guest
LogOn
JoinUs
Store
SearchtheCommunity
Products
Services&Support
AboutSCN
Downloads
Industries
Training&Education
Partnership
DeveloperCenter
Activity
LinesofBusiness
UniversityAlliances
Events&Webinars
Innovation
Browse
Communications
Actions
THISDISCUSSIONISLOCKED
9Replies Latestreply:Jun17,20161:14PMbyTaryckBENSIALI
Share
Tweet
Like 0
heliosgarcia
Sep20,200712:47PM
performoncommit
ThisquestionisNotAnswered.
Hi,
canyoushowmeanexampleof"performoncommit"withvariables.
7062Views
Topics:abap
AverageUserRating
(0ratings)
Re:performoncommit
Hi
Thisisusedtocommitthechangestothedatabase
whenyouwritesomecodeinthePERFORM..ONCOMMIT
subroutine,allthestatementsreagrdingdatabaseupdatearecommittedonlywhenyouwriteexplicit
COMMITWORKandforRollbackROLLBACKhastobeused.
Regards
vasu
Like(0)
Re:performoncommit
Hi,
checkthebelowlink..
http://www.sts.tuharburg.de/teaching/sap_r3/ABAP4/commit.htm
Rewardpointsifufinduseful..
Regards,
Nagaraj
Like(0)
GuestSep20,200712:54PM (inresponsetoheliosgarcia)
Re:performoncommit
hI
LUWisalogicalunitofworkandisthespanoftime
duringwhichanytransactionisupdatedinallornothing
manneri.ethey'vebeenupdatedcompletelyrocommitedor
thrownaway(RollBack).AnLuwisnothingbutadatabase
http://scn.sap.com/thread/567372
1/3
9/13/2016
performoncommit|SCN
LUWindatabaseisupdatedfromonescreentoanother
screenwithinatransactionwhichdoesnotlastlongerand
inSAPLUW,thesystemperfomsdatabasefromone
transactiontoanotherandthislastlongerandisusually
terminatedbytheprogrammerbyissuingCommitwork
statement.
REWARDIFUSEFULL
Like(0)
Re:performoncommit
hihelios,
changethiscodeaccordingtoyourreqandtry.
performupdate_zproc_files.
formupdate_zproc_files.
wa_zproc_filesmandt=symandt.
wa_zproc_filesbatch=v_batch.
wa_zproc_filesrcvdt=v_rcvdt.
wa_zproc_filestotdoc=v_totdoc.
wa_zproc_filestotamt=v_totamt.
wa_zproc_filesprocessdate=sydatum.
wa_zproc_filesprocesstime=syuzeit.
appendwa_zproc_filestoi_zproc_files.
clearwa_zproc_files.
insertzproc_filesfromtablei_zproc_files.
ifsysubrceq0.
commitwork.
endif.
refreshi_zproc_files.
endform."update_zproc_files
<i><b>Rewardpointsifuseful</b></i>
Like(0)
Re:performoncommit
Hi,
PERFORMONCOMMITroutinesarenotexecutedinthedialogmodule.
YoumustensurethatanysubroutinescalledusingONCOMMITcanbedelayeduntilthenext
COMMITWORKinthecallingprogram.Rememberthattheglobaldataofthedialogmoduleis
destroyedalongwiththeinternalsessionwhencontrolreturnstothecallingprogram.Consequently,
subroutinescalledusingPERFORMONCOMMITmustnotusethisglobaldata.
ThestatementPERFORMONCOMMITcallsasubroutineinthedialogworkprocess.However,itis
notexecuteduntilthesystemreachesthenextCOMMITWORKstatement.Here,aswell,theABAP
statementCOMMITWORKdefinestheendoftheSAPLUW,sinceallstatementsinasubroutine
calledwithPERFORMONCOMMITthatmakedatabasechangesareexecutedinthe
databaseLUWofthecorrespondingdialogstep.
TheadvantageofthisbundlingtechniqueagainstCALLFUNCTION...INUPDATETASKisbetter
performance,sincetheupdatedatadoesnothavetobewrittenintoanextratable.Thedisadvantage,
however,isthatyoucannotpassparametersinaPERFORM...ONCOMMITstatement.Datais
passedusingglobalvariablesandABAPmemory.Thereisaconsiderabledangerofdata
inconsistencywhenyouusethismethodtopassdata.
YoucanalsoputtheCALLFUNCTIONINUPDATETASKintoasubroutineandcallthesubroutine
with:
<b>PERFORMSUBROUTONCOMMIT.</b>
Ifyouchoosethismethod,thesubroutineisexecutedatthecommit.Thustherequesttorunthe
functionintheupdatetaskisalsologgedduringcommitprocessing.Asaresult,theparametervalues
loggedwiththerequestarethosecurrentatthetimeofthecommit.
Ex.
a=1.
PERFORMFONCOMMIT.
http://scn.sap.com/thread/567372
2/3
9/13/2016
performoncommit|SCN
a=2.
PERFORMFONCOMMIT.
a=3.
COMMITWORK.
FORMf.
CALLFUNCTION'UPD_FM'INUPDATETASKEXPORTINGPAR=A.
ENDFORM.
Inthisexample,thefunctionmoduleUPD_FMiscarriedoutwiththevalue3inPAR.Theupdatetask
executesthefunctionmoduleonlyonce,despitethetwoPERFORMONCOMMITstatements.Thisis
becauseagivenfunctionmodule,loggedwiththesameparametervalues,canneverbeexecuted
morethanonceintheupdatetask.Thesubroutineitself,containingthefunctionmodulecall,maynot
haveparameters.
Regards,
Bhaskar
Like(0)
Re:performoncommit
Hi,
Havealooktothisthread ONCOMMITABAPCLASSMETHOD
That'sprovidewaytotriggerclasseventoncommitanddonothavethedisadvantageyouclearly
explained.
Like(0)
Re:performoncommit
caniputthis?:
performupdate_dboncommitusingvar1var2.
Like(0)
Re:performoncommit
No.Whenusingoncommitsufixyoucannolongersetparameters.Youmuststoretheminan
otherway(asdecribedbefore)tobeabletoaccessthemwhentheperformiscalled.
Like(0)
Re:performoncommit
Nothisisnotallowed.
Like(0)
Share
SiteIndex
Privacy
Tweet
ContactUs
TermsofUse
http://scn.sap.com/thread/567372
Like 0
SAPHelpPortal
LegalDisclosure
Copyright
FollowSCN
3/3