SAP Workflow - My First Workflow _ SCN

download SAP Workflow - My First Workflow _ SCN

of 13

  • date post

    04-Jan-2016
  • Category

    Documents

  • view

    49
  • download

    12

Embed Size (px)

description

WF

Transcript of SAP Workflow - My First Workflow _ SCN

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 1/13

    GettingStarted Newsletters Store

    Products Services&Support AboutSCN Downloads

    Industries Training&Education Partnership DeveloperCenter

    LinesofBusiness UniversityAlliances Events&Webinars Innovation

    LogOn JoinUsHi,Guest SearchtheCommunity

    Activity Communications Actions

    Browse

    1 Tweet 1

    createdbyVikasGautamon26Nov201210:19,lastmodifiedbyVikasGautamon05Dec201207:38

    WorkflowWorkflowisatoolfortheautomationofthebusinessprocess,consistingofsequenceofsteps,tasksorevent.Onesimilarexampletoworkflowistheautomatedlinesinthemanufacturingindustrywithstationpointsorloadingpoints.Youcanarrangeandmanagethedependencyoftasks.UserscanbesentnotificationforthetaskwaitingintheSAPinboxforapprovaloraction.Userscanbeinformedofmilestonesintheprocess.Byautomatingtheprocess,youfreetheusersfromhavingtoknowwhattodowhen.Workitemsaresenttotheparticipantsnotifyingthemofwhattheyhavetodo,andasingleclickonthenotificationcallsthecorrecttransactionandnavigatestotherelevantscreen.WebFlowistheinternetfunctionalityofSAPBusinessWorkflow.Components:OrganizationalPlan:tomanagethehierarchyofreportingandmessageflowWorkflowBuilder:TogeneratetheWorkflow.TheWorkflowBuilderprovidesagraphicalviewoftheworkflowdefinition.EventsBusinessWorkplace:SAPInboxRoleResolutionComponents

    OrganizationalPlan OrganizationalUnit(afunctionalunitinyourenterprise)

    Position(Representsapost)

    Job(classificationsoffunctionsinanenterprise)

    StaffAssignments/AssignmentofUserids

    StandardTask Task(Adescriptionofanactivity)

    WorkflowBuilder Overview

    Steptypes

    Tasks

    Messages

    Events TriggeringEvents

    TerminatingEvents

    Example:Thescenariostartswhenanemployeefillsoutarequestforleave.Thefilledoutformisthenautomaticallysenttothatemployeessupervisor.Ifthesupervisorrejectstheapplication,theemployeeisinformedandaskedtodecidewhetherhe/shewantstoresubmittheapplicationorwithdrawitcompletely.Iftheemployeedecidestorevisetheapplication,theformisforwardedtohis/herinboxforresubmit.Ifthesupervisorapprovestherequest,theemployeeisinformedandtheworkflowcanend.

    Steps:

    SAPWorkflowmyfirstworkflow

    Share 2Like

    Version2

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 2/13

    1.DefineOrganizationPlan(TcodePPOCE)2.CreateWorkflowtemplate:(TcodePFTC_INS)tocreateabasictemplateofworkflow,(TcodeSWDD)tobuildtheworkflowintheworkflowbuilder3.Define1sttask(TcodePFTC_INS)(Createnotificationofabsence)4.Addactivity>firsttaskintheworkflow5.1stTestinSAPInbox(TcodeSBWP)6.Define2ndtask(Checknotificationofabsence)7.Addactivity>secondtaskinworkflow8.2ndTest9.IntegrateUserDecisionforResubmit10.3rdTest11.Define3rdtask(Revisenotificationofabsence)12.Addactivity>thirdtasktotheworkflow13.Add4thCustomerTask(SendNotificationforapprovalofleave)Steps:Step1:DefineOrganizationPlanorOrgn.Unit(TcodePPOCE)

    Step2:a:CreateWorkflowTemplate(TcodePFTC_INS)

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 3/13

    UsingTcodePFTC_INSyoucancreateworkflowtemplateandtasksalso.ThistakeyoutotheTask:Maintain.IntheTasktypefield,choosetheWorkflowtemplateforWorkflowTemplate.ForCreatingtasks:ChooseStandardTaskintheTasktypefield.Step2:b:ViewtheworkflowinTcodeSWDD(WorkflowBuilder)

    Inthemiddlewehaveoverviewgraphic/flowchart.Andontherightsideonthebottomwehavevarioussmallbuttons/iconscalledsteptypes.Thiswecandraganddropandinsertintoourworflow.Wewillbeusingthe

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 4/13

    firststeptypewhichislikethe playbuttoncalledactivityforourStep3:CreateNotificationofAbsence.Step3:Define1sttask(Createnotificationofabsence)GototheTcodePFTC_INS:Tasks:MaintainChooseStandardTaskintheTasktypefield.GivethefollowingvaluesandSavethetask.OnsavingitwillgiveacodeId:like99500654Name:Form_createdAbbr:create_formWorkItemText:vik_notif_absencecreateObjectType:FORMABSENCMethod:CREATECheckboxSynchronousobjectmethod,Objectmethodwithdialogchecked.Step4:Addactivity>firsttaskinworkflow

    AddtheStep:Activitytoyourworkflow. inplaceofundefinedstep.

    WehavecreatedTaskTS99500654separatelyusingPFTC_INS.

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 5/13

    NotethecheckboxAdvancewithImmediatedialog.Thismeansthattheworkitemoftheworkflowismadeavailableforprocessingimmediately.Theuserwhostartstheworkflowisalsooneoftherecipientsofthisfirstworkitem.Thisisthecaseherebecauseyouenteredthecontainerelement_WF_Initiatorastheagentinthestepdefinition.NotetheBindingbutton.Thebinding_WI_ObjectId>&ABSENCEFORM&hasbeenautomaticallydefinedherebythesystem.Thisbindingensuresthatthereferencetothenotificationofabsencecreatedisnotonlyknowninthistask,butalsointheworkflow.NowtheWorkflowBuilderscreenlookslike

    Step5:1stTestinSAPInbox(TcodeSBWP)WhentheworkflowrunsitcreatesworkitemswhicharelikeemailsintheSAPInbox.Whenitisexecuteditcallstherespectivetaskortransactionscreenwiththecorrectdata.Executeyourworkflow:Thenotificationofabsenceformisdisplayed.

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 6/13

    DonotmakeanyentriesanddoNotSave.Instead,chooseCancel.Youhavenowstartedtheworkflowbutcanceledtheprocessingofitsfirststep.

    Yourworkflowinboxnowcontainsoneworkitemforprocessing.Thisistheworkitemforcreatinganotificationofabsence,theprocessingofwhichyoucanceledpreviously.Youhavetoselectyourworkitemwiththesubjectastheworkitemtextyouhavegiven.Selecttheworkitem,andchooseexecute(F8).YoureturntotheCreatenotificationofabsencescreenwherethenotificationofabsenceformisdisplayed.FillouttheformandchooseSave.Theworkitemdisappearsfromyourworkflowinbox.

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 7/13

    Step6:Define2ndCustomertask(Checknotificationofabsence)Thisformformabsenccreateyoucreatedbeforewillnowbesenttosupervisorforapprovalusingtheobjectformabsencapproveobject.CreateanothertaskusingPFTC_INS:

    NotethecheckboxConfirmendofprocessing.Step7:Addactivity>secondtaskinworflowIncludeTask:CheckNotificationofAbsenceintheWorkflow.WehaveTaskcodeasTS99500545.Checkthebindingproperties

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 8/13

    WeneedtocreatetheApprovervariableintheworkflowcontainer.(leftsidebottom,youwillseeamenuoptionWorkflowcontainer)Makethefollowingentriesforobject&Approver&:Element:Approver,Name:Approver,Description:Approveroftheabsencerequest,Referencetable:WFSYST,Referencefield:AGENT.andusetheobject&absenceform&alreadythere.ForAgentsChoosePosition.Selectyourpositionbythenameyouhavecreatedintheorganization.Youcannotedowntheidofyourpositionfromyourorganization(TcodePPOCE)asS50001707.(DontprovideSinthetextfield).

    WecanalsoimplementdeadlineinactivitiesusingLatestend,RequestedStart,Lateststart,Requestedend.Fore.g.Ifthesuperiorhasnotmadethedecisionabouttheleaverequest,therequestershouldbenotified.Oncethedeadline(fore.g.latestend)passes,aworkitemformisseddeadlinesappearsinyourBusinessWorkplacenotifyingyouofthemisseddeadline.

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 9/13

    Now,YouwillseethattwobranchesarenowinsertedinyourworkflowdefinitionforthetwomarkedoutcomesApprovedandRejected.Step8:2ndTestChooseexecutetheworkflow.YougotothescreenCreateNotificationofAbsence.Whentheworkflowisstarted,theworkitemforcreatingthenotificationofabsenceisprovidedtoyoudirectlyforprocessing.Thisisbecauseofadvancingwithimmediatedialog.Youwereintroducedtothisinthefirsttest.FillouttheformandchooseSave.YounowgotothescreenofBusinessWorkplace>Inboxthroughtheuseridofsuperior/supervisor(head).Theworkitemsforyoutoprocessaredisplayedwiththeirworkitemtextsandcertainotherattributes.SelectyourworkitemforcheckingthenotificationofabsenceandChooseexecute.Eitherrejectorapprovetherequest.NoticethetwobuttonsApproveandReject.

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 10/13

    Step9:IntegrateUserDecisionforResubmitYoucanseethatcheckNotificationhastwobranchesApproved,Rejected.WewillbeaddingauserdecisiontotheoutcomeRejected.Withtheuserdecision,therequestercandecidetoreviseandresubmittheleaverequestiftheheadofdepartment/supervisorrejectsit.

    Addthesteptype:Userdecisiontotheworkflow.

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 11/13

    Nowyourworkflowlookslike

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 12/13

    Step10:ThirdTestAgainexecuteyourworkflow.FillouttheFormandSaveit.Theworkitemwilldisappearfromyourinbox.Asasuperior:Rejecttheapplication.Iftherequestisnotapproved,thenextstepintheworkflowdefinitionistheuserdecision.Therequester(&WF_INITIATOR&)wasenteredastheagentforthestep.Thedecisionisthereforeofferedtoyouagainastherequester.Therewillbetwooptions:ReviserequestorWithdrawrequest.IfyouchooseReviserequest,thatshouldtakeyoutotheresubmitform.Thatisournextstep.Step11:Define3rdCustomertask(Revisenotificationofabsence)andaddtoundefinedstepatoutcomeReviseaftertheuserdecision.

    UseFORMABSENCUPDATEasobject.Inthebindinggive

  • 20/10/2015 SAPWorkflowmyfirstworkflow|SCN

    http://scn.sap.com/docs/DOC33625 13/13

    FollowSCNSiteIndex ContactUs SAPHelpPortalPrivacy TermsofUse LegalDisclosure Copyright

    AverageUserRating

    (8ratings)

    1 Tweet 1

    _WI_Object_IDexpressiongive&_WF_INITIATOR&inthefield.Step13:Add4thCustomerTask(SendNotification)Youhavecreatedacompleteworkflowtemplatewithwhichanotificationofabsencecanbecreated,approvedandrevised.Nowyouwillinsertastepintheworkflowdefinition