cancel
Showing results for 
Search instead for 
Did you mean: 

Add an approval to shopping cart whose status is awaiting approval SRM7.0

krishna_k17
Participant
0 Kudos

Hi All,

In one of my requirements i need to add an approver to a shopping cart which is on status awaiting approval programmatically in SRM7.0.

1. Is it possible to add an aprrover to shopping cart whose status is awaiting approval programmatically.

2. If yes, please guide me the steps or classes and methods are used to do this.

Thanks in Advance.

Best Regards,

Krishna

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

it's possible, but could you please share your requirement?

Saravanan

krishna_k17
Participant
0 Kudos

Hi Saravanan,

I am sorry for delayed response..

Requiremnet:

Need to add approvers manually to the shopping cart which is on awaiting approval status.

The code flow follows as below:

1. as the workflow already started for this shopping cart so we have interrupted the shopping cart with belwo method

CALL METHOD /sapsrm/cl_wf_adv_facade=>interrupt_process

EXPORTING

iv_document_guid = lv_new_guid ( shopping cart guid)

2. instantiated the object for the class /sapsrn/cl_pdo_bo_sc_adv, to its constructor i have passed values work item id generated in above process.

3. added an approver manually to shopping cart using method of above said class /sapsrm/if_pdo_do_apv_ext~add_approver.

4. if i skip the execution of method /sapsrm/if_pdo_bo_sc~order, i am able see all the approvers added manually but the status is "In your Inbox"

5. if i execute the above said order method, all the approvers added manually are lost.

Question:

1. Please suggest me the sequence of methods called are correct?

2. As per my understanding complete workflow is restarting, so it is losing all the manual approvers if i am wrong suggest me, Is it not possible to have previously added manually added approvers even after ordering the cart?