cancel
Showing results for 
Search instead for 
Did you mean: 

Changing workflow initiator for external requisitions

Former Member
0 Kudos

Hi all!

We are routing external requisitions through our item-level approval workflow using the DOC_CHANGE_BADI and some additional tricks. This approach is working quite well, with the exception of some SC details that need to be updated. In particular, we need to exchange the default RFC system user (who will appear as SC creator) with the user who created the requisition in our ECC environment (given he or she exists in SRM). Naturally, this is because of the fact that when a cart is rejected, the RFC user will receive the work item instead of the true creator.

Does anyone know of a good way of achieving this? Is there a function module that can update the SC creator, or some BAdI we haven't considered? The DOC_CHANGE_BADI seems to be a dead end since it's signature does not include anything about this.

Thankful for any tips, hints, and so on.

Sincerely,

Christian

Accepted Solutions (0)

Answers (1)

Answers (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

What is expected behavior when item is rejected? The user should go back to ERP Purchase Requisition and change ?

Regards,

Masa

Former Member
0 Kudos

Perhaps I chose the wrong words... The issue is based on the fact that when a cart is rejected, the system returns a workitem to the workflow initiator. In this case, this means our standard RFC user. It is easy enough to get the purchase requisition creator from ECC, but how do we exchange the users in SRM in order to get correct rejection handling?

Thanks!

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I understand your issue but I'm saying that you will face another issue after fixing this issue.

My concern is after you manage to change the workflow initiator. What is expected process after reject?

Should requestor change the SC? - In this case, data is inconsistent between PR and SC.

Should requestor change the PR in backend? - In this case, there is technical difficulties to manage backend document from SRM.

Regards,

Masa

Former Member
0 Kudos

Thanks for your reply.

I am aware of the difficulties. The question remains, however; is there a more elegant way of achieving this than direct table update?

Best regards,

Christian

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I would add 4 steps in the workflow template.

1. "Condition step" to check WF_Initiator is specific RFC user

2. "Background activity" to get PR owner from backend

3. "Container Operation" to replace WF_Initiator or use custom container element

3. "Dialog activity" to call PR cahnge in backend

Regards,

Masa

Former Member
0 Kudos

I was contemplating altering the WF model as well. However, using the SAP_WAPI_READ_CONTAINER and SAP_WAPI_WRITE_CONTAINER function modules, we were able to achieve what was required.

Thanks for your replies.

Best regards,

Christian