cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Overview is not displayed

former_member197828
Participant
0 Kudos
1,052

Hi Guys,

I need one help.

Actly I have created one custom workflow ( WS90000156) and custom business  object ZPM_MRREPO (without any supertype).

all are working fine for notification creation (IW21) and is going to appropriate Approver.

But i am not able to see its log in IW22 transaction:

Workflow-> Workflow Overview.

Please help. Any help  will really be appreciated.

Thanks & Regards,

Gaurav Singh

View Entire Topic
karthikeyan_p3
Contributor
0 Kudos

Hi Gaurav,

The GOS for the transactions IW21,IW22,IW23 are linked to the object type BUS2038. If your workflow has an instance of BUS2038, then it will appear in the GOS workflow overview.

You could instantiate BUS2038 by using the BO: SYSTEM, method: GenericInstantiate and bind it to the workflow container of type BO BUS2038.

Or

If you are triggering the custom workflow using SAP_WAPI_CREATE_EVENT function module, then you could create an instance of BUS2038 in the BADI where you trigger the event & pass it to the  INPUT_CONTAINER. Bind it from Event Container to Workflow Container in the start event tab.

Thanks,

Karthikeyan

former_member197828
Participant
0 Kudos

Hi Karthik ,

Thanks for your reply.

You can help me.!! As i am triggering my workflow from BADI.

data :INPUT_CONTAINE type table of SWR_CONT ,

          x_cont         type  swr_cont.

" --- Fire CREATE Event

                     CLEAR :V_OBJECT_KEY , LV_KEY   , EVENT_ID , RETURN_CODE.

                     CONCATENATE I_VIQMEL-QMNUM 'A' INTO LV_KEY .

                     V_OBJECT_KEY  = LV_KEY .

                    

                     CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'

                       EXPORTING

                         OBJECT_TYPE             = 'ZPM_MRREPO'

                         OBJECT_KEY              = V_OBJECT_KEY

                         EVENT                   = 'CREATED'

                         COMMIT_WORK             = 'X'

                        EVENT_LANGUAGE          = SY-LAN GU

*                       LANGUAGE                = SY-LANGU

*                       USER                    = SY-UNAME

*                       IFS_XML_CONTAINER       =

*                     IMPORTING

*                       RETURN_CODE             =

*                       EVENT_ID                =

*                     TABLES

*                       INPUT_CONTAINER         =

*                       MESSAGE_LINES           =

*                       MESSAGE_STRUCT          =



Here in the above code , I am already passing values of Object type as ZPM_MRREPO.


So what values shall i pass to input  container.




                               .

karthikeyan_p3
Contributor
0 Kudos

To pass instance while triggering events, you can use the function module SWE_EVENT_CREATE. Refer FTR_WORKFLOW_RELEASE_WF_CREATE to populate container values. Include "INCLUDE <CNTN01>." to access the macros.

Macro Instructions for Processing a Container - SAP Business Workflow - SAP Library

The syntax to create instance and assign it to the container.

DATA <Object> TYPE SWC_OBJECT.

SWC_CREATE_OBJECT <Object> <ObjectType> <ObjectKey>.

SWC_SET_ELEMENT <Container> <ContainerElement> <Object>.


Create a parameter of type BUS2038 in the event ZPM_MRREPO.CREATED.

Use that parameter name in the BADI while setting the container.

Alternate option would be to create a step in your workflow template and instantiate using SYSTEM.GenericInstantiate

Thanks,

Karthikeyan

former_member197828
Participant
0 Kudos

Hi Karthik ,

I tried to create a step in workflow template and instantiate this.

But i did not work out.

I need your more help in this context.

Thanks & Regards,

Gaurav Singh

pokrakam
Active Contributor
0 Kudos

karthikeyan P wrote:

To pass instance while triggering events, you can use the function module SWE_EVENT_CREATE. Refer FTR_WORKFLOW_RELEASE_WF_CREATE to populate container values. Include "INCLUDE <CNTN01>." to access the macros.

Umm, No.

Actually, let me repeat that a little louder: NO, NO, NO!!!

Do not use or recommend SWE_EVENT_CREATE, especially when Gaurav already said he was using the (correct!) SAP_WAPI function!

There is NO reason to switch to SWE_EVENT_CREATE!

former_member197828
Participant
0 Kudos

Hi Mike,

Then please suggest me , what approach should i follow.

please help me..

Thanks & Regards,

Gaurav Singh

pokrakam
Active Contributor
0 Kudos

Suggestions have already been provided in this thread.


Not sure why you decided to create a standalone object without super type, but that would be the easier solution.

Otherwise, basic idea behind Karthikeyan's suggestion was right, just pass in a reference to BUS2038. But for Pete's sake use the SAP_WAPI FM, it's much easier and conforms to SAP guidelines.