cancel
Showing results for 
Search instead for 
Did you mean: 

Shopping cart doesn't go through the workflow

Former Member
0 Kudos

Hi,

When a shopping cart is created using BAPI_SCEC_CREATE, the shopping cart goes directly to Approved status.

Does anyone know how to send the shopping cart to go through SRM workflow ?

We have a customized workflow that works well for shopping carts created in SRM portal. But we want to build a web service to create shopping cart upon trigger from an external system. BAPI_SCEC_CREATE seems to work well, but the problem is that the shopping cart doesn't go through our workflow. It went from status Created (I1021) --> Complete (I1038) --> Shopping cart ordered (I1106) --> Approved (I1129).

Hopefully some experts out there can shed some lights.

Thanks in advance,

Lara

Accepted Solutions (0)

Answers (1)

Answers (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos
Former Member
0 Kudos

Hi Mesa,

Thanks for the message. I did look at that article before but I wasn't sure that it's applicable in our case. I actually managed to solve my problem by simply emptying the SUBTYPE parameter in I_HEADER of BAPI_SCEC_CREATE. I found that if the SUBTYPE is set to ER, the workflow will not be triggered and the shopping cart will have approved status. But if the SUBTYPE is left empty, the shopping cart is created with "Awaiting Approval" status and it goes through our workflow.

However, I wonder now whether it's the right solution. When I execute BAPI_SCEC_CREATE with I_TESTRUN = x, there will be an error mesage with Required field OBJ_KEY was not transferred in parameter PURCHASEREQUI. However, despite the error message, the shopping cart is created if I turn off the I_TESTRUN. In this case, no error is returned.

Am I doing the right thing here?

Thanks,

Lara

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

What is the process when it is rejected?

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

I'm not sure what you mean by process here. This is what we're trying to achieve:

We want to create a web service to create shopping carts automatically upon receiving a trigger from an external system. The web services residing in the external system will call our web service to create the shopping carts. The shopping cart will then go through our workflow (which works fine when shopping carts are created manually through SRM portal) to get approvals from vendor and people in our company.

I believe that SUBTYPE in I_HEADER is not a mandatory field ? Is there any consequence in the PO / Requisition created if SUBTYPE is left empty ?

Thanks,

Lara