Sunteți pe pagina 1din 18

Why use SAP Workflow?

SAP Workflow ensures " the right work is brought in the right sequence at the right time to the right people". It is a tool designed to facilitate and automate business processes that require tasks to be performed by people. Ideal for casual or non-SAP users, since all the work items can be performed outside of SAP by simply responding to an email, SAP workflow can be linked to Microsoft Outlook or Lotus Notes. Each step of a business transaction can be easily monitored and processes are completed from the beginning to the end. Workflow allows process owners to keep an eye on deadlines, provides statistics on the length of time to complete work processes, determine the workload with regard to individual employees and save processing time. Since Workflow delivers work items to employees automatically via email, they do not have to wait or inquire about the status of a particular transaction. SAP Business Workflow can also be used to respond to errors and exceptions - it can start when predefined events occur. For example, an event can be triggered if particular errors are found during an automatic check of the data SAP workflow is particularly useful when there is a business process involving more than one person, when an automatic notification can replace a manual communication and when there is a defined set of individuals and/or documents implicated. It organizes one's work, alerts users and directs traffic by sending work items - once the user executes the work item, then another one can be sent to another user. For example, a Manager could use workflow to approve a vacation request from an employee. The workflow application would ensure that each person involved uses the correct online form and successfully completes their step before the planned leave was entered into SAP - either by an Administrator or automatically. By the same token, if someone registers for a training class, Workflow can act as an alert tool by notifying the supervisor in question or reminding the individual of an upcoming class. Before implementing SAP Business Workflow, organizations should start by asking a series of questions, such as: - Which HR processes do we want to automate? - To what extent can we change current procedures and pass them over to electronic control? - What steps are these procedures made up of? - Who are the individuals involved and what are their roles? - How do we get the Workitem to go to the right people? Even though Workflow can be implemented via user-defined tables without the Organizational Management component in place, having a pre-defined organizational structure adds tremendous value and saves time. A clear reporting structure made up of positions and position holders that is maintained by the HR department, ensures the ongoing ease-of-maintenance effort. The ability of HR personnel to add and delete users from positions as people come and go, without affecting your core workflows, is a tremendous long-term benefit. If you have Personnel Administration in place, employee's email addresses can also be maintained by the HR department in addition to employee's respective Time/HR and Payroll administrators who might be involved in the Workflow. There are basically three options for connecting workflow to external email: Microsoft Outlook/Exchange, Lotus Notes or SAP Connect and Internet Mail. A key factor in SAP R/3 4.6 implementations and upgrades will be the use of a Web browser as the main workflow interface. Benefits of SAP Workflow Although the advantages gained by using workflow are not of financial nature, the time saved by optimizing processes could easily be translated into money. - The quality of your processes will be assured by sending relevant information directly to the user. Managers don't have the time to search for information. For example if an employee obtains a qualification as a result of hard work or training, their Managers can be notified immediately. - Cycle time is reduced by providing all the necessary information needed: people can check their list of pending tasks and determine which tasks can be completed the next day without any negative impact. I.e. A Payroll Administrator might

be notified immediately of an employee address change via ESS that might implicate taxes. Workflow allows to monitor deadlines. It could be used to remind employees of upcoming performance reviews or training or to send payroll year-end tasks items to the relevant Payroll Administrators. Deadline handing ensures that users perform the tasks within the time planned. Escalation measures ensure that the failure to meet a deadline can be corrected by other means. - Users can see at a glance how the process works and who will be selected to perform the different tasks, which creates a transparent work environment. SAP contains Workflow templates, which can be used as a reference providing more than 200 Workflow samples. - Implementing Workflow will save costs. Ask yourself how much time is spent gathering information, getting hold of people, logging into different systems and trying to understand who to give a task to? How often does this current process fail and how labor intensive is it to fix it? Workflow reduces time and effort spent and the savings in days can be considerable. How does it work? There are several components of a workflow: Workflow Definition, Work Items, Triggering Events and at the Receiving end the Organizational Structure. The workflow definition is created in the Workflow builder and is made up of the various steps. Each step of the workflow definition can be a task pointing to a SAP transaction or a decision. A decision might contain specifications about agents and deadline monitoring for a step. The workflow is started either manually or by the system at runtime. For the system to start a workflow, the workflow definition must contain a triggering event (for example the event "Address update by the employee"). When the event occurs, the relevant workflow is started automatically. Tasks or Work items describe the activities involved and can refer to automatically executable methods (i.e. send an email to a supervisor) or they might need a user to execute them (i.e. supervisor has to go and click on a button in his workplace to approve something). Tasks refer to business objects, which are ABAP coding. Events are activities that trigger the workflow - one or several workflows at the time. Once the workflow is triggered, the definition flowchart determines when and in what order work happens. Work items are then received and executed in MS Outlook, Lotus Notes, mySAP Workflow MiniApp or the SAP integrated inbox. Alternatively, the workflow system can transmit e-mail notifications directly to any mail system, informing the user of the need to log in to the SAP system to execute the task. A work item is always assigned to one or more users. Once the task is executed, the work item vanishes from the other users' inboxes. Integration to Email systems Usually executable work items are received in the Workflow inbox. But casual SAP users, especially Managers might forget to check their inbox at a regular basis and so it makes sense to set up reminder emails, informing people via a batch job that they have work items in their inbox. Alternatively, an email can be sent directly to their Lotus Notes / Outlook account with a hotlink to the Workflow inbox. All emails, whether they exists in the form of Workflow notifications, Workflow Workitems, or just a standard SAP Office memo, are sent out of SAP through SAPConnect. This provides the all in one gateway between SAP and the mail server. The transport of workflow items between SAPConnect and the mail server (whether that's Lotus Notes or Microsoft Outlook) has been facilitated by SAP provided add-ons that are fully optimized for the different protocols required for each server. Lotus Notes, for example, uses a 'pipe' called the MTA, or Message Transfer Agent. This was designed jointly between SAP and Lotus to provide full integration between the two systems. It should be noted that the type of transport medium used is dependent on the mail server and not the mail client. In other words, if the employee uses Outlook on their computer but the mail server is a Lotus Domino server, the MTA would be the mail gateway used. Each workflow background user must have an email address stored in their user profile. It is note worthy that no approval or reply notification will be allowed from an external mail system - in other words external email systems cannot respond back to SAP for security reasons.

Looking ahead Workflow is becoming more and more web-oriented which allows external business partners to receive notifications. Companies can adopt Workflow together with "Webflow" where workflows can be initiated via Internet transactions and where different external business partners can receive notifications sent by the workflow. The Web inbox offers access to partner companies logging on to your Web portal and it refreshes itself automatically. Any type of work item can be executed directly from a centralized list of work items, no matter what graphical user interface is needed to run it. Webflow is particularly useful when a company deals with outside partners using different software platforms. Workflows can make an ERP system more efficient by automating situations in which work processes have to be run through repeatedly, or situations in which the business process requires the involvement of a large number of agents in a specific sequence. It is essential that the Workflow consultant is an expert in ABAP development or has access to ABAP programmers since a good deal of the work is technical. You will also need someone familiar with Lotus Notes / Outlook concepts and development in order to create the interfaces between the systems. The Workflow consultant should also have experience in installing and integrating efficient electronic archive systems.

http://www.sap-img.com/workflow/sap-workflow.htm

Automation of the invoice verification process using self-billing & workflow Version: 1.0 Created at: 25.02.2003 Created by: John Frijns

Contents
1 Introduction 2 Self billing 2.1 Data in your system is not accurate 2.2 National legal requirements 2.3 Master data maintenance 2.4 Fuzzy purchase processes 3 workflow 3.1 Low cost scenario 3.1.2 Option 1 : Preliminary posting in FI 3.1.3 Option 2 : Logistics inv.Verification (based on PO) 3.2 Self developed solutions 1 Introduction The cost-level of the invoice verification department has always been one that was under pressure of a cost-cutting management team. Since the added value to the company output is low the most important criteria for this function has been to perform it as simple, accurate and cheap as possible. In the last 10 years dramatic re-engineering in the area was a hype in the consultants world. With this also the foundation was laid for software-solutions to facilitate these new processes and make them less labour and/or error intensive. This article takes off on the promise of the so called dont bill us we will credit you approach and after showing some of the pitfalls we will enter in the domain of the workflow. A process optimisation approach that builds

on the potential of technical tools like document scanning, optical character recognition and workflow software to streamline and cut costs in the area of the invoice verification. 2 Self billing The adjustment to the classical invoice process by eliminating the invoice was an example of a huge leap in lateral thinking. Instead of receiving the invoice from your vendor you use the data in your internal purchasing system to produce a credit note for your vendor. The creation would be based on data from your own system and would automatically post this invoice (or better credit memo) in your integrated financial ledgers, without an AP-clerk having to do one manual entry. Al seems to be to good to be true, until there is the reality call off implementation. Bellow find some of the pitfalls : 2.1 Data in your system is not accurate Critical element in the concept is your internal purchase order system and with it the accuracy of the data in it. You will base your credit memo on the price stated in the purchase order and the quantity stated in the goods receipt. Just imagine the goods in responsible making the famous comma-mistake and instead of entering 10,000 (ten pieces) he enters 10000 (ten thousand pieces) or the price info for your vendor material combination was updated incorrectly. In both cases you would produce a wrong credit-note and would kick off a long trial of corrections that probably take you more time to put into your system than a classical invoice would have done. Lesson 1 : No Self-billing without a checking opportunity both internal and external before the actual creation of the credit note ! Note : For one customer the PIKON International Consulting Group has designed a function that can be executed internally as well as via a web-interface for use by the vendor. This tool almost simulates the results of a self-billing run applying some additional checking rules as well. For example a Warning light is set if the goods receipt quantity billed is more than 10 % different from the average quantity received. 2.2 National legal requirements The fact that our one Europe is certainly not one when it comes to statutory financial requirements is not a surprise. Therefore one should also consider the international implications when embarking on a self-billing project. For example in France there is the requirement that a vendor has to sign or confirm the information on the credit note before it can be posted and sent. In Italy the current rules even go one step further. There the document should be similar to one created by the vendor. This means using the vendor logo or paper and using a sequential number range within an interval unique for the vendor. Lesson 2 : Check if the national legislation has been updated to allow self-billing. 2.3 Master data maintenance As in most integrated software packages there is the element of the master data that plays a key role in this automated process. If your data is wrong your output is wrong. On one side you should consider the vendor data. Now also things like the VAT id should be in order and printed on the document. Consider to give your vendor direct or web-based access to your system so he can maintain this for you! Another issue that should not be underestimated is the determination of the VAT code, which applies for this transaction. Either one has to manually add it on the purchase order or info record or one should develop a procedure to determine it in the background, obviously based on master data settings in the vendor, material or process. Lesson 3 : Review and manage the master data requirements Lesson 4 : Decide on how to determine the tax code for the transaction Note : At one customer we implemented a user exit that derived the tax coded based on the material tax indicator, the receiving country, the sending country and the type of plant (sub-contracting). Shouldnt we tell the reader that solutions we made were SAP-related? 2.4 Fuzzy purchase processes The above-described solution can only be used when there is purchase orders and goods-receipt information that can be trusted. Especially that last element is a weakness, because this restricts the application area to the

classical goods related movements, leaving out of scope the huge number of fuzzy purchases that do not have a clear goods receipting point or responsible. In order to organize the goods-receipting of for example cleaning service or the receipt of a company car or mobile is not always so easy. To assign this responsibility to one department as you would with a goods-inward department is not so obvious. This is just one example of a case in which the self-billing approach does not work. Other examples are those where there is no purchase order at all or the process cannot be applied to the vendor for legal reasons. In those cases we come to a good second group of solutions. A group I will refer to as workflow and is described in the next paragraphs. 3 workflow The alternative approach to streamlining the classical invoice receipt-process is by optimising the individual components of the process. This could include elements like scanning of documents, optical character recognition and electronic distribution & management of the document flow via workflow techniques. Bellow you will find two business cases describing the application of such workflow features. The first being a low cost scenario using standard SAP R3 means and the other being a more ambitious approach to create a complete layer around the back-end system to allow flexible handling of the document stream. 3.1 Low cost scenario In the low cost scenario we have a customer using a SAP system rel. 4.6. By using the available content repository & business-workflow functions one could realise such an infrastructure in a fairly short time span. This Infrastructure would include the scanning of your incoming documents onto a file server or optical archive. And the subsequent processing of these documents via workflow-distribution. Bellow find two scenarios of such a process. The first is a process without a purchase order in which the authorization decision is triggered by the fact that the invoice is parked. (In my opinion it is necessary to explain the process chains a bit more in detail; notes and SAP-integration (one note should point out that PIKON even realized this); we could also eyplain which benefits could be prepared by SAP-Workflow. May be that the second process must be coated because of restrictions of size) In the second scenario there are invoices based on POs. But in the process of posting it becomes obvious that the goods receipt has not yet been posted or is different to the invoice quantity. In this case the invoice is posted but blocked for payment. This block will now trigger an authorisation via a workflow path. Note : In one project Pikon realised a solution with an advanced role-resolution in which the authorising user was selected via either the cost-center, the cost-account or even the vendor number. The control of this so called authorisation matrix was with a system responsible at he customer site so they could very quickly make changes to these routings.

Workflow bottlenecks
Assuming that you recently triggered Workflow in your system hence the number of users shot up three times. At peak hours the system is terribly slow, nobody can work. What short-term solutions (SAP fine tuning etc) are there as you plan to upgrade your hardware? This depends on what are doing with your workflows. If it's little workflows that start often put the events in queues. Is it a custom workflows or standard workflows? If custom, try to replace methods by attributs (no RFCs) and it's better to use virtual attributs (only calculated when accessed).

If you use heavy BDC or run heavy reports in your workflows you could try to give more ressources to the CPIC or background user. If your workflows have a lot of background steps before sending workitems to users, and if possible, make them start during the night. And of course, if all this doesn't solve the problem you will have to your upgrade hardware. But before that, you should really dig in to see if there isn't a design/configuration problem somewhere: SWI5: workflows workload analysis Put traces on workflows and events for example.

Tcode For Listing All The Workflows


Do you know what the transaction code is to list all the workflows in the system (including standard & customised workflows). Use se16 and table name 'HRSOBJECT' It will list all the workflows. It also lists Roles but you can restrict by selecticng TS, TG and WS.

Purchase Order and Sales Order Workflow


Purchase Order workflow ( Transaction : ME23N) determines the approval path for the buying organization . It first goes to the buyer, buyer's manager & thereafter based on the cost center & the associated amount, it goes for approval through the Cost Center organization . i.e, Buyer ( Requestor in the procurement deptt. of the buying organization)

| | v Procurement Manager | | v Cost Center org. approval ( based on amount & Sign.Authority level) Regarding , Sales Order( Transaction: VA01); it is created in the Sales Org of the company & basically governs the pricing structure of the order .The routing of an SO is Sales Org. ( based on the cost center of the sold item) | | v Distribution Channel | | v Division | | v Reg. Sales office | | v Sales Group | | v Sales Person

How to Delete Documents in Workflow?


How to delete documents in workflow that are stuck there and old? SWWL - Deletes work items SWW_SARA - Archive work items

You're best advised to use the 'delete logically' functionality: SWWL will remove them entirely from the SAP database, which could be bad from an audit point of view. Isn't the real question more as to why those workitems are still in your inbox? Surely, if the work is no longer needed, the workitem should have completed and hence disappeared. I'd be inclined to look into that first and foremost. Is there anyway to undelete work items in SAP workflow after I have logically deleted? Well not exactly but you can restart the workflow using SWUE, it is same as creating the workflow but good thing is that it will start the point where it has logically deleted. If I delete a user through su01 then what all are the possible impacts on workflow. If WF cannot find the user (aka Agent) then it will set the Wf to error status and notify the WF administrator to take action. I've this work item in inbox. Item 00000 of purchasing document 0010414224 does. How to delete it? Goto tcode SWWL. Where you can view the list of workitem. From there you can delete your workitem. Transaction SWWL is fine for an administrator, but is there any "delete" button within business workplace that the users can use to remove workitems from their inbox? NO! Of course not. It's the whole idea. When a user has an item in his or hers inbox, he/she is expected to execute the item, because it's their job. Suppose I'm a user. And I have 20 workitems waiting for me to be processed. If I could delete all 20 of them and my manager executes workload analysis, or another tool for checking the workload of users, it would seem that I'm doing a great job. Where as in fact I'm probably destroying master data and upsetting clients. Delete workflow - RSWWWIDE not working In development, I have hundreds of unneeded workflow tasks. Running program RSWWWIDE with my userid only displays items I have flagged as deleted. I want to delete the tasks that are in the "READY" state. The strange thing is, the report has a status parameter with "READY" as one of the options. But regardless of how I execute the report, only the items flagged for deletion appear.

1. Is there a program that will delete the workflows without having to change the status? 2. If not, is there a way to automatically change the status for my tasks to completed? I found a FM which might work, but it requires the task numbers, which I could not find in my inbox. Workflows that have not been opened, cannot be deleted with RSWWWIDE (even if you put an asterick in the status selection field). You must first open the workflow. You do not have to do anything with it, but it must have been opened prior to deletion. You can select multiple workflows at once, then hit the execute button. From there, just hit escape to go to the next one. After all the wf's have been opened the RSWWWIDE program works great! This is useful in development when you have many unprocessed wf's.

Workflow of Purchase Requisition Release Strategy


Configuration of Purchase Order Release Strategy Following is the procedure for workflow enabling of Purchase Requisition Release Strategy: 1. The standard workflow template provided by SAP for PR Release is WS00000038. This information could be retrieved from the SAP help.

2. It is assumed that the release procedure has been setup in the system by the functional consultant, as shown below:

3. The customization of the PR Release Strategy could be verified at the following location: SPRO SAP Reference IMG Material Management Purchasing Purchase Requisition Release Procedure Procedure with classification Setup procedure with classification 4. Click on workflow in the above screen (screenshot shown below):

5. Now define the recipients of the PR Release work item as per the release group (refer to screenshot below). For testing purposes, the recipient type is taken as US, instead this can also be taken as Position, Organization Unit and others.

6. Now go back to the previous screen and click on Release Codes. Here enter the value 1 in the workflow column for the release groups the workflow has to be configured.

7.

Activate the event linkage of the workflow either in SWDD or PFTC.

8. Mark all the tasks (unless background tasks) as General Task in the agent assignment and generate.

How to notify users that they've got a Work-item/message?


You can integrate SAP WF's with your Notes-mail system, using an agent to tell the users that now they've got a work item waiting for them in their inbox. or by changing the priority to '1 express' and the other person will get the Pop-up telling them that they've got something in their inbox, BUT ONLY IF they are LOGGED ON at the time of receipt. If they are not logged on, they don't get any message at Log-on. The popup for unread items in the SAP Inbox can be activated using workflow customizing (SWU3) ->Maintain Addl Setting and Svces ->Activate Send to Objects and HR Objects. Check off "No notif of unviewed mails" on the 1st tab. or you can considered creating a secondary method which, if the user is in your non-Notes integrated plant, sends a notification as an external email. This whould use SELFITEM - Sendtaskdescription, and should not have any trouble being sent to the net using Connector - the only question is do the users at your new site have the ability to receive emails.

How to display company logo in workplace (work item preview)?

Go to "WI display" tab of your dialog step. use function module SWL0_PREVIEW_DEMO_GIF_ONLY (logo only) or SWL0_PREVIEW_DEMO_TEXT_AND_GIF (logo plus text) as template to create your own. For the image: go to tx SMW0, - choose binary - then click the blue table icon - execute the transaction. You'll get a table where you can add your own logo. For e.g. your image is called Zmiguel, type .gif. To be able to see it you have to assign an editor (settings-->assign myme editor) assign iexplorer for example to image/gif type. Then in your function (copy of FM SWL0_PREVIEW_DEMO_GIF_ONLY or SWL0_PREVIEW_DEMO_TEXT_AND_GIF) add: e_info-gif-id = 'ZMIGUEL'. e_info-gif-ALIGN = 'R'.

Create Object SWU_WFML_INBOX


I would like to get the contents of the e-mail generated by RSWUWFML fixed. I have gone into SE61 but am having some trouble. I have tried to change the dialog text that is specified by program RSWUWFML - which is SWU_WFML_INBOX and Add my Text there. But I am not getting this text in My Mail. Have you activated the text? BTW, it is better to create your own text rather than modifying the default supplied by SAP. PS: RSWUWFML2 is the latest version of the program. Depending on your SAP release, it may already be in the system or you can download it from SAP. >>> I have created new one it is working fine.

E-Mail content PDF file issue


I am required to send an email from the workflow to the external email address. I am using send mail task for the purpose and passing the e mail id for the address strings container element. When I test workflow I find that mail is going to the external mail id in this case Outlook. But I see the

message I find that the same is attached as a PDF file, I need to open the same for seeing the message. I remember in my previous assingments message used to appear directly and no PDF file used to be there. My requirement is that no PDF file but a simple text message. Is there any change since 46C ? I am right now working on 47. Certainly have issue with conversion rules go to SPRO and then to Basis SAP connect settings then to Genereal settings and to conversion rules. Because you are getting output as PDF your current settings will be OTF to PDF 1 and OTF to RAW 9. Change the first one to 9 and OTF to RAW to 1. Also just in case, you can add another one OTF to TXT as 1.

Send mail to USer if IDOC fails ( status 51)


We have a requirement where USER should receive an email if IDOC fails in SAP ( IDOC with staus 51). Is there any program which we can schedule in background for certain message types which will send mails for the failed IDOCs? Are there any standard workflows which we can configure for any message types? >>> By default, when an Idoc errors, an error message is sent to the Idoc administartor. If you want to send the error messages to different users based on the contents of the IDoc, you will have to write your own agent determination rule and assign it to the appropriate standard task which gets triggered when an error occurs. >>> Not exactly. To handle the application errors in idoc thru workflow, SAP has specific standard tasks available for message types. Search for the tasks for your specific messagetypes, for example Message related Tasks <MESSAGE TYPE>_Error. Ex: Orders_Error... You can assign the agent for each task separately. >>> If you want to send the error messages to different users based on the contents of the IDoc, you will have to write your own agent determination rule. Ex: You want to notify different CS Reps depending on the Partner. However, if it is the same group of people who would be notified for all errors for an Idoc type, you could do so by maintaining a simple org pstructure. >>> Talking about 2 different requirements: Case 1: You are right, custom role has to be developed to read the contents of Idoc. ex: purch org, po#, etc.,

Case 2. As you said in your example, if you want to notify different CS Reps depending on the Partner, no need to have any custom role develeoped, as I said in my previous reply, check for the message related tasks. And assign the agent in partner profile at partner level or partner+message level if you want to notify the partner from who the message is sent. You can assign each different group of people to each partner

Workflow Items Sent To Everyone If Agent Not Determined


We have this problem,whenever a workitem does not determine a agent, it send the workitem to everyone. This is causing lot of problems. This is generally a two part issue: 1. At design time, you have defined the task as a 'general task' under the agent assignment. 2. At runtime, when the agent determination routine tries to identify the agent, it cannot. So, because it is a general task, the task is sent to everyone. To resolve: 1. Instead of making it a general task, try to identify an actual list of 'possible' agents. This could be by positions, userIDs, Org Units, etc. Make this list your possible agents instead of defining it as a general task. or 2. Make sure your logic for determining the agent always return an agent. If you are using a custom rule, then at the end of the logic check to see if an agent was determined and if not, identify a default agent (like a WF admin or business analyst) that can receive the item and investigate who to properly route it to. FYI... if you go with option 1 and at runtime the logic fails to determine an agent, then an error message is sent to the WF admin instead of the task being sent to everyone. Which Agent did execute the task in the Inbox? Which FW system field does contain the agent, whom has executed a task in her inbox ? If one of the agents executes task number 1 in her inbox, which system field do I have to use in task number 2 to find which agents did the thing ? Make a workflow container for Actual Agent of type WFSYST-ACT_AGENT and then in task 1 do the binding from task container to workflow container for actual agent. This container then you can use in your next task to see who was the previous agent

Difference between Rule and Role


What is the difference between a Rule and a Role? Is there different tcodes for creating them? In which scenario, we use them instead of the other one? A Rule is a general way to 'define' your agents. A rule is maintained with TCode PFAC and are used to programmatically define the agents. For example, if you want a work item to go to all managers who worked for the company for 5 years or more, then you would have to create a rule that handles this custom scenario. Typically this is done by creating a custom function module that performs your selection logic and passes the results back to the rule. A Role is a general way to 'assign' your agents. A role is maintained with TCode PFCG and are usually assigned to a User (someone with a valid login). For example, you can have the role of ABAP_DEVELOPER and assign this role to all users who are developers. This is a good method to use if you want ALL developers to receive a workflow work item. You can specify not only a system user, but also a role or an object of Organizational Management such as a position, a Job, an organizational unit or a work center. Alternatively, you can define a container element that contains the object of Organizational Management at runtime or a rule for dynamic agent determination. Objects of Org Managemnet being organizational unit, job, position, work center. Role and Rule are not considered objects of OM.

Trigger WF from MIGO


Is there any way to trigger a WF from transaction MIGO? Trying to create a WF when MIGO is saved. ********** There's a user exit which is called after the material document is posted, but just before the 'commit work' takes place. I think it's 'EXIT_SAPLMBMB_001' off the top of my head. Raise your workflow event programmatically there using 'SWE_EVENT_CREATE_FOR_UPD_TASK' in update task. You'll have the material document number/year in the MKPF structure by then, so you should be well equipped for any subsequent workflow. ********** I first tested the function you suggested, but it seems doesn't work. Maybe I misunderstood and am doing something wrong. Here it is:

SWE_EVENT_CREATE_FOR_UPD_TASK : I pass the MKPF as object type, a 50000000012003 object key, and the event assigned. ********** The two obvious things that spring to mind are either that you've coded your function module exit incorrectly, or you haven't activated the enchancement in CMOD. Here's some code I've used in past, which definitely works: Code: *----------------------------------------------------------------------* * INCLUDE ZXMBCU01 * *----------------------------------------------------------------------* DATA: BEGIN OF KEY, MBLNR LIKE MKPF-MBLNR, MJAHR LIKE MKPF-MJAHR, END OF KEY. DATA: EVENT_CONTAINER LIKE SWCONT OCCURS 0. DATA: OBJKEY LIKE SWEINSTCOU-OBJKEY. READ TABLE XMKPF INDEX 1. "Check with MM Consultant that table will only have 1 line MOVE: XMKPF-MBLNR TO KEY-MBLNR, XMKPF-MJAHR TO KEY-MJAHR, KEY TO OBJKEY. CALL FUNCTION 'SWE_EVENT_CREATE_FOR_UPD_TASK' IN UPDATE TASK EXPORTING OBJTYPE = 'MKPF' OBJKEY = OBJKEY EVENT = 'CREATED' * CREATOR ='' * TAKE_WORKITEM_REQUESTER = ' ' * START_WITH_DELAY ='' * START_RECFB_SYNCHRON = ' ' * DEBUG_FLAG ='' * IMPORTING * EVENT_ID = TABLES EVENT_CONTAINER = EVENT_CONTAINER EXCEPTIONS

OBJTYPE_NOT_FOUND OTHERS = 2.

=1

As you can see, I created a custom event 'created' for a delegated subtype of MKPF, and am using that instead.

S-ar putea să vă placă și