1 4 5 6 7 8 27 Previous Next

SAP Solution Manager

397 Posts

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-charm-multiple-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-charm-multiple-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-charm-multiple-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.

PFAC_7B.gif

Based on table CRMD_ORDERADM_H we get the GUID #.

CRMD_ORDERADM_I.png

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

SWDD_WS99900020_Q.gif

SWDD_WS99900020_R.gif

 

You get a confirmation that the task is in process.

SWDD_WS99900020_S.gif

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.

SWDD_WS99900020_T.gif

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.

SWDD_WS99900020_U.gif

 

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.

SWDD_WS99900020_V.gif

SWDD_WS99900020_W.gif

 

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.

SWDD_WS99900020_X.gif

SWDD_WS99900020_Y.gif

 

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.

SWELS.gif

 

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.

CRM_UI_1.gif

CRM_UI_2.gif

 

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

CRM_UI_3.gif

 

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.

SWEL_1.gif

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).

SWE3_1.gif

SWE3_2.gif

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

CRMD_ORDERADM_J.png

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

SWEL_3.gif

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.

CRM_UI_4.gif

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

CRM_UI_4.gif

 

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.

CRM_UI_6.gif

 

SWEL shows that the terminating event was triggered.

SWEL_4.gif

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

SWEL_5.gif

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

SWE3_3.gif

 

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.

SWWWIHEAD.gif

 

 

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.****************.    Good examples to learn WF.

 

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 that?

http://www.sap-press.com/products/IT-Service-Management-in-SAP-Solution-Manager.html

 

4.  BRFPlus - Business Rule management for ABAP Applications.

http://www.sap-press.com/products/BRFplus-%E2%80%94-Business-Rule-Management-for-ABAP-Applications.html

 

5.  BRFPlus.  There is this 1-2 days training in BRFplus you can get for free.  Excellent material, well organized.   There are 3 sessions in particular that tell you how it 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-to-confirm-if-an-employee-is-a-team-lead-manager-or-not

 

Enjoy,

 

Juan-Carlos

This is the 3rd 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-charm-multiple-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-charm-multiple-target-agents-via-sap-workflow--minimal-abap-development--part-2

 

In the link it appears the word last at the end, because with this we consider you have all the elements we researched to do our work and begin working with WF in ChaRM.     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:     How to trace and troubleshoot.

 

 

So far we have explained how the delivered WF for Approval of the RfC in ChaRM looks behind the scenes, the creation of the subtype of BUS2000116, the events we need for our WF, a brief description about the 2 tasks we use in our WF, and the rule to retrieve the Agents that are to perform the RfC Validation, which includes some theory about evaluation paths.

 

We continue the process with our Validation WF in detail; which we will test out in Part 4.  As a bonus there we include how we build a BRFPlus function that finds if a BP is Team Lead or not in the HR Organizational Unit he/she belongs to.  Why BRFPlus?  Because to work with BRFPlus you do not need a developer key.  That gives you some freedom when you do not have a developer to work with you or you do not do ABAP but know basic SQL statements.  For that reason with BR+ you do not get stopped on your work.

 

6. Our Workflow.

 

The first task is to create the condition that will trigger our WF.  Many ways to trigger an event exist.  There is an ideal in CRM with no ABAP involved.

 

Launch transaction BSVW and select Customer Settings.  We created 2 entries there for our WF:  One that triggers the event that starts the WF, the other one that starts the event that terminates the WF when the RfC phase moves from Validation to To be Approved.    The images should be self explanatory.

 

1st event.

BSVW_3.gifBSVW_4.gif

 

2nd event.

BSVW_1.gif

BSVW_2.gif

Note: It is very possible there are cases in which you need to have more than one User Status that triggers the termination event.  You should check what are the possible subsequent Actions (next phases) within the RfC of Change Object phase you want to introduce a WF.

 

Let's now complete the 2 tasks for our WF, which we copied from the SAP standard ones, as mentioned in Part 2.

 

(There are 2 main tasks in our workflow as described in part 1. We copied both 2 being used by the SAP delivered WF WS17100016.  Some slight modifications were done to ours.

 

4.1 Task TS999000039 is a copy of the SAP delivered one TS17107927 (Get current step information). The copy of that task was done via transaction PFTC. Although it is the same in essence, we changed some texts to our convenience. We will see them later on once we get back to WF.

4.2 Task TS99900035 is a copy of the SAP delivered one TS17107930 (Approve Request for Change). The different piece in this task is that we created a rule to retrieve the Agents that are to be notified when the RfC moves to phase Validation.)

 

Via transaction PFTC we call task 999000039, Retrieve RfC Data.  As you see we only changed the description, which takes us to a recommendation we have for you.  SAP WF comes with hundreds of function modules, rules and other objects that are re-usable.  That reduces your efforts considerably.    For example, FM CHANGEWITHDIALOG, which we use below.  Initially we thought we were going to have to create a new method to assign our newly created Task to the Agents.  As step 1 of our trial we approached with caution and tested our task using that method delivered by SAP for the original task we copied from.  It did the work for us at the Validation phase

 

Probably that may not be a big deal for you, but we have faced the same situation at other occasions, and learning about WF as some of you using ChaRM or CRM may be probably doing now,  recycling objects is a heck of a relief.    WF is huge and believe us, it is a great tool that allows you to manipulate almost any scenario you can imagine without harming the integrity of the SAP Product you work with.

 

Back to work,

Finally, important to highlight that Synchronous tasks are executed immediately.

PFTC_1.gif

 

The second task T99900035.    We re-use a SAP delivered FM that fits our needs.  It is responsible for creating the tasks for the Agents.  It is asynchronous as we do not know when the Agents are going to check the RfC to Validate it.    While this task is active, the WF stops and waits for resolution.

PFTC_2.gif

 

Below the tab with the Terminating Event data.  Besides the task description, this is probably the main reason we had to create this task as a copy of the task delivered by SAP in the Approve RfC step of the WF.  The event we use is different.

PFTC_3.gif

 

With the 2 tasks available we are ready to create our WF using transaction SWDD.  As explained before, when you create a WF Template, if there are Activities you want to add (Tasks), just grab the icon from the right hand side of the screen, below Step Types that Can Be Inserted, the correspondent Activityicon,  and place it in the middle of the flow window on the right hand side, between Workflow Started and Workflow Completed.    When you create a WF for the first time, there is already an inactive Activity (Task) there, hence you may only need to drag and drop from a second task on (in a two-task WF)

SWDD_WS99900020_1.gif

FYI, there is a bar on the right hand side of the screen that gives access to different WF menus.  We used 2 for our exercise:  The first one and Workflow Container.

SWDD_WS99900020_8.gif

 

In that window, switch to WF Container as we need to add an element to our container (Container is where parameter values are kept during the WF execution).  There is an object BUS2000116 delivered by default when the WF is created, but which is useless.  We had to create a new one, almost with the same configuration, only different name and mandatory as it is a requirement for the WF to start. 

 

To create the object, follow the screens.

SWDD_WS99900020_9.gif

SWDD_WS99900020_A.gif

The screens below complement are accessed when you click on the Hat.  They contain the WF description and the triggering event.

SWDD_WS99900020_B.gif

 

SWDD_WS99900020_C.gif

Note: Do not worry about the variables at this moment.  Below you will get to know about bindings.

 

The other general tab is the Start Event, which shows the WF trigger event.  The A (Active) green square on the right hand side refers to the automatically created entry in transaction SWE2 (see further down).  The two little green mail envelopes show the bindings or parameter values that are passed from one object to the next in the WF.    For the case below, those are the parameters passed from the event to the WF:  1. The so called _EVT_OBJECT is passed to the WF mandatory Container object we created above, REQUESTFORCHANGE.  2.  The _EVT_CREATOR is passed to the _WF_INITATOR.
SWDD_WS99900020_D.gif

 

A couple of views of SWE2, which entries are automatically created when you add the event to the screen above and activate the linkage. 

 

FYI, as long as the linkage is active, the event will always start the WF.  In other words, you could have a WFbeing repaired and you can temporary remove the linkage in SWE2 directly or clicking in the green square in the screen above to turn it to gray or grey (color spell depends whether the reader is from America or from England or a former English Colony).    That will avoid the WF from start, no matter if the event is still triggered.  Very useful, because you can have the same event starting many workflows, and by this approach you do not affect the other WFs functionality while fixing one of them.

SWE2_2BVALIDATED.gif

SWE2_2BVALIDATED_2.gif

 

First Task:  To access it, we double-click on it.

SWDD_WS99900020_E.gif

In the Control Tab the Task we created is entered. Adding the task, will add the task description below, the fact that it is synchronous and run in the background.

SWDD_WS99900020_F.gif

Let's take a look at the bindings (the button under task number).  Most of the bindings, at least 90+% are automatically added by default or when you click the generate button, they get added for you.  All depends on the task definition and the object it interacts with (WF, rules, e-mail, or other steps).  You may only need to manually bind when you have created your own objects in the Container, which SAP sometimes can not recognize.  We  will visit that scenario below.  In principle you pass Container elements from one object to another so that the values do not get lost, though WF does not loose track on the core ones, e.g. REQUESTFORCHANGE.  For that case, you only pass them from the object to the WF if you updated them.  Still you need to pass them from, e.g. the WF to the Task, because the task may have a method that needs to read from the container.

SWDD_WS99900020_G.gif

The last tab in this first task is the outcome.  We will get a better understanding in the next task, as this one is background and basically it is an outcome created by default.

SWDD_WS99900020_H.gif

 

Second Task: To acccess it, we double-click on it.

SWDD_WS99900020_I.gif

In the Control Tab the second Task we created is entered. That will add the task description, which is what the Agents will get in the notification of the task they access either in the SAP Business Workplace or in the Web UI's Worklist.  You can see also that the Agents are defined by the AC Rule we already created.

SWDD_WS99900020_J.gif

 

Pressing the button under the task, we get the bindings between the WF and the Task and the returned values after the task is executed.  Remember that no values back does not mean data gets lost. Most of the data in the container is retained always in the WF.

SWDD_WS99900020_K.gif

The rule we created had an container parameter for import, the RfC #.  When the rule is added to the WF, the binding window has that object available in list of objects of the rule window.  It is our duty to bind it to an element of the WF, for which we drag and drop on both windows the correspondent matching partners.

SWDD_WS99900020_L.gif

Note:  We tried to pass the GUID, but we still need to learn how to deal with RAW16 types, as it looks like they require some kind conversion to 32 characters or vice versa.  So farm the RfC # does the work for us.

 

Let's review some of the rule screens.

SWDD_WS99900020_M.gif

SWDD_WS99900020_O.gif

 

In the logic of the method the rule uses, we retrieve that RFC # from the rule's container.  That is the way you retrieve a parameter from a container.  Knowing that, opens up door to transfer anything you need:  single variables, tables, anything.

SWDD_WS99900020_P.gif

 

And that is all you need in the WF.

 

In the next and final blog of this topic we show you how to test the WF with SWDD and we will test the whole ChaRM functionality involved, as well.

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/23/sap-crmsolman-charm-multiple-target-agents-via-sap-workflow--minimal-abap-development--part-4

This is the 2nd part of the 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-charm-multiple-target-agents-via-sap-workflow--minimal-abap-development

 

Doing a recap, so far we have explained how to create the subtype of BUS2000116 and the events.

 

We continue with Tasks, Rule and HR evaluation paths.

 

4. Tasks.

 

There are 2 main tasks in our workflow as described in part 1. We copied both 2 being used by the SAP delivered WF WS17100016.  Some slight modifications were done to ours.

 

4.1 Task TS999000039 is a copy of the SAP delivered one TS17107927 (Get current step information). The copy of that task was done via transaction PFTC. Although it is the same in essence, we changed some texts to our convenience. We will see them later on once we get back to WF.

4.2 Task TS99900035 is a copy of the SAP delivered one TS17107930 (Approve Request for Change). The different piece in this task is that we created a rule to retrieve the Agents that are to be notified when the RfC moves to phase Validation.

 

5. Rule.

 

The specification we got from our it management: For RfC Phase Validation, obtain from the HR Organizational Unit the RfC Requester works for, the Team Lead and the Delegates. Those are to be the WF Task Agents. Exception: If the RfC Requester is not a Team Lead, but a Delegate, that Delegate will not be a Task Agent.

 

It is essential for our ChaRM solution to work, that we have a HR Structure in place. You can copy and maintain it up-to-date via ALE from your ERP Production to SolMan, or you can download/upload it from the same source and target (which does to provide maintenance capabilities), or as in our case, where we have a big organization but a small group of individuals who deal with ChaRM, create our own Org. Structure in SolMan, where we could also add our own relationships to complement our needs.  That is a simple exercise you can do with transaction PPOMA_CRM.  Should not take you longer than half a day to setup a structure of 100 people with basic relationships.

 

If you need more details, please reply to this blog and I will add that section. I will avoid it for now as there is still a lot of work to add.

 

One of our Org. Units looks like this:

PPOMA_CRM1.gif

 

You can see a couple of things on the screen:

  • The Boss is the Team Lead. (The one with the hat)
  • There is a Delegate Position (denoted with an S), that has 3 BP-Users assigned to it.
  • There is a Member 4, who is an independent delegate.
  • The last 2 items will be used to demonstrate that you can have 2 approaches to designate somebody as Delegate of a Team Lead, either by adding a relationship between a Position and the Boss' position, or by dropping other BP-US to a Position that is already a Delegate.  The former is what you see with position Member 4,  and the latter what you see with Position named Delegate, in which we dragged and dropped BP-US Member 5 and Member 6, respectively.  Delegate Number 1 was not dropped there.  It is the BP-User that held that Position from the beginning.

 

Now, PPOMA_CRM allows you to create Org Units, Positions, and to add BPs and Users, but there is no way to define there Delegate and Team Lead relationships.  That is done using transaction PO10 (for Org Units) and PO13 (for Positions).

 

As you see below in transaction PO13, we created a relationship A311 between the Position (S) 50001385 and the Position 50001382 to reflect what we call Delegate of and SAP calls Substitute.  If you see the diagram above, S 50001382 is The Boss (Team Lead). 
PO13_1.gif

 

Now, let's look at the view from The Boss' perspective.  There are 2 Ss that are Delegates/Is substitute of S 50001382 (Relationship B311), and also 50001382 Manages OU 33333339 (Relationshiop A012)

PO13_2.gif

 

Let's pause for a moment to explain the concept of A and B.  A relationship in HR uses a number, e.g. 311, but if the relationship is seen from a lower object to a higher object in the Org Structure, SAP uses the prefix letter A, and they use prefix B to describe it from the opposite object.  That is why in the example above, from the Team Lead's perspective, the delegates are seen as Bs, and the fact the the Team Lead is the Manager of an Org unit, is seen as an A(005), because the Manager is at a lower level than the Org Unit being managed.

 

Note:  When you create a relationship like B311, the respective A311 is created in the Delegate's Position, hence you have to worry about only one-way of relationship to create.

 

Other element to keep in mind from the picture above is that as you can see the Position (S) is between the Org Unit (O) and the Central Person (CP).  That means that so far we have a structure that seen from top to bottom looks like O-S-CP.  However, the picture from PPOMA_CRM does not reflect the CP relationship, but it reflects BP and US depending on S.

 

The connection of all this is in tables HRP1000 and HRP1001 (infotypes 1000 and 1001 - tables that store HR data).  For our case in table HRP1000 we see that there is an entry for OBJID S 50001382, it shows the relationship A008 (holder) with object CP (Central Person) 50000776.HRP1001_1.gif

 

Going back to HRP1001, but this time searching on OBJID 50000776 we find 2 erlationships B207 and B208.  If you check in transaction OOVK, those relationships are both Is identical to.  That means that CPis identical to BP, and identical to US.  That concept will help for the next step.
HRP1001_2.gif

 

Back to our exercise, we need to retrieve the Team Leads and Delegates of an Org Unit.  In order to do that we need to create an HR Evaluation Path if the ones already there do not comply to our goal.  FYI, you can use report RHWEGID0 to find out Evaluation Paths based on what you are looking for.      For the case, we looked for any EP that started in O, and went to US using S.  None of them worked for us.

 

So, using the transaction OOAW we created the following EP, which looks more dramatic than what it is.  In plain words: We start with an Org Unit (O) to search via relationship B012 the Position (S) that manages it.  From that S using relationship B311 we look for the Ss that are substitutes (Delegates).    For all retrieves Ss so far using relationship A008 we retrieve the Central Persons (CP) holders of those Positions, and from there also the correspondent BPs and USers.

OOAW_1.gif

 

To test that EP we run report RHSTRU00.  Provide the Org Unit and the Evaluation Path.

RHSTRU00_1.gif

 

We obtain the result, that if you compare with the PPOMA_CRM picture provided top conclude we only retrieved the Boss and the Delegates, which is what we are looking for.

RHSTRU00_2.gif

 

With the same approach we created another EP that retrieves the Organizational Unit when a user is provided.    The reason for creating it and not using, e.g. the SAP delivered one WF_ORGUN, is due to the way the HR data is created and stored in table HRP1001 when using PPOMA.OOAW_2.gif

OOAW_3.gif

 

As you see above, WF_ORGUN requires the existence of a relationship between USer and P (Person), but in SolMan PPOMA_CRM the additional entry it creates in HRP1001 when hooking up a Position to a BP and a USer, is a relationship between that Position and a CP (Central Person), and not P (Person).  Two different HR objects.

 

How to test that the EP works fine was already explained, so please take the same approach.

 

With that in place the only pending object before we create the Rule, is the FM that will retrieve the Agents from the Org Structure.

 

The FM has a BRFPlus call that  will be explained at the end of this document, so that we stay focused on the Rule.  That text in Italics in the program below, can be changed with 3 select statements that cover the following:

 

1. Retrieve from HRP1000 OBJID where SHORT = lv_rfcrequester .  OBJID is the actual CP.

2. Retrieve from HRP1001 SOBID, where OBJID = the above CP and SCLAS = 'S'.  That SOBID is the actual Position (S) of the RfC Requester.

3. Retrieve again from HRP1001, where OBJID = the above S and SUBTY = A012.  If you get a record, the Requester is actually Team Lead.  If not, it is a Delegate.

 

Note: You still need to include the fields BEGDA and ENDDA to retrieve active records, but we will show that when we explain BRFPlus.

 

function zch_retrieve_teamlead_delega01.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      AC_CONTAINER STRUCTURE  SWCONT
*"      ACTOR_TAB STRUCTURE  SWHACTOR
*"  EXCEPTIONS
*"      NOBODY_FOUND
*"----------------------------------------------------------------------
include <cntn01>.


tables  crmd_orderadm_h.

 

data:      lt_usersorgunit    type  swhactor,
              lv_numlines         type  i,
              lv_isteamlead      type  boolean,

              lv_objid               type  crmt_object_guid,
              lv_rfcrequester     type  crmt_partner_no,
              lv_rfcrequesterou  type actorid,

              it_usersou           like  lt_usersorgunit occurs 0,
              lv_usersouheader like  lt_usersorgunit,
              it_userstldl          like  lt_usersorgunit occurs 0,
              lv_userstldl          like  lt_usersorgunit,

              lo_factory            type ref to if_fdt_factory,
              lo_function          type ref to if_fdt_function,
              lo_context           type ref to if_fdt_context,
              lo_result              type ref to if_fdt_result,
              lv_result_string     type string,
              lx_fdt                   type ref to cx_fdt.

 

field-symbols:  &lt;ls_message&gt; type if_fdt_types=&gt;s_message.


**Read parameter - RfC # GUID from the WF container
swc_get_element ac_container 'Object_ID' lv_objid.

 

* As this FM is called from an RfC, then the RfC will always exist in table crmd_orderadm_h,
* hence there is no needd to check for SY-SUBRC =0.
select single guid from crmd_orderadm_h
    into lv_objid
    where object_id eq lv_objid.

* As Team Field is mandatory in the RfC, it will always be an entry in crmd_order_index for it.

* Field PFT_7 with an X means that the Partner_No entry asociated in the record is the RfC Requester.

* PFT_8 .. TeamLead;  PFT_16 .. Change Manager; PFT_1 ... Sold to Party, etc.

select single partner_no from crmd_order_index
    into lv_rfcrequester
    where header eq lv_objid

    and  pft_7 eq 'X'.


* Now we use the SAP FM to retrieve the Org Unit that Team Lead works for.
call function 'RH_STRUC_GET'
    exporting
        act_otype      = 'US'
        act_objid      = lv_rfcrequester
        act_wegid      = 'ZCH_ORUN'
    tables
        result_tab      = it_usersou
    exceptions
      no_plvar_found = 1
      no_entry_found = 2.
*      others        = 3.

describe table it_usersou lines lv_numlines.

* Below there should be a logic to deal with a user that belongs to more than one Org Unit (OU)
* but we leave it like that for now, as that is supposed to be identified at the initiation
* of the RfC.  For now, we assume each user belongs to only one OU
loop at it_usersou into lv_usersouheader.
    lv_rfcrequesterou = lv_usersouheader.
endloop.

 

* We now need to find out if the entered TL is actually a TL or a Delegate.  For that we use a BRFPLUS
* function.

* Init BRFPlus
lo_factory  = cl_fdt_factory=&gt;if_fdt_factory~get_instance( ).
lo_function = lo_factory->get_function( iv_id = '001E0BEA00C41EE39E93CE6349D5E0FC' ).
try.
      lo_context  = lo_function->get_process_context( ).
      lo_context-&gt;set_value( iv_name = 'BP_INPUT' ia_value = lv_rfcrequester ).
      lo_function-&gt;process( exporting io_context = lo_context
                          importing eo_result  = lo_result ).
      lo_result-&gt;get_value( importing ea_value = lv_isteamlead ).
  catch cx_fdt into lx_fdt.
      loop at lx_fdt-&gt;mt_message assigning &lt;ls_message&gt;.
        write / &lt;ls_message&gt;-text.
      endloop.
endtry.
* End of BRFPlus


* We keep in lv_isteamlead if the BP entered in the TeamLead field of the RfC is actually a TL or not.

* If it is not, then that BP will not be notified when the RfC enters in Phase Validation, as another body

* than that Delegate must review the RfC, either the actual Team Lead or any other Delegate of the

* Org Unit they work for.

 

* We retrieve the Agents based on the list of Team Leads and Delegate of the Org Unit.
call function 'RH_STRUC_GET'
    exporting
      act_otype      = 'O'
      act_objid      = lv_rfcrequesterou
      act_wegid      = 'ZCH_TLDL'
    tables
      result_tab    = it_userstldl
    exceptions
      no_plvar_found = 1
      no_entry_found = 2.
*      others        = 3.
  append lines of it_userstldl to actor_tab.

* Remove any other entry that is not USer.
  delete actor_tab where otype ne 'US'.
  describe table it_userstldl lines lv_numlines.
  if lv_numlines is initial.
    raise nobody_found.
* If more than one Agent is found and the TL in the RfC is actually a Delegate, remove it
* from Agents.
  elseif lv_numlines gt 1 and lv_isteamlead eq 0.
    delete actor_tab where objid eq lv_rfcrequester.
  endif.

endfunction.

 

Other important screens from the FM.

SE37_1.gif

SE37_2.gif

 

In transaction PFAC create a new rule. Use the create button

 

Note: The recommendation is to use prefixes for all the objects you create. We used "ZCH_" in ours. Below are the different tabs.

PFAC_2.gifPFAC_3.gif

PFAC_4.gif

The rest of the screens are standard.  Add the description at your leisure in the respective tab.

 

Let's test the Rule.

 

We have a RfC where user ending 56 or Delegate Number 1 is the Requester, but that BP is not a Team Lead, but a Delegate.  The rule should retrieve in WF format, all the Agents, Team Leads and Delegates, except for user ending with 56 (Delegate Number 1).

PFAC_7.gif

PFAC_5.gif

PFAC_6.gif

 

With this we complete the Rule.

 

Part 3 contains details on the tasks, rule and our full WF ready for testing.

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/23/sap-crmsolman-charm-multiple-target-agents-via-sap-workflow--minimal-abap-development--part-3-last

Greetings.

 

The present blog intends to consolidate different areas of expertise around SAP Workflow (WF) in SAP ChaRM.

 

Case:  You want to have more than one Agent notified of a SAP WF Task in the processing of a Request for Change (RfC), after that RfC has reached a new phase.

 

Expanded Scenario:   SAP ChaRM comes with a WF when the RfC is set to To be Approved.   We will be explaining how to add a new WF for another phase change when the RfC is moved from Created to Validation.

What will you learn or review at the end of this blog?

 

1.  SAP Workflow basics (Tasks - Rules- Bindings).

2.  SAP Object Types - Delegation, Events.

3.  SAP HR Evaluation Paths.

4.  SAP BRFPlus.

5.  SAP Function Modules.

  • Use of basic Functions to efficiently retrieve HR data,
  • Refine user retrieval with the exclusion of not needed records,
  • How to call a BRFPlus function.

Task for you at then end:  To apply the acquired knowledge to create a new WF to submit multiple e-mail notifications.    Once the basic concepts about WF are understood, the sky is the limit.

 

Clarification. The SAP Workflow we are referring to in this document is the already known SAP Workflow being used since the 90s.   That WF involves some design like the one you do when using MS Visio as well as ABAP developments.    In SAP CRM, the term workflow is used as the flow a business transaction goes through. In the case of ChaRM the CRM workflow involves different phases the RfC goes through like:  Created, Validation, To Be Approved, Approved, etc.   The latter is not the workflow we refer to in the present document, though we are going to use it, by explaining the former.

 

Transaction Type used:  ZMCR (copy of SAP's SMCR), and ZMMJ (copy of SAP's SMMJ).

 

Version:  Solman 7.1 SP9.

 

Waiver:    Many areas are covered in the present blog and we are not bringing this to you as "the solution" for multiple notifications in ChaRm.  The fact is that now that we are using SAP WF in many areas of ChaRM, and calling the same Evaluation Paths and BRFPlus functions at various places, we intend to share the experience with our colleagues.  How many times they have not helped us out?  Countless.

 

If you find the overall WF approach too overwhelming, takes the bults and pieces that you consider apply to your case.

 

Enjoy and have a safe trip!!!

 

 

With all that, let's get started.

 

There has been a lot of good debate in SCN on how to notify more than one user (Agent) when an action in an RfC needs to be taken care of.   As we know, in SAP there are many ways of producing the same result, that why we love it.  We found a niche that could open a huge door of possibilities for people working in SAP CRM or ChaRM.    We hope for that with no presumption, as probably many other ones already use SAP WF in CRM.

 

Due to the revamping of SAP Workflow in recent years there are many new possibilities.  SAP added to the WF recipe the Business Object Repository (BOR), besides the already known ABAP Classes.   With that, SAP provided a carrot in front of us, the hungry dogs who run after it to get it and chew it to develop a better vision due to the Vitamin A in it.  The intention is then to take one more step and consolidate different areas of expertise so that we all get a better understanding of a component of this tool that provides bread onto our tables, or a new gadget to buy.

 

1. Explanation of how the delivered SAP WF works when the RfC is switched to phase To Be Approved.

 

The main two elements that are involved are:

 

1.1 Via Transaction CRMC_ACTION_CONF, there is an action that runs in the background when the RfC is To be Approved.

CRMCACTIONDEF1_SAPStd.gif

That I1387 in the Tab Start Condition is a System Status.   FYI, there are User Statuses and System Statuses when referring to RfC or Change Document processing.   User statuses begin with an "E".  They can be found in table TJ30 when searching for  Status Profile ZMCRHEAD or ZMMJHEAD.

TJ30_ZMCRHEAD.gif

 

The get to the System Status, one way is through the IMG:   SAP Solution Manager > Capabilities > Change Control Management > Standard Configuration > Transaction Types > Status Administration > Define Status Profile for User Status > choose ZMCRHEAD >   As you see above, the column CRM_VRGNG refers to Business Transactions (BT).  For phase To be Approvedthere is a BT C4AP.    Based on that, from the menu choose Environment > Transactions  > look for C4AP and double-click on it >  Page down and you will see that the System Status I1387 is set when the RfC is moved to phase To be Approved.

C4AP_BT.gif

In the background as reflected in the blog, http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/20/sap-charm-basic-business-transaction-table-storage-diagram, there is a table CRM_JEST that stores the System and User Statuses during the lifetime of a RfC.    In the example below that you can corroborate with the information provided above, the RfC shows some Active Statuses (the ones with no 'X' in column INACT).  They are:  User Status:  E0015 (Release for Development), and System Statuses:  I1003:  PROC (In Process), and I1385: CAPR (Approved).    I1387 CAAP is inactive, as that RfC was already approved.

RfC_CRM_JEST.gif

Note:  You can directly access the Business Transactions via transaction BS32, or the System Statuses via transaction BS22.  Why did not I mention that before the long walk!!!

 

Now, back to the Transaction Type in CRMC_ACTION_DEF, the tab Processing Details shows that the method being executed is APPROVE_RFC_VIA_WF.  Press the right button as shown below to get access to that method.  Then go to the tab Interface and double-click on the Method EXECUTE (our apologies as we are not adding all the screens, because there is still plenty of work to add to this blog).   We are just at the beginning.

CRMCACTIONDEF2_SAPStd.gif

 

This method is the one that deals with the RfC approval.  We want to highlight just 2 fundamental calls there that hook up to the SAP WF.   The method uses FM SWE_EVENT_CREATE to trigger 2 events.  The second one highlighted is requesttobeapproved and the first one is stepexecuted.

EventsCalled_ZMCR2BAPPROVED.gif

In transaction SWE2 we can see what WF (Receiver Type) is launched based on events.   There is an entry there that after double-clicking on it looks like this:

SWE2_2BAPPROVED.gif

Note 1:  Important that the linkage is active for the Event to actually launch the WF.

Note 2:  It is assumed we all understand that the Object Type being used in ChaRM is BUS2000116.    If we have time, we will provide more details, but for now let's accept as a fact.   FYI, Object Types are administrated via transaction SWO1 (letter 'O').

 

Let's now access the WF  mentioned above, WS17100016 using transaction SWDD to get to know the 2 elements that connect all this.  We will not go into more details of that WF, for now.

 

As you can see by clicking on the Hat icon to get access to the main tabs, the tab Start Events, shows that the event REQUESTTOBEAPPROVED is the one that starts this WF.  The column Active with the green square is actually the entry Linkage Active of the previous screen. In other words, in your experience with WF, you could create lots of WFs and Events, but only have active WFs when you activate the specific linkage.  That is a core element that shows the flexibility and ergonomics of WF.

SWDD_WS17100016_1.gif

 

That is one of the events.  The one that starts the workflow.  What about the one that terminates the WF, when the agents actually approve the RfC?

The diagram below displays the actual WF.  Double-click on the task 00012 Approve Request for Change.  SWDD_WS17100016_2.gif

 

Once you do that, you will see that the task being executed if TS17107930.  Double-click on that task and check the Tab Terminating events.It shows the event BUS2000116/STEPEXECUTED.  When that event is triggered, it terminates this task.  For the case, that action happens as soon as the RfC is approved as the method APPROVE_RFC_VIA_WF, mentioned above, contains the FM call that triggers that event.

SWDD_WS17100016_3.gif

 

The events are defined in the Object Type they refer to.  If you go to transaction SWO1 > BUS2000116 > Display > Events, you will see the events defined for that Object Type.  For SAP CRM, there are many other Object Types besides BUS20001* (CRM Business Transaction), like BUS20100* (Marketing project), or BUS1006* Business Partner.

SWO1_1.gif

 

That briefly explains the WF SAP delivers for ChaRM.  Now we are going to create our own WF, briefly showing our WF to then go to each of the details in the chronological order they are supposed to exist before you put them altogether in the WF.

 

2.  Our WF when RfC enters in Validation.

 

Via transaction SWDD, our basic WF looks like this.   (It was based on the one delivered from SAP WF Template WS17100016).

SWDD_WS99900020_1.gif

 

Note:  Creating a WF is quite simple.  Once you get to this transaction, press the Create button.  It will then provide a basic skeleton and all you need to do is to drag and drop from the left hand side of the screen, from under Step Types That Can Be Inserted, the steps, e.g. Activity, or Send Email, that you want implement in your WF Template.  After that, by double-clicking on each added step, you will get to provide the details.  if there are steps that you do not need any longer, just right-click on them and select Delete.    At the end of each major change, the buttons Check and Generate will activate the latest version of your WF Template.

 

Note:  WF or WF Template in this document refers to the same.  In theory in SAP you do not really create a WF per se, but a WF Template, instead, based on our understanding, so far.

 

Click on the Hat button marked above and let's get some details. In the tab Start Events we have an event REQUESTTOBEVALIDATED that starts our WF.  That event is part of Object Type BUS2000116, though it actually belongs to subtype YBS2000116 that we created, as we are not supposed to change the SAP Standard Object Type.  Details will be provided further down.

SWDD_WS99900020_2.gif

The WF has 2 main steps.  One that retrieves the data from the database, and the other one that actually notifies the users (Agents) that an action is required for them to review the RfC and Validate it or not.  The beauty is that the task (item) will be placed in the WebUI User's Worklist of the agents to act up on.

 

Step 1.  Retrieve Object Information. It is a background task.  Background tasks do not have Agents assigned to them.

SWDD_WS99900020_3.gif

 

Step 2.  We back out and select the our WF second task.    Further down, we will describe Task TS99900035 and AC Rule 99900006. The latter is the approached we took to retrieve the HR users that become Agents or responsible ones to act up on the task.

SWDD_WS99900020_5.gif

 

Double-clicking in the task TS99900035 you can see below that there is the other event we need to care about:  REQUESTTOBEAPPROVEDNEW.   That event is the one that terminates the Task, which for our case will happen once the RfC moves from phase Validation to phase To be Approved.

SWDD_WS99900020_6.gif

 

So, we need to explain to you in order the following items:

 

  • How to create the new events we need and how they get triggered.
  • Creation of the tasks we are going to use.
  • Creation of the agent retrieval rule.

 

Note: All the changes further down better to be done if your account has an associated developer key.   There are issues in which you will not get an error, but the functionality will not be there until the account you use has that access.

 

3.  Events.

 

We need 2 new events REQUESTTOBEVALIDATED and REQUESTTOBEAPPROVEDNEW.

 

If you have not done so, we need to create a subtype out of Object Type BUS2000116.   Launch transaction SWO1 and follow the screens, please.   FYI, Our subtype was named YBS2000116.

SWO1_4.gif

 

Save this into a request ...

 

The next necessary step is the delegation of Object Type BUS2000116 into YBS2000116.  In plain words, we are using Object Type BUS2000116 all over the ChaRM configuration, but we will be placing our enhancements in YBS2000116.  We want to allow that everywhere BUS2000116 is used, the YBS2000116 content is accessible, as well.   For that launch SWO1,

 

  SWO1_5.gif

The next entry is tricky to be created.  We do not know if it is the gui we have or what, but to add a new entry was not that simple.  In the end, you should get access to create a new entry, below is what we provided after.

SWO1_7.gif

The new entry should look like this.

SWO1_6.gif

 

Note: If you do not do this delegation with a a user with a developer key, the delegation seems to be fine, but will not work.

 

Save your changes.

 

Now back to SWO1 let's create the 2 events mentioned above for Object Type YBS2000116.  Get into Change Mode and open up the Events folder and press  the create button

SWO1_8.gif

Below the 2 events.

SWO1_9.gif

SWO1_A.gif

In order to be able to use those events in BUS2000116 after they are created, choose each event and from the menu:  Change Release Status > Object Type > To implemented, and also:  Change Release Status > Object Type Component > To implemented.   That will remove the little squares on the right side of the events and they will be available in Object Type BUS2000116.
SWO1_B.gif

 

End result:

SWO1_C.gif

Note:  You see more events because now we use WF in many more areas.

 

In the next part we continue with the Tasks and Rule we use in our WF.

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2014/01/22/sap-crmsolman-charm-multiple-target-agents-via-sap-workflow--minimal-abap-development--part-2

Hi there:

 

We created a small basic diagram that shows you and your developers which are main tables related to ChaRM where the Business Transaction data gets stored.

 

Two main component sets are part of the diagram:

 

  1. Business Partner, where you find the tables with data related to the BP, identification, HR related information, etc.
  2. Transaction, where you find the tables that store most of the Business Transaction related data, including our own customer developments.

 

It is important to mention that within each box, we placed the main table fields that server as connectors between tables, following the arrows.    Kind of foreign keys.

 

There is still an extra resource you may already know.  The report CRM_ORDER_READ.  In that report, you provide a Business Transaction and you will obtain the list of tables that contain records that pertain to that BT in particular.    Unfortunately, the report does not give you a connection between an RfC (ZMCR) and its own Change Objects (ZMMJs), or between either of them and their date field values.  At that moment is when the provided diagram gives you the complementary assistance to hook up the pieces together.

 

We hope the diagram becomes beneficial for you and any feedback to make it better is very appreciated.

 

Our apologies for the colors.  There was no inspiration for that today.  They were used to highlight the pairs of tables that stored complementary-to-one-another data.

 

Regards,

 

Juan-Carlos Garcia-Garavito

 

Updates:  2014-Apr-01.  Better resolution and added Project-related linked tables.

We all use E-mail notifications in Solman, but not always all standard features satisfy our requirements. This blog will explain how you can make own Schedule/Start condition checks via PPF BADI for sending Emails.

Schedule condition - EVAL_SCHEDCOND_PPF

Start condition - EVAL_STARTCOND_PPF - this will be covered here

* Note EXEC_METHODCALL_PPF - is available also, but this type BADI will cost you more coding

          CONTAINER_PPF - only works if you use BOR objects, possible in ITSM but not for Charm ( requires BOR objects skills ).

 

Example Scenario: Normal Change send email to Developer when Developer Changed.

 

Steps:

  1. Create Implementation for EVAL_STARTCOND_PPF with
    filter
  2. Create Action with Rule Type Conditions Using Business
    AddIn (BAdI)
  3. Choose start condition filter created in point 1
  4. Define parameter PARTNER_CHANGE
  5. Fill implementation with logic
  6. See results


1. Okay let's start create Implementation for EVAL_STARTCOND_PPF with filter Z*

 

Launch SE18 choose BADI Name and enter EVAL_STARTCOND_PPF

ppf 1.JPG

 

Choose Filter Value - Create

ppf 2.png

 

Give name to Implementation f.e. ZBD_SOLE002_PPF  and filter = ZPARTNER CHANGED and hit confirm

ppf 3.JPG

Save changes and activate BADI ( Coding will be covered in next steps )

Ok now we are ready to see this in PPF conditions.

 

2.Create Action with Rule Type Conditions Using Business AddIn (BAdI)


Tcode SPPFCADM, choose CRM_ORDER and hit Define Action Profiles and Actions

ppf 4.JPG

Choose Action profile in our example its a ZMMJ_ACTIONS copied from standard SMMJ, double click Action Definition

ppf 5.JPG

Create New action f.e. ZMMJ_MAIL_DEV_CHNGE:

Mark - Scheduled Automatically

Processing when saving document

No restrictions

Partner-Dependent

Rule Type - Conditions Using Business AddIn

Merging and technology look at pic below:

ppf 6.JPG

In processing Types you may use standard Email notifications / Class, but in my example Custom used

ppf 7.JPG

 

3.Choose start condition filter created in point 1

Tcode SPPFDETCRM, Application CRM_ORDER, Action Profile ZMMJ_ACTIONS and Mode = Change

ppf 8.JPG

Add  ZMMJ_MAIL_DEV_CHNGE and choose Start conditions - find your Z* condition

ppf 9.JPG

4.Define parameter PARTNER_CHANGE

Now we need to add Parameter

ppf 10.JPG

Initial Value SMCD0001 - Developer

ppf 11.JPG

Save all

 

5.Fill implementation with logic

The final step is coding, its very simple so don't worry much about it

Find you Implementation by same method described in first step use Overview section.

*Note there two FM's used CRM_PARTNER_READ_OW - give all information from buffer and CRM_PARTNER_READ_DB - what is in Database

  Simply compare values

  DATA: lr_crm_order        TYPE REF TO cl_doc_crm_order,
        ls_object          TYPE sibflporb,
        lv_partner_fct     TYPE crmt_partner_fct,
        lv_item_guid        TYPE crmt_object_guid,
        lv_guid            TYPE crmt_object_guid,
        lv_guid_db         TYPE crmt_object_guid,
        lt_partner_db      TYPE crmt_partner_db_tab,
        ls_partner_wrk     TYPE crmt_partner_external_wrk
       .
  ep_rc = 1.
  lr_crm_order  ?= io_context->appl.
  IF lr_crm_order->get_crm_obj_kind( ) = 'A'.
    lv_guid  = lr_crm_order->get_crm_obj_guid( ).
  ELSEIF lr_crm_order->get_crm_obj_kind( ) = 'B'.
    lv_item_guid  = lr_crm_order->get_crm_obj_guid( ).
    CALL FUNCTION 'CRM_ORDERADM_I_READ_OW'
      EXPORTING
        iv_guid        = lv_item_guid
      IMPORTING
        ev_header_guid = lv_guid
      EXCEPTIONS
        item_not_found = 1
        OTHERS         = 2.
  ENDIF.
  CHECK NOT lv_guid IS INITIAL.
  CASE flt_val.
    WHEN 'ZPARTNER CHANGED'.
      CHECK ii_container IS NOT INITIAL.
      CALL METHOD ii_container->get_value
        EXPORTING
          element_name = 'PARTNER_CHANGE'
        IMPORTING
          data         = lv_partner_fct.
      CHECK lv_partner_fct IS NOT INITIAL.
      SELECT SINGLE guid FROM crmd_orderadm_h INTO lv_guid_db WHERE  guid = lv_guid .
*        Read Main Partner from Buffer
      CALL FUNCTION 'CRM_PARTNER_READ_OW'
        EXPORTING
          iv_ref_guid          = lv_guid
          iv_ref_kind          = 'A'
          iv_partner_fct       = lv_partner_fct
          iv_mainpartner_only  = 'X'
        IMPORTING
          es_partner_wrk       = ls_partner_wrk
        EXCEPTIONS
          error_occurred       = 1
          parameter_error      = 2
          entry_does_not_exist = 3
          OTHERS               = 4.
      IF sy-subrc <> 0.
        "Issue with Buffer
      ENDIF.
*        Read Partners from Database
      CALL FUNCTION 'CRM_PARTNER_READ_DB'
        EXPORTING
          iv_ref_guid                   = lv_guid
          iv_ref_kind                   = 'A'
        IMPORTING
          et_partner_db                 = lt_partner_db
*         ET_ATTRIBUTES_DB              =
*         ET_CUST_ATTRIBUTES_DB         =
*         ET_CUST_RELATIONS_DB          =
        EXCEPTIONS
          entry_does_not_exist          = 1
          record_not_found              = 2
          at_least_one_record_not_found = 3
          parameter_error               = 4
          OTHERS                        = 5.
      IF sy-subrc <> 0.
        "Issue with Buffer
      ENDIF.
** Compare Partners from Buffer and DB
      READ TABLE lt_partner_db WITH KEY partner_no = ls_partner_wrk-bp_partner_guid partner_fct = lv_partner_fct TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        ep_rc = 4.
      ELSE.
        ep_rc = 0.
      ENDIF.
    WHEN OTHERS.
  ENDCASE.




6.See results

Okay we done, don't forget to activate BADI.

Launch SM_CRM find or create new Normal Change, after this try to change Developer.

Each time you change it email will go to New Developer when saving document.

 

p.s. for the EVAL_SCHEDCOND_PPF methodology is same.

Have fun using it

Hello,

 

I was reading last interesting topics on SNC topics and I found one really interesting to SAP Solution Manager, I just found a SNC Index that was created by Jason Lax  a time ago, that is a SCN Site Index http://scn.sap.com/docs/DOC-19361 when I found for Solution Manager place, I see that there is a new one more about solman on status "archived":

 

SAP Solution Manager for VAR Partners (Read Only Archive)

 

That make me to remember an old request from Wences to split Solution Manager forums in different topics: http://scn.sap.com/thread/3355102

 

Now Solution Manager is part of a IT-Management that contains ( # of Followers ) and the next hierarchy of places:


-> IT-Management  ( 109 )

-> Virtualization and Cloud Infras… (124)

-> Virtualization on Windows  (68)

-> Application Lifecycle Manag.. (174)

-> Software logistics ( 128 )

-> SAP Solution Manager ( 908 )

-> SAP Solution Manager for VAR Partners ( 33 )   [ That one is read only ]


My Impressions,

One important thinks of my daily work is related on the setup and maintenance of Solution Manager on VAR scenario to allow SAP customer's to request SAP service with the help of Solution Manager like support send Support Message to SAP( not notes...http://bit.ly/KTjROm  ), access to ewa report for each productive systems and access to Maintenance Optimizer to download software and create XML stacks. Related to VAR scenario there is a special setup to use a Solution Manager as a PCOE ( Partnner Center of Expertise ) and use different tools allowed to Run SAP Partners; for that I access to SCN as a daily routine to see If there is any important new related to Solution Manager. If you read the last discussions on Solution Manager SCN forum you can see that on title or trough tags, you are not able to filter content inside the forum to see only information related to VAR/PCOE/RunSAP topics. You can setup Solution Manager in a different ways to meet different goals.



As my own opinion, an some colleagues/partners, Solution Manager forums need a split, don't know if it can be done as Wences suggest split it by solution manager functionality or another way but It will help consultants and basis people to find correct content or follow updates only from a single topic.


Final words.

  1. What do you think to split Solution Manager forums ?
  2. Need "SAP Solution Manager for VAR partners" been restored to edit mode ?
  3. What is the best Split Option for Solution Manager Forums ?


My own answers:

  1. It could be really interesting and useful.
  2. Yes, there are a lot of VAR topics that can be collected inside that forum.
  3. The group of solution manager scenarios change on every new solman document that SAP release , one of my favorites is which one you can see on page 4 of that overview https://websmp206.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000741018&_SCENARIO=01100035870000000202&, ITSM, IT Porfolio & Project Management, Monitoring (BPMON & Tech)  and ALM. And you can add a new one group to VAR specific scenario and another for methodologys (runsap, asap, itil, ...). That will split Solution Manager forum on 6 places:
    • ITSM,
    • IT Porfolio & Project Management,
    • Monitoring (BPO & Tech),
    • ALM,
    • VAR,
    • Methodology,

 

I am not able to create a Poll, but maybe some scn moderator can do it.

 

Regards,

Luis

I forgot that second part of saprouter configuration for JAVA diagnostics agents, but thanks to Jeffrey Sterner I remember to finish it,

 

Remember that this problem is related and the second part of an scenario named on that post http://scn.sap.com/docs/DOC-45491 , That is on a VAR scenario where the managed systems are connected to Solution Manager outside of Solution Manager local networks trough firewalls, and 2 or more saprotuers... That's is a real nightmare for saprouter remote connection for diagnostic agents.

 

Error message after diagnostic installation:

 

"Wilyhost Agent] Wilyhost Agent configuration finished without errors, but on Enterprise Manager (sapsolman:6001) no Wilyhost Agent was detected from host  aptest. Please check the log file jvm_smdagent.out whether the Wilyhost Agent could connect to the Enterprise Manager. If the Enterprise Manager configuration  as been changed recently please restart the SMD Agent on OS level and execute the Wilyhost Adapter setup step again"

 

If you look at jvm_smdagent.out  file, you will find:

 

"...10/17/11 09:02:56 PM CEST [WARN] [IntroscopeAgent.ConnectionThread] Failed to connect to the Introscope Enterprise Manager at sapsolman:6001 ,com.wily.isengard.postofficehub.link.net.DefaultSocketFactory (1)..."

 

* The problem is than wilyhost agent try to conect to "sapsolman:6001"! host instead to use saprouter conection.

 

Steps to solve that problem:

 

1. Download the file IntroscopeSapAgent.profile from the Diagnostics agent administration for the diagnostics agent on the managed system

(Agent Administration -> Applications Configuration -> com.sap.smd.agent.application.wilyhost -> Application Resources -> IntroscopeSapAgent.profile )

Make sure to select the correct scope for your agent.

 

2. Edit the downloaded file IntroscopeSapAgent.profile:

 

a. comment out standard entries:

#introscope.agent.enterprisemanager.transport.tcp.host.DEFAULT=localhost

#introscope.agent.enterprisemanager.transport.tcp.socketfactory.DEFAULT=com.wily.isengard.postofficehub.link.net.DefaultSocketFactory

#introscope.agent.enterprisemanager.transport.tcp.port.DEFAULT=6001

 

b. de-comment the saprouter entries and adapt the saprouter

 

introscope.agent.enterprisemanager.transport.tcp.host.DEFAULT=/H/199.100.1.5/S/3299/H/solman.domain.com/S/3299/H/solmanserver

introscope.agent.enterprisemanager.transport.tcp.socketfactory.DEFAULT=com.sap.sup.wily.saprouter.SapRouterSocketFactory

introscope.agent.enterprisemanager.transport.tcp.port.DEFAULT=6001

 

3. Upload the modified file to the same scope.

 

4. Reboot the diagnostics agent to activate the changes.

 

5. Check in the Introscope Investigator if the agent is connected.

 

 

Thinks that you have to take in consideration:

 

  1. If you perform a managed system setup on this agent after changing the wilyhost settings you should skip the step for configuring the wilyhost in managed  system setup.  Otherwise the changes you did in agent admin are getting overwritten again.
  2. DEFAULT and SAPROUTER is the key for the other properties like introscope.agent.enterprisemanager.transport.tcp.host.DEFAULT So for your setting SAPROUTER no corresponding properties like introscope.agent.enterprisemanager.transport.tcp.host.SAPROUTER were existing
  3. After a good setup you are able that no problems are registered on logs, but on E2E worload monitor you can't see any data, that is because the extraction for the system need to be re-started to return some records. Verify in some days (after the InfoCube 0SMD_PE2H has been compressed ).

 

More Information:

 

About Diagnostic Agents:

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2013/10/15/diagnostics-agents-verifications-post-solman-installation

 

 

Regards,

Luis

Recently, we have faced some very interesting issues in the SAP Solution Manager 7.1 Roadmap RMDEF/RMAUTH transaction while copying a standard roadmap and creating a customized version of it.

 

What was happening was really very disappointing because we are not able to see any documentation.

 

Whenever we are trying to copy a standard roadmap in RMDEF transaction to create a custom one the pop up appears with error message

"No info object found for the specified context" & further below error in RMAUTH

"00000000000Enhancement/KWCUST/(Release 610) does not exist'

 

In addition, the system displays no documentation in the RMAUTH transaction as shown below for any of the nodes.

 

 

I have checked on this error over Marketplace and found few SAP Notes like below

  931567 - Message 'No info object found for the specified context'
1134243 - KW editing: No info object found for specified context

 

But unfortunately none of the above notes helped us as they can't be implemented via SNOTE since we are in Solution Manager version 7.1 SP08.

 

 

I have thought of checking this in KW table since we are also getting the error "00000000000Enhancement/KWCUST/(Release 610) does not exist'

 

Navigated to path

 

SPRO->SAP Solution Manager->Technical Settings->Document Management->Knowledge Warehouse Options->Define KW Context

 

 

There is no entry maintained for KWCUST 610 rather we have 620(may be overwritten because of SAP Upgrade etc).

 

 

Thus, I have created an additional entry as shown below

 

 

Finally, we have copied again and now we can see the Custom Roadmap with entire documentation for all nodes and further we can continue with customization.

 

First at all Happy New Year !!

 

We started 2014 with a very exciting news, the SAP Solution Manager as a Managed Service is running in a project mode Worldwide and if you are interested in SAP Solution Manager or Application Lifecycle Management, then this is a project that you might follow during this year.

 

Few selected Run SAP Partners around the globe will run in parallel local projects coordinated by SAP AG, in order to deliver the services announced during SAP TechEd to as many customer as possible

SMaMS Map.JPG

 

You can find more details in the following Video, or just by following the SCN Hashtag smams

 

Header 1

Hi,

 

I would need to creating a object level mapping structure for the Field level Parameters-> Development Objects -> Transports-> Impacted Test Cases.

 

This would be a 1:1 o 1:Many mapping depending on the Application scope.

 

Can some one provide some inputs if there is any rool that you can suggest on this.

 

Please let me know if you would require more clarity on this.

Eg: CRM Order Management

 

Table -1

 

Field Level Parameters
Contract #
Order #

 

Table -2

Object Technical
Z_CRM_Contract
Z_CRM_Order ID
Z_CRM_Order Ref

 

 

 

Test Cases
Test Case 1
Test Case 2
Test Case 3
Test Case 4
Test Case 5

Verification on Solution Manager Background processing after an Upgrade or new installation,

 

Hello, to continue with the intention to create a index (main post) of verification that help us to check errors while and after a Solution Manager Installation, now is time for Solution Manager Background Processing; what do you need to check after a solution manager installation to avoid problem while setup different solman scenarios.That topic is only an overview of some key in the background processing, Solution Manager use a huge number of reports, programs or service on background that are not described here, my intention is only to get a list of initial verification before Solution Manager is fully Running.

 

Index:

 

ConnectionsDiagnostics AgentsAuthorizationsBI/BWCRM
Own jobsCentral Correction NoteSaprouterServices SICFSLD/LMDB
Solution ManagerSP Components statusCommunication portsjava stackSystem LandScape
VAR

 

Solman Experts Useful Content:

 

  • waiting...


Diagnostics agents checks:

 

IDVerificationSap noteDescription
1Schedule background jobsCheck if jobs are scheduler correctly with report BTCTRNS2, with that report you can frozen jobs scheduling while an upgrade of the system. I don't use it but found on related documents of some system installations.

 

Basic Administration Tasks - Administration of Business Warehouse - SAP Library

2Solman Jobs894279

Check Solution Manager Jobs, are running without problems, after the installation of Solution Manager and when you finish solman_setup basic configuration and system preparation it's important to check background processing to detect some problems on background processing, on that support note you will find a list of all solution manager jobs and a short explication for each one to help you to understand the functionality of each one.

894279 - Background processing in SAP Solution Manager
3SOLMAN_BTC

That user is the user used for the execution of each background processing, It's usually to see that some jobs are not scheduler with that user, remember to update authorizations from that jobs and re-schedule each job that are not scheduler with that user.

4Job: CCMS_BI_SETUP

 

Job: BI_TCO_ACTIVATION
1863590

ON the process on the activate BI Content, the system scheduler the job CCM_BI_SETUP, that job is one of the most time consuming on the solman setup, the another one is SMSETUP: AGS_IBASE_FORS_SMY (only if you have a huge number of systems). The execution time for me is between 2:00h and/or 4:00.

If you found problem you can check sap note:


1863590 - Parallel jobs CCMS_BI_SETUP

6Job: SAP: LMDB_LDB_00000000001

1669645

1766713

1758666

1555955

1681591

This is one of the another jobs that can run for a long time, it depend of the number of elements in your SLD, if you see that this job runs endless check information on that discussion from Carroll M

http://scn.sap.com/thread/3373669

 

And also check that SAP NoteS:

 

1669645 - No progress during incremental LMDB synchronization

1766713 - Re-Synch from SLD not possible due to missing data supplier

1758666 - LMDB Sync: Timeouts due to too many pending changes

1555955 - SAP Solution Manager 7.1 - Performance Checks for LMDB

1681591 - Correction: SLD --> LMDB synch. connection error handling


You can see more information on System LandScape from Stephanie Janssen:

http://scn.sap.com/docs/DOC-31457


7SGEN

Check if SGEN has been scheduler and finish correctly to avoid users lose time while open different programs for the first time, for solution manager it's not necessary to load all program, the basic load are  for some ABAP programs (ST,SAP_BASIS, SAP_ABA), BPS and Webdynpro

 

SAP Solution Manager Basic Configuration - SAP Documentation

8SelfDiagnostics

As background processing is basic for Solution Manager functionality, it is checked by Self Diagnostic tool under Solution Manager Administration Workcenter, if you go to SelfDiagnostic -> settings on "Alert Type" you can see a list of critical jobs for the background processing. Remember to check that this alerts are flagged and look at message log to see if there is any problem.


9VAR Scenario:REFRESH_ADMIN_DATA_FROM_SUPPORT, Download customer Data and installations from SAP Service Backbone (Daily)
AI_SDK_SP_GENERATE_BP_V2 (Generate Business Partners and system users for Service Providers) (Daily)

REFRESH_MESSAGE_STATUS

SERVICE_CONNECTION_LISTENER, check service connection

SM:LONG FILE EXT DOWNLOAD, filter to doc files type that can be send to SAP

-----

If you a are on a new Solution Manager Installation you will not see that background jobs, but if you are on a upgrade from a VAR scenario It's important to stop that jobs until the upgrade has been done. To cancel/frozen jobs you can use report BTCTRNS2

 

Related information from scn forum contributors and friends

 

 

Additional information:

 

 

 

ConnectionsDiagnostics AgentsAuthorizationsBI/BWCRM
Own jobsCentral Correction NoteSaprouterServices SICFSLD/LMDB
Solution ManagerSP Components statusCommunication portsjava stackSystem LandScape
VAR

 

Hope that can be useful for you, if you have more information that can be useful to check a post-solman-installation comment it and i will update that blog post. And of course if you found any mistake tell me and I will fix it .

 

Best Regards,

Luis

During the SAP Teched 2013 in Amsterdam I had the opportunity to attend two hands-on sessions about ITSM, and also to interview David Birkenbach, Product Manager at SAP, together with Tobias Hauk, also Product Manager, about the latest innovations released with SAP Solution Manager SP10 (Feature Pack 2). In this blog I will describe what I learned with David in his session ITM265 - Service Catalog Design with SAP Solution Manager 7.1.

 

The new Support Package 10 brings a list of improvements for ITSM area, some of them necessary to fullfil the ITIL certification, and most of them related to requests that many customers (at least mine) were looking for. Below we can see an overview of these improvements, described by David during his session:

 

  • Custom fields in ITSM BW Templates
  • Enhanced Status schema
  • Email inbound inbox in Dispatcher Role
  • Service Catalog
  • My Messages Widgets
  • Issue Management integration
  • Substitution of Business Partners
  • Enhanced Task Management
  • Knowledge Article converting in pdf documents
  • Search usability improvements (attachments, new search attributes)
  • Single Point of Contact
  • CI Authorization via Organization Model & Extended Business Partner Management with LMDB integration

 

For Service Providers, there are also other improvements:

 

  • Plausibility check for business partner data entry
  • Enhanced SAP component selection

  • SAP Notes Assignment Block in Requester UI

  • Single sign-on using SAP Service Marketplace Certificate
  • End user widget for messages of own organization
  • Substitution function in message widgets.

 

Some details about the main improvements that were shown during the session ITM265 are mentioned below.

 

BW Reporting

 

BW reporting for ITSM was also improved. Now it’s possible to include the fields created by the customer (for example using AET) in the BW templates for Overview, Incidents and Problems. There are  dummy fields available (10 fields of data type CHAR with length 60, 10 fields of data type DATE with length 60 and 10 fields of data type DECIMAL with length 15) in the ITSM BW templates. The mapping of fields created using AET can be done via a BADI (there is an IMG acivity for that) and there are 5 standard dummy fields from object BTServiceH already mapped.

img_bwimg.jpg

Figure 1: IMG activity for mapping custom fields in BW reporting

Status Schema

Status schema was enhanced to allow dependent fields and substatus.

The first one, status-dependent fields, was a functionality already available via an SAP KBA 1817423 (I have already used it in a SP below 10) and delivered with SP10.

img_statusdep.jpg

Figure 2: Example of status-dependent configuration in SP06 after implementing SAP KBA 1817423.

The status-dependent fields check allows us to control that a status cannot be set if the mandatory fields that we configured in the IMG activity are not filled. If one of the fields is not filled, an error message is issued and the status can’t be changed. Note: this check does not work for initial status (created), so we can’t use it to avoid saving the document with one specific field in blank. If you want to avoid saving the document without mandatory fields, check note 1772650 and KBA 1931783.

img_errorstat.jpg

Figure 3: Error message when fields are not filled during status change.

The substatus is a new dropdown field that can be set for a more detailed status based on the main user status of Incidents and Problems. Below you can see the standard values delivered in SP10:

img_substatus.jpg

Figure 4: Standard values for substatus of SMIN.

img_substatus_resolved.jpg

Figure 5: Example of substatus for custom status Resolved (Solution Proposed).

Inbound e-mails

If you use the Dispatcher business role, you can have a dispatcher Inbox for inbound e-mails and undispatched incidents. It’s necessary to configure ERMS (E-mail Response Management System). It’s possible to:

  • Receive e-mails from end users
  • Transfer e-mails into incidents or service requests
  • Rejection of e-mails possible
  • Solutions will be provided via 
e-mail automatically
  • Replies from end user will be attached to the existing IT document due to an auto tracking ID

 

Keep in mind that for the inbound e-mail functionality to work, you need to:

 

  1. Configure the system so that the system can receive e-mails and create a central e-mail address.
  2. Activate workflows generally in Standard Settings for SAP Business Workflow.
  3. Activate workflow ERM1 in Workflow Builder (transaction SWDD).
  4. Create a rule policy for e-mail routing in the IT Service Management WebClient UI.
  5. Configure the e-mail settings, define and assign service manager profiles in the E-Mail Response Management System.
  6. Define the inbox profiles

 

You find these steps described in the IMG Activity for Inbound E-mail. You can also check the wiki with all the details.

 

img_email_inbox.jpg

Figure 6: Slide from the ITM265 session showing the Inbox search and auto tracking ID


Message Widget

 

The Message Widget, delivered with SP5, was improved. The “My Messages” list in the Home page of the Web Client UI was enhanced to show also other transaction types like ChaRM documents, Service Requests and Operation Tasks. It is also possible now to filter by business partner role (reporter, processor, my team) and manage substitutes.

We can now set other people as our substitutes so that they can receive incidents that were dispatched for us and work with our documents while we are absent.  There is an area showing “Business Partners who substitute for me” and another area with “Business Partners for whom I substitute” with a validity date.


img_msgwidget.jpg

Figure 7: My Messages with all transaction types.


img_substitute.jpg

Figure 8: Pop-up to manage substitutes.

Issue Management

Another improvement is related to Issue Management integration. It’s possible to create relationship between your ITSM incidents and SAP Service Delivery issues. In the Incident toolbar, menu “More”, there is an option “Create Issue”.

Incidents can be one part of issue resolution. It's possible to create or assign incidents to the issue. If so, the relationship between Issues and Incidents is displayed in the "Related sources" assignment block.

Knowledge Management

 

Knowledge Articles can now be Auto converted into pdf as attachment (they must be released).  It makes the KA visible in the mobile app. Also, when sending an e-mail from an incident with a KA, a pdf version of the KA will be sent as an attachment.

Single Point of Contact partner

A new partner function called “Single point of contact” was added, following the ITIL best practices. A business partner of this type can be entered for instance before forwarding the incident, to ensure that a single person remains responsible for the complete lifecycle of the incident.

Restriction of Configuration Items

In Web Client UI, at the moment is not possible to restrict the Ibase components showed in the Ibase search via Authorization objects, as we used to do when using transaction NOTIF_CREATE. We see all Ibase components. We can only restrict Configuration Items, but only in 2 ways:  see everything or see what is assigned to the person. With SP10 is now possible to restrict access to LMDB systems using the Configuration Items via Organization model and extended business partner management. For instance, it’s possible to restrict Configuration Items assigned to one Organization, so the business partners assigned to this Organization will only see the CIs assigned to it.

Service Catalog

The biggest development effort was in the Service Request Management area. To fulfill the ITIL certification requests it is very important to have IT Services defined and bundled in a catalog. David explained the possibility to create an IT Service Catalog in Solution Manager, and allow the end users using the End Users Web UI to order the services from the Service Catalog. The core of the Service Catalog is pure CRM functionality, it is already available in other SPs of Solution Manager 7.1, but now the End User UI has a new preconfigured service order process to enable Service ordering like product ordering in an ERP.

img_servicecat.jpg

Figure 9: Slide from ITM265 session showing the End User UI with Service Catalog

There is also an Enhanced Task Management for Service Request Management with Guided Procedures (GP), an Alternative feature to checklists in Service Request.

As we can see, there are many improvements in ITSM with SP10.

Hello experts, to continue with the collection of publications about solution manager verification that you have to do after Solution Manager Installation to reduce the effort and problems while setup any scenario, now is turn of "Own System" verification, before post was "connections", "diagnostics agents, BI/BW, System Landscape and VAR setup".

 

The rule is simple, after basis team give you the access to the system, that collection is a list of checklist to check if there is any error on the installation and/or infrastructure. I use an Excel with all that checks and with only 2 hours you can check if some port is not open, if the diagnostic agents don't have the correct version, some essential user or rfc connection are missing or not working, etc...

 

It's true that all that verification have to be done after the solution manager installation, but as Solution Manager is a complex system (connected to sap, dual stack, a lot of RFC connections, ... ) is usually to find something wrong after the installation of the system if between the start of installation and the end something has changed.

 

Lets got to see that overview of verifications that you have to do that affect only the solution manager system.

 

Index:

 

ConnectionsDiagnostics AgentsAuthorizationsBI/BWCRM
Own JobsCentral Correction NoteSaprouterServices SICFSLD/LMDB
Solution ManagerSP Components statusCommunication portsjava stackSystem LandScape
VAR

 

Solman Experts Useful Content:

 

 

Diagnostics agents checks:

 

 

IDverificationsap noteDescription
1RTCCTOOL69455That is the name of the report for "Service Readiness check", to see if all prerequisites are fullfilled, you can find more information on sap note 69455;
2SCC4

Some functionalists on SAP Solution Manager and CRM are based on the system role, if the system role is not flagged as productive the behavior will not bee the same as if the system is productive, that affect some system jobs, CRM queues manage process, etc... i will update affected functionalists and update here when i find the documentation.

Also it is important to protect the live client to avoid changes directly in productive, that's important if you work with a 2/3 systems landscape.

3Instance Profile1582842

Check that Instance profile parameters are correct as indicated on sap 1582842 , ogin/create_sso2_ticket, login/accept_sso2_ticket, icm/host_name_full, ....

4Work Center

Check that the parameter to improve Work Center Performance is activated.

Around 80% of Solution Manager Management is bases on dammed Work Centers, is important to tune up the system to increase work Center performance, friend Vivek Hegd wrote about that in that post, i test "logon group" and "central data cache".

5IBaseBefore to start solman_setup configuration, is important to clean IBASE entries that can be loaded from some jobs automatically, i clean it to avoid duplicate entries. Most of new solman installations ibase have to be empty before finish solman_setup procedures.
6ICM1252944 Check ICM profile parameter as indicate sap note 1252944 to avoid problems on trace collections.
7SHMM1281896Check Shared memory values are correct in RZ10, you can use transaction SHMM the current values and change if from RZ10 if is needed, the correct values are indicated on sap note 1281896
8Self diagnosticsIt's true that after the System installation you will never see self diagnostics on green status or without any red warning (i never see that ;-) ), but it's useful to run it once and check if there are any important warning to take in consideration for your scenarios.
9CCDB

Configuration Store is used to save configuration data, it's important to check under work center Solution Manager Administrations -> Infrastructure -> on menu select administration ->  Configure Change Database, and check system logs to analyse errors, CCDB is essentially for Change Analysis, Configuration Check,

SAP Library - SAP Solution Manager

10LMSERVICES path level

Check if level path for LMSERVICES is up to date, that will save yo time for "ewa grey" issues, you can check the last patches on that link:  LMSERVICES Patches

11CR-CONTENT669669 Check sap note 669669 to see if the SLD are up to date, if not you have to update it to avoid problems while working with system landscape in sap solution manager, as is indicated on that Sap Note, When you implement or update a scenario, you must update the SAP Component Repository Content (SAP CR Content) in the System Landscape Directory (SLD)....

 

Related information from scn forum contributors and friends

 

Additional information:

 

 

ConnectionsDiagnostics AgentsAuthorizationsBI/BWCRM
Own JobsCentral Correction NoteSaprouterServices SICFSLD/LMDB
Solution ManagerSP Components statusCommunication portsjava stackSystem LandScape
VAR

 

Best Regards,

Luis

In this blog i will describe step by step, how to create and use own custom consistency checks in Charm Change Documents f.e. when status is changed.
We already know that there is standard consistency checks delivered by SAP, Posted by Michael Vollmer

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2013/05/15/charm-framework-an-overview-of-existing-consistency-checks

 

Example Scenario: When  Normal Change switching from "In development" to "To be tested", check that Unit test is attached and have right status.

 

Steps:

  1. Create custom  Z/Y condition
  2. Create Z/Y custom message class
  3. Register custom message class to use in consistency checks
  4. Map messages to conditions ( errors, warnings or cancel )
  5. Assign Custom check to User status of Normal Change
  6. Implement BADI - write logic here
  7. See results

 

All IMG links are available in SPRO - SAP Solution Manager - Capabilities (Optional) - Change Control Management - Standard Configuration - Change Request Management Framework - Consistency Checks. The only object that we have not here is tcode SE91 for creating custom message class to use it here.

 

1. Let's start first Create custom  Z/Y condition

Go to SPRO - SAP Solution Manager - Capabilities (Optional) - Change Control Management - Standard Configuration - Change Request Management Framework - Consistency Checks - Define Conditions

charm 1.JPG

New entries enter give name starting from Z/Y, text - description of condition and assign CL_SOCM_INSTANCE

   * Note for all custom checks always use CL_SOCM_INSTANCE

Example

Charm 3.JPG

Save it, done.

 

 

2. Create Z/Y custom message class
Tcode SE91, create Z message class next create a message

cham 4.png

Unmark SelfExplanatory, create long text for your message example

* Note to insert a link press top menu Include - link - Document class = URL Link

charm 5.png

 

3. Register custom message class to use in consistency checks

Now lets register message for use in Consistency checks Go to SPRO - SAP Solution Manager - Capabilities (Optional) - Change Control Management - Standard Configuration - Change Request Management Framework - Consistency Checks - Register Messages

Add created Z/Y message class, after this go to Single messages - check S - column marked

* Note The Save Message flag must be active for the message to be visible in the change transaction.

charm 6.png

Save, done.

 

 

4. Map messages to conditions ( errors, warnings or cancel )

Go to SPRO - SAP Solution Manager - Capabilities (Optional) - Change Control Management - Standard Configuration - Change Request Management Framework - Consistency Checks - Define Basic Settings

charm 8.JPG

 

5. Assign Custom check to User status of Normal Change

Go to SPRO - SAP Solution Manager - Capabilities (Optional) - Change Control Management - Standard Configuration - Change Request Management Framework - Consistency Checks - Assign Conditions to Status Values

Now we need to map Condition check + Message + Status value where check must be triggered

charm 7.JPG

     *A little explanation this entry means: when status is E0004 ( to be tested ) if consistency checks fails show message 000 of class Z class      and       reset status      back to E0002 ( In development )

Now we done here save and leave.

 

 

6. Implement BADI - write logic here

Go to SPRO - SAP Solution Manager - Capabilities (Optional) - Change Control Management - Standard Configuration - Change Request Management Framework - Consistency Checks - Implement BAdI Extension

 

Last we need to write logic, for this we need to Implement and activate BADI for SOCM_CHECK_CONDITION

Give Z/Y name to Implementation

charm 9.png

Add filter value = Your created  Z/Y custom condition in 1st step

charm 10.png

Now go to Interface and drill down to CHECK_CONDITION method, now here you need to write your logic. I will not describe deeply here.

I will just explain the check behavior, because you may have issues like "some actions are not performed" as error message.

  DATA:
      l_check TYPE boolean.
  conditions_ok = abap_true.
  CASE flt_val.
    WHEN 'ZUNIT_TEST_EXIST'.
      CLEAR l_check.
      l_check = check_real_status( i_guid = hf_instance->change_document_id i_status = hf_instance->estat ).
      CHECK l_check = abap_true.
      CLEAR l_check.
      l_check = check_project_type( i_tasklist = hf_instance->tasklist_id i_project_type  = 'M').
      CHECK l_check = abap_true.
      conditions_ok = check_doc_status( i_guid = hf_instance->change_document_id i_status = 'REVIEW' ).




In my scenario check should trigger only if status are changing from In Development -> To Be tested. ( standard behavior check will be triggered in all situations when changing to and from To be tested ).

To avoid this I've created method that read db table CRM_JEST and checks that actual status are not yet in there - this means check will be triggered only when changing from In Development to To be Tested.

Coding:

METHOD check_real_status.
  DATA
        l_stat TYPE jstat.
  SELECT SINGLE stat INTO l_stat
    FROM crm_jest
    WHERE objnr = i_guid
      AND stat = i_status
      AND inact = ''.
  IF sy-subrc <> 0.
    result = abap_true.
  ELSE.
    result = abap_false.
  ENDIF.
ENDMETHOD.


 

7. See results

 

Launch tcode SM_CRM create Normal Change set it to In Development, release tasks and try to set To be tested by choosing related Actions Pass Normal Change to test.

Okay here it is, you will see message with Details even with link in it and status is not changed until check conditions is fulfilled.

charm 11.JPG

 

Enjoy using it

Actions

Filter Blog

By author:
By date:
By tag: