Anda di halaman 1dari 15

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development

- Part 4
Posted by Juan-Carlos Garcia-Garavito 23-Jan-2014 This is the 4th part of this blog .

SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development
http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/21/sap-crmsolman-charmmultiple-target-agents-via-sap-workflow--minimal-abap-development Second part can be accessed: http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/22/sap-crmsolman-charmmultiple-target-agents-via-sap-workflow--minimal-abap-development--part-2 Third part can be accessed: http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/23/sap-crmsolman-charmmultiple-target-agents-via-sap-workflow--minimal-abap-development--part-3-last In the link of part 3 appears the word last at the . That is because with parts 1 to 3 this we consider you have all the elements we researched to do our work and begin working with WF in ChaRM. This part 4 will show how to test the WF as well as running the full scenario using the Web UI plus getting additional details behind the WF scene like how to trace and troubleshoot.

Let's test the WF itself. We select one of our RfCs.

Generated by Jive on 2014-01-24+01:00 1

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

Based on table CRMD_ORDERADM_H we get the GUID #.

Back to SWDD, we click on the test button and provide the mandatory import parameter the GUID #.

Generated by Jive on 2014-01-24+01:00 2

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

You get a confirmation that the task is in process.

And from there we can access all the logs. Click the Workflow Log button and there are lots of screens there to see, but we will just point a couple of them. The one below gives you access to the Agents that are to process the task to review the RfC. Click on that button and then on Agents.

Generated by Jive on 2014-01-24+01:00 3

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4 As you can see, based on the manager's requirements, even though Requester (Delegate Number 1) is a Delegate, that user is removed from the list of agents to get the Task. Just the OU's Team Lead and the other Delegates get notified.

Back to the main log screen, selecting the button you get access to see the individual steps of the WF and e.g. access the container contents of that particular step. That helps as you can find out you are not passing the correct parameters and need to fix the binding in the WF, etc.

Generated by Jive on 2014-01-24+01:00 4

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

Finally, you can see if the overall WF is stopping at the task it is supposed to be stopped waiting for an asynchronous task to be performed.

Generated by Jive on 2014-01-24+01:00 5

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

etc. You can continue or quit SWDD. Before we create a fresh scenario, we need to enable WF event tracing. Go to transaction SWELS and make sure event tracing is on.

Generated by Jive on 2014-01-24+01:00 6

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

Now, let's create a fresh scenario and for that we will logon as The Boss. We will create a RfC and place it in phase Validation. The Boss and all Delegates should be notified in their WebUI's Worklist. Once any of those Agents moves the RfC to the next phase To Be Approved, the Task in all the Worklists will disappear.

Generated by Jive on 2014-01-24+01:00 7

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

You can access the Worklist and the entry was added there.

Before we access the document to Validate it, let's see what happens behind the scenes. Launch transaction SWEL and execute it. The event that starts the WF was launched.

Generated by Jive on 2014-01-24+01:00 8

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

You can double-click on that entry and it will take you to the same Workflow log we access before. But, what does really control that the WF Task is waiting for an action? Transaction SWE3 has the answer. There is an entry automatically created there by the WF Task with the terminating event REQUESTTOBEAPPROVEDNEW. If you select that line and double-click on Object Data you will get access to a list of different GUIDs of RfCs that are in phase Validation (ready to be processed).

You can confirm with table CRMD_ORDERADM_H that the GUID corresponds to the RfC.

Generated by Jive on 2014-01-24+01:00 9

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

Check on the screen above that there is a receiver key 20137, which is reflected in the WF log you can access through SWEL.

Those key values are important as when the event to terminate the task is triggered, it will find the exact entry in SWE3 (Table SWFDVEVINS) to remove it from there, leaving the other entries there untouched. Let's go back to the Web UI and click on our RfC entry in the worklist to review it and promote it to the next phase. The description is the one you entered when created the Task. Below WF adds the link to the RfC. You can click on it to open it.

Generated by Jive on 2014-01-24+01:00 10

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

We validate the RfC and promote it to the next phase.

Generated by Jive on 2014-01-24+01:00 11

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

A couple of things: The RfC gets removed from the Worklist and the WF log diagram shows that the WF for this RfC is completed.

SWEL shows that the terminating event was triggered.

Generated by Jive on 2014-01-24+01:00 12

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

Double-clicking on that entry in the log we click the graphical button and see that the WF is completed.

You can confirm that the document does not exist any longer in SWE3.

Generated by Jive on 2014-01-24+01:00 13

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4

I guess that is sufficient for this blog. Let's just add that there is a table SWWWIHEAD that keeps information that can help troubleshooting. The list was sorted descending and shows in the red square the different steps the RfC has gone through. Some completed, some ready. Accessing that table you can find if, e.g. a RfC phase is on error status.

Some bibliography for you. 1. The 2 workflow pack: Practical WF forSAP 2nd Ed. All the book. It covers almost anything in WF. Excellent. ABAP Development for SAP Business Workflow A couple of tips we got to understand the ABAP programming instructions. Good complement for WF developers http://www.sap-press.com/products/The-Workflow-2%252dpack.html 2. Hoping this does not create a conflict. With all the respect, the guys from http://www.****************. examples to learn WF. Good

3. Mr Nathan Williams and his wonderful book: IT Service Management in SAP Solution Manager. I still do not understand how one guy can do so much and to top it off, he is a musician. Can you believe it? http://www.sap-press.com/products/IT-Service-Management-in-SAP-Solution-Manager.html 4. BRFPlus - Business Rule management for ABAP Applications.

Generated by Jive on 2014-01-24+01:00 14

SAP Solution Manager: SAP CRM/SolMan ChaRM: Multiple Target Agents via SAP Workflow - Minimal ABAP Development - Part 4 http://www.sap-press.com/products/BRFplus-%E2%80%94-Business-Rule-Management-for-ABAPApplications.html 5. BRFPlus. There is this 1-2 days training in BRFplus you can get for free. Excellent material, well organized. There 3 sessions that tell you how that works. http://scn.sap.com/docs/DOC-8824?rid=/webcontent/uuid/90754865-f283-2b10-6d9f-b10f3c28c3a0

And the bonus ... a BRFPlus example. http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/24/basic-brfplus-example-toconfirm-if-an-employee-is-a-team-lead-manager-or-not Enjoy, Juan-Carlos 196 Views Tags: sap_solution_manager, workflow_event_linkage, workflow_trace, workflow_tip, workflow_overview, charm;, workflow_configuration, workflow_objects, brfplus;, charm_7.1; There are no comments on this post

Generated by Jive on 2014-01-24+01:00 15

Anda mungkin juga menyukai