cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Internal Order Workflow issue

Former Member
0 Likes
2,711

Internal order created using Transaction Ko03 , once created user set the status to Request for Approval initially than my custom work flow will be triggered  and  mail triggers to user inbox to Approve.   (Workflow Triggers only in case of Internal Order status as Request for Approval)

 

    In the meantime if user not yet approved(Still status as Request for Approval) ,  There is chance to change the Internal order and another workflow will be triggered ...so like this multiple workitems triggered in the user mail box to Approve.

   for ex:  1).1st work item

               2). 2nd work item

               3). 3rd work item .....so on latest items ........

    My requirement is to keep latest work item as enabled  in user inbox , so that user will  only one item process either for Approve or reject.

     the problem is having multiple items , user not able to proceed to approve any one of those work item.

     Let me know the solution , how to implement this through programmatically.

Thanks

Mahe

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hello,

You can also Cancel whole workflow - exactly the same way like Anjan wrote (using terminating event) but on WF level: header -> version-dependent -> event.

br,

artur

Former Member
0 Likes

Hi Artur and Anjan,

     I was using BO-BUS2075  for internal order in my custom workflow which is triggered in header using start Version-Independent -Start events attached screen shot.

    Actually I do not see any events in BUS2075 , but looks like ZBUS2075 is delegated with BUS2075 so that I see CREATED event created in ZBUS2075 is using in BUS2075.

  I am wondering how can i add CHANGE EVENT  and attach to the workflow header ?

Could you   let me know the step by step?

Thanks

Mahe

Former Member
0 Likes

Hello,

You just need to add to this ZBUS2075 new exception (for example CHANGED) and call it latter after order is changed.

You can do it in some exit.

There is many blogs and topics describing how to do this.

After that just test if event is being triggered in transactions SWELS/SWEL.

When it will be done You can use it in Your WF.

Best regards,

Artur

Former Member
0 Likes

Thanks Artur , I didn't get the blog, would be great if you share the link.Actually am new to workflow I was expecting step by step procedure to implement it if anyone had worked on it

Thanks

Mahe

Former Member
0 Likes

Hi,

Just try to enter something like 'sap workflow raise custom events' in google.

The first one I got:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e038cc2d-0cde-2a10-e28e-f50025578...

br,

artur

Former Member
0 Likes

Thanks Artur,

I am just wondering , my workflow assigned with only CREATE event in header.

am not sure how it is triggering in case of change (KO02) Transaction as i don't see change event in BO(BUS2075).

Former Member
0 Likes

Hello,

If Your WF is started only on CREATED event - You don't need to cancel current WF.

Check again if new WF is created after order change.

I don't know what is Your required business scenario.

br,

artur

Former Member
0 Likes

Hello,

     I  was digging into Workflow , I didn't see the even for CHANGE . but whenever am chaging the Internal order , another work item is triggering using same WF .

    Just wondering how it is calling the same workflow for  Order change unabel to track it where exactly configured for change. I checked configuration also but not able to identify .

Thanks,

Former Member
0 Likes

Hi,

It can be called in some exit using FM for example SAP_WAPI_START_WORKFLOW.

You can check few things.

- enable enent trace SWELS, make order change to start new WF, check in SWEL if any event/workflow was raised

- run some trace like SAT and again make order change - to see if some FM for starting WF was executed (or just put a break point in SAP_WAPI_START_WORKFLOW - but it might be something else called)


br,

artur

Former Member
0 Likes

I was trying to trace it , but I coud see only CREATE event when i change the order .

Former Member
0 Likes

Hi,

If this is trace after You changed order not created it - it means it is coded to raise this event after order change and probably after creation.

This is very misleading as You can see.

There should one event raised when order is created and another one when it is changed...

Than You can use both in Your workflow and model Your process as required.

br,

artur

anjan_paul
Active Contributor
0 Likes

Hi,

  This can be done using Terminating event is task level. Maintain the event raised  after changed internal order as termnating event of approval step. It will terminate any existing workitem .