cancel
Showing results for 
Search instead for 
Did you mean: 

Changing PO in the approval step

Former Member
0 Kudos

Hi,

I need to change a PO object when the aprover is aproving it. For that I have implemented the BBP_DOC_CHANGE_BADI to change the PO. This BADI it's called not only when the object is approved but also every time the object is changed.

I need to clearly identify the moment when the object is being approved. We are using SRM 7.0 and Classic extended scenario. Does anyone have ideas about this?

Thanks

Paulo Paixão

Edited by: Paulo Paixão on Sep 11, 2009 7:27 PM

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Which workflow template do you use? Is it Process-Controlled Workflow or Application-Controlled Workflow?

Please use Process-Controlled Workflow. User can get back the workitem from approvers's inbox, when user changes the document.

Regards,

Masa

Answers (3)

Answers (3)

former_member544585
Contributor
0 Kudos

Hi Paulo,

Can you explain your business requirement in more detail: in particular, why do you need to change SRM PO during approval? If all you want is to pass some additional values to ERP PO, there are other ways of achieving this.

Cheers,

Serguei

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I finally got your issue. Can you check the IV_MODE parameter in your BADI?

If IV_MODE does not help, you need to get workitem information and workitem owner in your BADI.

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

Thanks for the answer.

The IV_MODE is set do 'X' when you are approving but when you are changing it´s also set to 'X'. So I can not use de IV_MODE.

Thanks

PP

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Some FM may help.

BBP_PDH_WFL_APPROVER_GET

BBP_PDH_WFL_CHECK_WF_LOCK

Regards,

Masa

Former Member
0 Kudos

Hi Masa.

Didn´t work. Any more ideas?

Regards,

PP

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

My idea was when approver executed the workitem, following conditions can be different.

- workitem is locked

- SY-UNAME is one of approvers

Which condition did not work ?

Regards,

Masa

Former Member
0 Kudos

Hi masa,

It doesn't work because the FM BBP_PDH_WFL_CHECK_WF_LOCK did not return any value when the BADI is running. The second reason is when the approval has substitutions or re-assigns workitems to others users.

Thaks,

PP

Former Member
0 Kudos

Hi Masa,

I need to change the PO not after approval but on the same time. I just need to know in the BBP_DOC_CHANGE_BADI when the user is approving the document.

Regards,

PP

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can not change the document when approver is opening it in approval mode. The document is locked.

Regards,

Masa