Sie sind auf Seite 1von 2

08/12/2014

ABAPKeywordDocumentation

SAPNetWeaverASABAPRelease702,©Copyright2010SAPAG.Allrightsreserved.

CALLFUNCTION­INUPDATETASK

Syntax

CALL FUNCTION update_function IN UPDATE TASK [EXPORTING p1 = a1 p2 = a2 [TABLES t1 = itab1 t2 = itab2

Extras:

]

].

1

EXPORTING p1 = a1 p2 = a2

2

TABLES t1 = itab1 t2 = itab2

Effect

Thisstatementregisterstheupdatefunctionmodulespecifiedinupdate_function.update_functionmustbe

acharacter­likefield,whichcontainsthenameofanupdatefunctionmoduleinuppercaselettersduringexecutionof

thestatement.

AnupdatefunctionmoduleisafunctionmoduleforwhichthepropertyupdatemoduleisflaggedinFunctionBuilder.

Theregistrationofanupdatefunctionmoduleisanessentialpartoftheupdatetask.

Thefunctionmoduleisnotexecutedimmediately,butisscheduledforexecutioninaspecialworkprocess(update workprocess).Todothis,thenameofthefunctionmoduleandtheactualparameterspassedaresavedtothe databasetablesVBMODandVBDATA,whicharemanagedbyVBHDR.Ifthestatementisexecutedduringthe updatetask,theadditionIN UPDATE TASKisignored.

IfthestatementSET UPDATE TASK LOCALisexecutedbeforeregistrationofanupdatefunctionmoduleinthe currentSAPLUW,registrationtakesplaceintheABAPmemoryratherthanonthedatabase,andforthecurrentwork process.

TheactualexecutionistriggeredbythestatementCOMMIT WORK.Theformalparametersofthefunctionmodule receivethevaluesoftheactualparametersfromthedatabasetableVBLOG.Afunctionmodulethatisregistered morethanonceisalsoexecutedmorethanoncewiththeassociatedparametervalues.If,duringtheexecutionofthe currentprogram,thestatementCOMMIT WORKisnotexecutedaftertheregistrationofafunctionmodule,thenthe functionmoduleisnotexecutedandtheassociatedentriesaredeletedfromthecorrespondingdatabasetableswhen theprogramends.ThestatementROLLBACK WORKdeletesallpreviousregistrationsforthecurrentSAPLUW.

SystemFields

Thesy­subrcsystemfieldisundefinedafterthestatementCALL FUNCTION executed.

Notes

IN UPDATE TASKis

08/12/2014

ABAPKeywordDocumentation

Anydatabasecommitsordatabaserollbacksthatoccurwithintheupdatecanceltheupdate.

Ifanerroroccursduringtheupdate,theupdateworkprocessexecutesadatabaserollback,logsthisinthe

correspondingdatabasetables,andnotifiestheuserwhoseentriescreatedtheentriesbySAPMail.Afterthe

causeoftheerrorhasbeenresolved,thecanceledentriescanbeupdatedagain.

Whenhandlingtheregistrationentriesinthedatabasetables,notethattheyaresubjecttotheregular

administrationrulesforadatabaseLUW.Forexample,thedatabaseLUWisendedbyadatabaserollback,

thenallregistrationentriesofthecurrentdatabaseLUWaredeleted.

WhenanupdatefunctionmodulesisregisteredusingCALL FUNCTION

dataisexportedinternallytoadataclusterusingEXPORTandisimportedagainwhenexecutingthefunction

modulewithIMPORT.Ifthedatatypesoftheexportedactualparametersdonotmatchthetypingoftheformal

parameterofthefunctionmodule,theexceptionsdocumentedinIMPORTmayberaised.

IN UPDATE TASK,therelevant

Addition1

EXPORTING p1 = a1 p2 = a2

Addition2

TABLES t1 = itab1 t2 = itab2

Effect

TheadditionsEXPORTINGandTABLEShavethesamesyntaxandmeaningasintheparameter_listofthe

generalfunctionmodulecall,exceptthatforEXPORTING,noreferencevariablesordataobjectsthatcontainreference

variablescanbespecifiedasactualparameters.

Whenpassinginternaltableswithnon­uniquetablekeys,theorderoftheduplicaterowsinrelationtothesekeysisnot

retained.

Note

TheadditionsIMPORTING,CHANGINGandEXCEPTIONSofthegeneralfunctionmodulecallmaybespecified,but

theyareignoredduringtheexecution.Theadditionsfordynamicparameterpassingarenotallowed.