SAP workflowOK.docx

上传人:b****6 文档编号:7712278 上传时间:2023-05-12 格式:DOCX 页数:33 大小:2.05MB
下载 相关 举报
SAP workflowOK.docx_第1页
第1页 / 共33页
SAP workflowOK.docx_第2页
第2页 / 共33页
SAP workflowOK.docx_第3页
第3页 / 共33页
SAP workflowOK.docx_第4页
第4页 / 共33页
SAP workflowOK.docx_第5页
第5页 / 共33页
SAP workflowOK.docx_第6页
第6页 / 共33页
SAP workflowOK.docx_第7页
第7页 / 共33页
SAP workflowOK.docx_第8页
第8页 / 共33页
SAP workflowOK.docx_第9页
第9页 / 共33页
SAP workflowOK.docx_第10页
第10页 / 共33页
SAP workflowOK.docx_第11页
第11页 / 共33页
SAP workflowOK.docx_第12页
第12页 / 共33页
SAP workflowOK.docx_第13页
第13页 / 共33页
SAP workflowOK.docx_第14页
第14页 / 共33页
SAP workflowOK.docx_第15页
第15页 / 共33页
SAP workflowOK.docx_第16页
第16页 / 共33页
SAP workflowOK.docx_第17页
第17页 / 共33页
SAP workflowOK.docx_第18页
第18页 / 共33页
SAP workflowOK.docx_第19页
第19页 / 共33页
SAP workflowOK.docx_第20页
第20页 / 共33页
亲,该文档总共33页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

SAP workflowOK.docx

《SAP workflowOK.docx》由会员分享,可在线阅读,更多相关《SAP workflowOK.docx(33页珍藏版)》请在冰点文库上搜索。

SAP workflowOK.docx

SAPworkflowOK

第一节:

现在开始总结workflow,虽然有些过时的技术,但是还是有很多公司在使用,特别是一些比较大的企业,系统升级比较慢。

也为自己知道的,做过的事情有一个总结,希望还能有点参考意义。

1.从目的上来说,就是让整个业务更加流畅,更加透明,更加方便快捷。

2.既然有了workflow,就应该相应的有一个管理系统,以及一个开发环境,这些我们都能够在sap中找到。

T-code:

SWDM

3.在使用workflow之前,我们必须明白一件事情,那就是不管什么样的workflow,都会有一整套的业务原型。

在定义workflow之前,应该找到相应的已经存在的模型(或许也可以自己开发)。

4.不要误会workflow的功能,其实它是很强大的,虽然我们经常只使用它的一部分功能。

包括,email的通知,transaction的集成,不同系统之间的数据交换(ALE/EDI)等等。

Workflow的定义:

每个workflow都能在sap中找到业务流程;

Workflow由很多的步骤组成;

Workflow可以由事件触发;

Workflow的创建:

如果我们已经知道了业务如何执行,那么就可以创建自己的workflow了,于是我们会需要workflowbuilder.

T-code:

SWDD

第二节:

SAP提供了大量的Workflow的模板可以供大家参考,如果不符合具体的业务流程,可以对该模板做增强。

不过就像SAP标准程序一样,不能对其进行修改,当然,你可以把这个模板复制出来然后对其修改,具体就看你的需要了。

查看workflow模板的方法:

T-codeFTC_DIS

Tasktype:

WS

Workflow助手:

BusinessWorkplace–SBWP

当Workflow执行到某一步需要特定的用户确认或者批准的时候,就会发出workitem到该用户的workplace,以使该用户做出相应的操作。

BusinessWorkplace可以和很多外部工具集成,例如lotusnote,MSoutlook等等,这样使workflow的通知方式更加灵活。

弄清楚Workflow的架构:

上面的图非常重要,这基本上描述了我们的开发方向,同时也对你理解SAP自带的Workflow有很大的帮助,看明白到底是为什么而定义,以及如何去执行。

在Workflow中,我们经常会遇到关于BusinessObject的东西,我想在单独的文章中介绍它的开发以及使用。

如果你不知道BO,那么和它紧密相关的BAPI你一定知道,在进一步了解BAPI的原理,你会发现其根本就在BO里面。

第四节

从前面我们的一个简单的例子,对workflow有了一个大概的认识,现在我们来熟悉一下workflow的术语,这部分我基本上从saphelp上面copy下来,也不想做什么翻译,只要经常使用wf,这些东西就非常容易理解了。

workflowcontainer

Theworkflowcontainercontainsworkflow-specificsystemelementsandothercontainerelementstobedefinedexplicitly.

WorkflowAgent:

Personwithinthesystemofworkflowroleswhoappearsasanenduserinproductiveworkflows.

Theworkflowagentstartsworkflowsandprocessesworkitems.TheirworkareaistheBusinessWorkplace.

OrganizationalPlan:

Representationofthetask-related,functionalstructureofyourenterprise,createdusingtoolsfromtheOrganizationalManagementcomponent.

Event:

Aneventiscreatedfromanyapplicationprogramandpublishedsystem-wide.Anynumberofreceiverscanreacttotheevent.

WorkItems:

WorkitemsareusedintheSAPBusinessWorkflow/WebFlowtoexecutetheindividualstepsofaworkflow.

Activity:

Youdefineorprocessanactivityinthefollowingcases:

Ifyouwanttoaddanewactivitytoaworkflowdefinition.·

Ifyouwanttochangeanexistingactivitywithregardtoitsagent·assignmentoritsdeadlinemonitoring.

Ifyouwanttoanalyzeaworkflowdefinition.·

WebActivity:

YouusethissteptypetosendanXMLdocumentfromtheworkflowtoanothersystem.TherecipientcanprocesstheXMLdocumentaccordingtotheirrequirements.ThisXMLdocumentcanstartaworkflowinanothersystemforexample.

MailTransmission:

Youusethissteptypetosendamailtodifferentrecipients.Youdefinethetextandsubjectofthemailwhendefiningthestep.Youcanusevariablesinthetext,whicharefilledfromthetaskcontaineratruntime.

FormSteps:

Thissteptypeenablesyoutodisplayorprocessthedatainacontainerelementoftheworkflowcontainer.Thecontainerelementmustrefertoastructurewhosefieldsareusedintheform.Aformcanbegeneratedautomaticallybytheworkflowsystem.Youcanprocesstheformgeneratedtoadaptittosuityourindividualrequirements.Deepstructuresarenotsupported.

Formscanalsocontainotherelements,withwhich,forexample,theformcontentcanbeapprovedduringexecutionofthestep.

UserDecisions:

Inauserdecision,therecipientsreceivethetaskdescriptiontogetherwiththepossibledecisionoptionsduringexecution.

DocumentfromaTemplate:

YouusethissteptypetocreatedocumentsofvariousPCapplicationsandprocessthemwithintheworkflow.Theworkitemrecipientcreatesthedocumentbasedonadocumenttemplate,whichcanalsocontaincontainerelementsoftheworkflowcontainer.

Condition:

Youuseaconditioninaworkflowdefinitioninthefollowingcases:

If,atexecutiontime,onlyoneoftwopossiblealternativescanbe·processedduringtheworkflow,fromabusinesspointofview.

Iftheworkflowsystemcanmakeadecisionbasedonthecontentsofthe·workflowcontainerwithoutuserinteraction.

MultipleCondition:

Youuseamultipleconditiontodefinedifferentprocessingbranchesforaworkflow.

EventCreator:

Youcanuseaneventcreatortotriggeraneventoralocalevent.

WaitStep:

Awaitstepcanwaitfor:

Anevent·

Acondition·

Alocalevent·

Aneventthatisinitiallyreceivedbytheworkflow.·

ContainerOperation:

Youuseacontaineroperationtochangeacontainerelementoftheworkflowcontaineratruntime.

ProcessControl:

Youcanuseaprocesscontroltoexecutethefollowingfunctionsduringtheruntime

Terminateorcancelotherworkitemsinthecurrentworkflow·

Terminateorcancelthecurrentworkflow·

Activateacorrelation(CorrelatingObjects:

Acorrelationenablesyouto·identifyobjectsthatbelongtogether,forexample,aquotationandtherelevantsalesorder.Thisinvolvescorrelatingtheobjectsbyusingoneormorecommonelements,forexample,thequotationnumber.WhenyoudefineaWorkflow,youcanspecifytheobjectthattheWorkflowmustwaitfor,withouthavingtoentertheIDoftheobject.)

Raiseanexception·

UNTILLoops:

YouuseanUNTILloopinaworkflowdefinitionif:

Atexecutiontimewithoneoftwopossiblealternatives,theworkflowisto·“jumpback”toprocesssectionsoftheworkflowdefinitionagain.

Theworkflowsystemcanmakeadecisionbasedonthecontentsofthe·workflowcontainer.

WHILELoops:

YouusetheWHILEloopinaworkflowdefinitionif:

Atexecutiontime,onlyoneofseveralpossiblealternativescanbe·processedintheworkflowfromabusinesspointofview,andthenthecomparisonistobeperformedagain.

Theworkflowsystemcanmakeadecisionbasedonthecontentsofthe·workflowcontainer.

Thedecisioncanbeformulatedbasedonacomparisonbetweenanexpression·fromworkflowcontainerandafiniteamountofcomparisonvalues(constants,expressions).

Forks:

Youuseaforkinaworkflowdefinitionwhenthebusinessprocesscanbecontinuedbyseveralusersatthesametime.Youcanalsoconfiguretheforkinsuchamannerthatnotallbrancheshavetobeprocessed.

AdHocAnchor:

Youcansaveoneormoreadditionalworkflowswiththesameinterfaceastheadhocanchor.

Atruntime,anauthorizedusercanreplacetheadhocanchorwithoneoftheaddedworkflowsinthegraphicalworkflowlog.Theworkflowbeingexecutedisthenextendedbythestepsoftheaddedworkflow.Iftheanchorisnotreplaced,theadhocanchorisignoredwhentheworkflowisexecuted.

Block:

YoucangrouptogetherstepsinaWorkflowinablock.Youhavethefollowingoptionsforablockandthestepsitcontains:

       Definelocaldata(localcontainer)·

       Definedeadline·

       Defineexceptionsandexceptionhandlers·

       Definedynamicprocessing(parallelorsequential)·

LocalWorkflow:

Unlikeasub-Workflow,alocalWorkflowhasfullaccesstothedataintheWorkflowcontainer.Inthelocalcontaineryoucanalsodefineadditionalcontainerelements.AlocalWorkflowisstartedbymeansofalocalevent.YoucanusealocalWorkflow,forexample,tomodelreactionstobusinessexceptionsituations.Forexample,ifyoumodelhowanorderisprocessedinWorkflow,youcanusealocalWorkflowtomodelhowyouwantexceptionhandlingtofunctionshouldtheorderbedeleted.ThislocalWorkflowcanbestartedbyalocaleventOrderDeletedand,forexample,triggeranotificationtobesenttotheadministrator.

AlocalWorkflowiscalledasynchronously.ThismeansthatthecallerstepdoesnotwaitforthelocalWorkflowtobecompleted.AninstanceofthecallerWorkflowcanstartmultipleinstancesofthelocalWorkflow.

Task:

YouuseaTasktodefineanactivitythatcanbeexecutedwithinaworkflowdefinitionorindependently(asasinglestep).ThisactivitycanbeanSAPSystemtransaction.

一步一步教你创建第一个workflow:

我就是用最老套的关于创建Material所引起的workflow,这样是我们的第一个例子非常简单,同时也能够让我们熟悉一些基本的组件的使用。

业务背景:

当DB的人员创建了新的物料之后,会触发一个workflow,该workflow会通知IT去检查这个物料。

假定这个it人员的用户名是p2,我们只做一个针对该人员的wf。

打开workflowbuilder—SWDD

最终效果图如下:

1.这个workflow从misd11收到workflow开始设计,首先我们需要使用一个userdecision,确定misd11是否要执行这个wf.

选择新建,userdecision(点中图标,然后点击右键,在弹出的界面中选择用户决策)

2.新建一个task,用于显示物料

如果用户选择yes,则显示物料的内容

点新建—〉activity,进入创建activity画面,选择新建task

新版本的效果图如下:

新版本效果图如下:

Assignagent

好了,这个步骤完成

3.新建一个sendmail,如果用户选择不执行,则发一个mail到该用户的workplace

4.好了,现在我们需要规定一些import的字段

选择workflowcontainer,指定import字段

新版本效果图如下:

5.现在激活wf,执行测试(测试事物代码SWUS)

点击inputdata,输入你要显示的物料号

新版本测试如下:

点击在关键字在弹出的窗口中输入物料号,然后点绿色钩钩按钮

然后在点运行按钮或按F8,会弹出如下界面

点击yesIdo会弹出如下界面显示物料

如果点击noIdidn’t的话会收到一封邮件,进入SBWP进入到业务工作台可以看到

选择yes,Ido

选择no,Idon’t.

6.经过测试,看来没有什么问题,那么我们加一个event,当物料创建的时候就会触发这个wf,并且加入限制条件,只有创建物料号码中包含’ztest’字符串的物料才能触发。

.

7.现在我们来测试一下,创建一个物料

用SBWP进入到工作台看到以下邮件

新版本创建事件方法如下:

1、assigneventreceivertoabasicworkflow

输入SWDD事物码,点击帽子按钮(基本数据),然后点击开始事件,Withinhereinsertthecategoryandtypeofyourbusinessobjectalongwiththeevent.IntheexampleIamgoingtouseeventREATEDofbusinessobjectUS1001006

2、setupbindings

Nowpressthebindingbutton

Onthefollowingscreenpressthegenerateautomaticbindingbutton

3、activatestartevent

nowpresstheactivateicon,thethirdbuttonisforstartconditionssoyoucanaddfurtherrestrictionsonwhentheworkflowstarts.

4、activateworkflow

Nowreturntomainworkflowscreenandactivateit.shisshouldbesetupandifworkflowisrunningcorrectlywhenevertheeventyouhaveassignedyouworkflowtooistriggereditshouldinturnexecuteyouworkflow

5、testworkflo

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2