Sei sulla pagina 1di 3

Search

Home Trai ni ngs Qui z Ti ps Tutori al s Functi onal Cert Q's I ntervi ew Q's Jobs Testi moni al s Adverti se Contact Us

SAP Virtual/Onsite
Trainings
Document Categories:
ABAPTM
AdobeForms
ABAPHR
ALE&IDocs
ALV
BAPI
BASIS
BSP
BusinessObjects
BusinessWorkflow
CRMNEW
LSMW
SAPScript/SmartForms
BI/BW
eXchangeInfrastructure(XI)
EnterprisePortals(EP)
eCATT
ObjectOrientedProgramming
SAPQuery
Userexits/BADIs
WebDynproforJava/ABAPTM
Others

What's New?
ABAPTestCockpitHOT
SAPABAPPragmas
UnderstandingSE32(ABAPText
ElementMaintenance)
CreatinganIDocFileonSAP
ApplicationServer
UnderstandingAdvancewith
dialogoptionofSAPWorkflow
SAPWorkflowScenario:
MaintenanceNotification
Approval
Enhancementstoastandard
class
WorkingwithFloatingFieldin
AdobeForms
InsertingdatafromInternalTable
intothestepSendMail
DisplayGLAccountlongtext
usingenhancementframework
Differencesbetween
polymorphisminJAVAand
ABAP
Passingmultilineparameters
fromanABAPClasseventtoa
Workflowcontainer
ConceptofReevaluateagents
foractiveworkitemsinSAP
Workflow
Dynamiccreationofcomponent
usageinABAPWebDynpro
AdobeForms:Displaysymbols
likecopyrightandothers
DeactivateHoldfunctionalityin
Purchaseorder(ME21N)
QuizonOOABAP
AddfieldsinFBL5NusingBADIs
TutorialonWidecasting
DefiningaRangeinModulePool
Program
Copyfieldsfromone
structure/tableintoanother
structure/table
SidePanelUsageinNWBC

Contribute?
Sample Specs

BHELOpenings
August'15
Exp:3to10Yrs,Sal:7Lto25L
PAApplyNow&GetMultiple
Interviews

Defining Custom Rules for use in SAP Workflow


ByRaghavaVakada,MouriTechSolutions

IwouldliketoexplainaboutcreatingcustomrulesinSAPWorkflow.Therulescanbecreatedor
changedusingthestandardSAPtransactionPFAC.Oncetherulesarecreatedyoucancallthese
rulesinanyworkflowviatherulecontainer.
InthisarticleIamcreatingarule,whichwillfindtheusersbasedonPositionid.Ihavecreateda
custom function module ZWF_FIND_USERS which will return me back a position under Asset
Analyst(HRP1001SOBID).Thecustomfunctioncreatedshouldhavethesameinterfaceasthat
oftheSAPstandardfunctionmoduleRH_GET_ACTORS.Thefollowingtableparametershaveto
existinthecustomfunctionmodule.
ACTOR_TABSTRUCTURESWHACTOR
AC_CONTAINERSTRUCTURESWCONT
Followingisthefunctionmodulecode:
FUNCTIONZWF_FIND_USERS.
*"
*"*"LocalInterface:
*"TABLES
*"ACTOR_TABSTRUCTURESWHACTOR
*"AC_CONTAINERSTRUCTURESWCONT
*"EXCEPTIONS
*"NOAGENT_FOUND
*"
INCLUDE<CNTN01>.
DATA:POSITION_IDLIKEZBUSAREAOBJID,
LT_HOLDERSTYPESTANDARDTABLEOFSWHACTOR,
LWA_HOLDERSTYPESWHACTOR,
LWA_USERSTYPESTANDARDTABLEOFHRP1001,
WA_USERSTYPEHRP1001,
NUM_LINESTYPEI.
*Readvaluesassignedtotherulecriteria
SWC_GET_ELEMENTAC_CONTAINER'POSITION_ID'POSITION_ID.
SELECT*FROMHRP1001INTOtableLWA_USERS
WHEREOBJID=POSITION_ID.
IFNOTLWA_USERSISINITIAL.
REFRESHLT_HOLDERS[].
loopatLWA_USERSintoWA_USERS.
CondenseWA_USERSSOBID.
LWA_HOLDERSOTYPE='US'.
LWA_HOLDERSOBJID=WA_USERSSOBID.
APPENDLWA_HOLDERSTOLT_HOLDERS.
APPENDLINESOFLT_HOLDERSTOACTOR_TAB.
endloop.
ENDIF.
DESCRIBETABLEACTOR_TABLINESNUM_LINES.
IFNUM_LINESISINITIAL.
RAISENOAGENT_FOUND.
ENDIF.
ENDFUNCTION.

CreatingaruleusingthePFACTransaction

What's Hot?

AssignthefunctionmoduleZWF_FIND_USERSinthe"RuleDefinitionTab"

SAP
Training
byAtos
Awarded
No.1SAP
Education
Partner.
Over200+
Courses
Available.
Enroll

WebDynproforABAPTutorials

JointheMailingList
Enternameandemailaddressbelow:
Name:
Email:
Subscribe

Unsubscribe

GO

Gotothe"ContainerTab"andcreateacontainerelementforthePositionidwhichwillbepassed
tothefunctionmodule

Our rule is created now. You can test the rule within the PFAC transaction by clicking the
"Simulation" button on the application toolbar. Now this rule is ready to be used in any workflow
accordingtoyourrequirementviatherulecontaineroftheworkflow.

EnterthePositionId,whichiscreatedin(PPOCW)

ItdisplaysAssetAnalysts(users)intheRuleresolutionresult

Nowyoucanusethisruleinanyofyourworkflowdefinitions.

ExecProgramin
Analytics
SAS,R,Hadoop&BigData
Technology.SDA
bocconi,Europe'sTopuniversity

Pleasesendusyourfeedback/suggestionsatwebmaster@SAPTechnical.COM
HomeContributeAboutUsPrivacyTermsOfUseDisclaimerSafeCompanies:AdvertiseonSAPTechnical.COM|PostJobContactUs
20062007SAPTechnical.COM.Allrightsreserved.
Allproductnamesaretrademarksoftheirrespectivecompanies.SAPTechnical.COMisinnowayaffiliatedwithSAPAG.
SAP,SAPR/3,R/3software,mySAP,ABAP,BAPI,xApps,SAPNetWeaver,andandanyotherSAPtrademarksareregisteredtrademarksofSAPAGinGermanyandinseveralothercountries.
Everyeffortismadetoensurecontentintegrity.Useinformationonthissiteatyourownrisk.

GraphicDesignbyRoundtheBendWizards

Potrebbero piacerti anche