cancel
Showing results for 
Search instead for 
Did you mean: 

MDG SLA time for each workflow step

Former Member
0 Kudos

Hi Experts,

As I know MDG calculates and report the SLA times for an entire process, It will show as violated if the number of days/half day  is exceeded since the creation, but it does not show in which step took more time to process.

My requirement is to have SLA control in each step of a workflow. Please check the following example:

Material creation that has 2 approval steps since it submission.

Example: Submission (Requestor) -> Approval 1 (Business Area) -> Approval 2 (Master Data Specialist) -> Activation / Replication

I need to know through a report how much time the Approval 1 took to process the Change request, How much time Approval 2 took to process the Change Request based on the priority set by the requestor.

With this report the responsible from the Master Data department can check the time spent by the processors for each step of the process.

Does anyone had a similiar requirement?

What is the best approach to achieve this? Through standard SLA queries it is possible to have more information? Or only having an enhancement?

I appreciate any help.

Kind Regards,

Fabiano

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Fabiano,

This is a pretty common requirement. The source of this information is the workflow log (transaction SWI1).You can either try to find other workflow reports or build your own custom ones.

From the main SAP Menu go to: SAP Menu --> Tools --> Business Workflow --> Development --> Reporting.

One of the workflow reports is transaction SWI2_DURA.

Former Member
0 Kudos

Hi Abdullah!

I checked these reports and I notice there is differeces between the CR data and work item data, for example the priority of a change request that I was set in High in the CR, in the priority of the workitem is Medium, can you confirm if there is any connection?

Do you know where I can get the data that contains the relation between a Workflow Work item ID and the Change request id? Is it in the mdg generated tables? With this information i can have the necessary data to build a custom report.

As I don't have a deep knowledge in ABAP WF I'm having some problems getting the right information.

Thanks for you help!

Fabiano

Former Member
0 Kudos

Hi Abdullah,

Just an update, I can maybe use some WF function modules to get the information I need. Checking the web dynpro application which load the information on Workflow Log (USMD_CREQUEST_PROTOCOL2) for a change request I could understand how the information is obtained. It uses the object type for example BUS2250 and the object key that is a concatenation with the CR number + an index, after that it obtain the "parent" workitem with the  SAP_WAPI_WORKITEMS_TO_OBJECT function module. After that it uses the  SAP_WAPI_GET_DEPENDENT_WIS and   SAP_WAPI_GET_WORKITEM_DETAIL functions.

Former Member
0 Kudos

You are pretty much on the right track. Make sure to only use function modules that start with SAP_WAPI. BUS2250 is the object. You can look in the methods for some details and to identify what tables to read from, etc.

Former Member
0 Kudos

OK Abdullah,

Thank you again for you precious help!

Kind Regards,

Fabiano

former_member193063
Active Participant
0 Kudos

Hello Fabiano ,

We have also same requirement like .

Submission (Requestor) -> Approval 1  -> Approval 2 ----------   ->Approval- N (Master Data Specialist) -> Activation.

Can you plz share how to achieve this with : Any document for that plz share.

As you mention :

It uses the object type for example BUS2250 and the object key that is a concatenation with the CR number + an index, after that it obtain the "parent" workitem with the  SAP_WAPI_WORKITEMS_TO_OBJECT function module. After that it uses the  SAP_WAPI_GET_DEPENDENT_WIS and   SAP_WAPI_GET_WORKITEM_DETAIL functions.


Thanks

Nikhilesh

Former Member
0 Kudos

Hi Nikhilesh,

After getting the workitems with the method cl_usmd4_crequest_protocol=>workitems_to_object I filtered only the dialod workitems, excluding the batch ones. (wi_type = W).

After filtering I got the details from each workitem using the method cl_usmd4_crequest_protocol=>get_workitem_detail.

The last method I called was cl_usmd4_crequest_protocol=>read_container to get additional workitem data.

Is this info are you looking for?

Sorry for the delay in the response.

Kind Regards,

Fabiano Moraes

Former Member
0 Kudos

Hi Fabiano,

As you mention :

It uses the object type for example BUS2250 and the object key that is a concatenation with the CR number + an index, after that it obtain the "parent" workitem with the  SAP_WAPI_WORKITEMS_TO_OBJECT function module.


Q1. How I will get Index number?


Once we get the parent work item id, using FM SAP_WAPI_GET_DEPENDENT_WIS, we can get the list of work item id's for the entire process.


As, in my requirement, I just want to deal with Agents, so how to identify the Agent work item id automatically through code and send that agent work item id to FM  SAP_WAPI_GET_WORKITEM_DETAIL?


Hope you understand my question, if not please let me know.


Regards,

Victor

Former Member
0 Kudos

Hi Victor,

The index number is a constant with value '000000', you should declare something like:

"c_index                  TYPE swc_index  VALUE '000000'

If you want to get all the agents info you should use the method GET_WORKITEM_RECIPIENTS it return all agents of a work item. This method is in the class CL_USMD4_CREQUEST_PROTOCOL.

Is this what you are looking for?

Kind Regards,

Fabiano

Former Member
0 Kudos

Hi Fabiano,

     Thanks for your helpful reply. Now I have all 'W' work items types details respect to a particular CR.

As, I want to update a custom table with Requestor, Verifier & Approver time stamp, Now the question is.....

1. By using FM "SAP_WAPI_GET_WORKITEM_DETAIL", I can get the time stamp values (Combination of WI_CD & WI_CT) for different work items (W - Work item type), but how to identify/distribute work items using hard code that "This particular Work item goes for Requestor or verifier or approver etc."

The scenarios are more confusing when verifier reject or approver reject comes into the picture and requestor resubmit again.

Please let me know if you are not clear about my question.

Former Member
0 Kudos

Hi Victor,

If you want to get this info I think you could check the step of the workflow in the container. You can obtain through the method READ_CONTAINER. The step is connected to a specific phase of the process.

From the APP step you should check whether is a revision, a approval step or a verifier. You set the approvals to app step.

Kind Regards,

Fabiano

Answers (1)

Answers (1)

ashish_bhadani
Explorer
0 Kudos

Hi Fabiano,

           I have some what similar requirements but like as you told you need to find SLA time in Each step....Same in my case i have requirements suppose after CR Submit by requester and after Submission it goes to 1st approver and for 1 Approver we have set SLA as 1 Hours and with in that time if approver1 will not approve his CR then that CR will automatically move to some other user Dynamically........If you have any idea how to achieve this then please let me know.

Thanks

Ashish