cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable workflow overview in material master which displays all the workitems created by change event in SWEC

arunsubbu
Explorer
0 Kudos

A workflow is triggered on change of material master record in MM02. This workitem is triggered by an event created in t-code SWEC using the ABAP class.

The workitem is created and the workflow execution is successful. But I am unable to see the log in the MM02 or MM03 where we can see the workflow overview.

How can we make the log available in workflow overview.

Note: I have achieved the solution by implementing the BADI "GOS_MULT_PUBLISH" for the filter value "WF_OVERVIEW" and added the business object type as "CL" and the business object as the class what we have created and appended to the table CT_LPORB which is the changing parameter in the method "ADD_OBJECTS" of this BADI.

But is there any other way to activate the workflow overview without using any BADI and by using any workflow configuration?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Arunkumar,

Just create work flow container with Business object BUS1001006.

Create generic instance

Business object :SYSTEM

Method GENERICINSTANTIATE.

Bind the object instance return by the method to your  work flow container created.

Then check the work flow over view of material.

Regards

Sivashankar P

Former Member
0 Kudos

Excellent catch Siva !!

Answers (3)

Answers (3)

arunsubbu
Explorer
0 Kudos

Thanks Ibrahim and Siva for your inputs.

The solution by Siva works fine. But this solutions holds good if you are going to use this workflow for the first time in production server. This is because, this will show all the work items that are created after including the generic instance of BUS1001006. But if there are already many work items that are created before this changes, it will not be shown in the workflow overview.

Anyways Thanks a lot for this excellent solution. This is what I was looking for Siva.

Regards

Arun

Former Member
0 Kudos

Hi,

1) in your workflow create one comtainer element of type material business object.

2) in your event to workflow binding (basic data setting option/button B),  material business oject should be coming in _EVT_OBJECT. bind it to your workflow container created in step 1.

this should link your workflow with MM02/03.

Basically, it should bind uinique material number with unique workflow instance for displaying in MM02/03.

Regards,

Ibrahim

I042439
Employee
Employee
0 Kudos

The Workflow Overview searches for the active workflows using the BOR object associated with the document. Here it searches for the corresponding BO workflows. your workflow is based on class.

Ibrahim's response is the right way to achieve this.

regards,

Modak

arunsubbu
Explorer
0 Kudos

Thanks for your reply Ibrahim. This is already done, but the list of work items created for the material is not displayed in workflow overview.

It displays the work items that was created for the material using the event in standard business object BUS1001006, but not the work items created using event in the class we created for the same material.

Regards

Arun

Former Member
0 Kudos

Hi,

What about creating a container element in your workflow of type your custom material CLASS and binding it from your event container _EVT_OBJECT ?

This is the only way your workflow gets linked to your business document (material in this case).

Regards,

Ibrahim

arunsubbu
Explorer
0 Kudos

Hi Ibrahim,

I am sorry if I was not clear in replying to your previous message.

We have workflow container which is of type ABAP class and given our custom class.

In the binding for workflow we have bind the event _EVT_OBJECT to the workflow container mentioned above.

But this isn't helping my issue.

Regards

Arun

Former Member
0 Kudos

Hi,

Can you tell me what code you have written in your FIND_BY_LPOR and LPOR methods ?

Regards,

Ibrahim

arunsubbu
Explorer
0 Kudos

METHOD bi_persistent~find_by_lpor.

   data lv_matnr type mara-matnr.
   MOVE lpor-instid(18) TO lv_matnr.
   CREATE OBJECT result TYPE zcl_wf_material
     EXPORTING
       matnr = lv_matnr.
ENDMETHOD.



METHOD bi_persistent~lpor.
   me->m_por-catid = 'CL'.
   me->m_por-typeid = 'ZCL_WF_MATERIAL'.
   me->m_por-instid = me->matnr.
   result = me->m_por.
ENDMETHOD.

Former Member
0 Kudos

I don't think there is some other way to achieve this. But there are some parameters value if we will set that in user profile it will get enabled for SALES T-code.

Cheers,

Prakash

arunsubbu
Explorer
0 Kudos

Thanks Prakash for the info. Can you please elaborate more on those parameter values in the user profile?

Regards,

Arun