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

shopping cart not approved automatially

Former Member
0 Kudos
152

Hi,

we have a requirement where we need to create a shopping cart programmatically . For this we are using a FM

BBP_PD_SC_CREATE.

now I'm able to create the shopping cart but the shopping cart is getting into "awaiting approval" status.

Our requirement is to make the shopping cart automatically approved and follow on documents created like PO's,

Can you please let me know what is the config needs to be done to get the shopping cart approved automatilly.

Please give me a step by step approach as I'm new to SRM.

quick help is much appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

After it creates SC , execute this 2 method .... it should solve your problem BBP_PD_SC_STATUS_CHANGE_WF - To set status release and BBP_REQREQ_TRANSFER - To transfer

BR

Padhi

Former Member
0 Kudos

I tried using the same FM But its still the status is "awaiting approval".

DATA : STATUS TYPE sy-subrc VALUE '1'.

DATA : LV_VORGANG TYPE J_VORGANG.

CALL FUNCTION 'BBP_PD_SC_STATUS_CHANGE_WF'

EXPORTING

iv_guid = ls_sc_header_detail-guid

iv_status = status

IV_CHANGER = SY-UNAME

IMPORTING

EV_OBJECT_STATUS = LV_VORGANG

TABLES

ET_MESSAGES = lt_po_create_messages

EXCEPTIONS

INVALID_VALUE_FOR_STATUS = 1

ERROR_IN_STATUS_CHANGE = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

COMMIT WORK AND WAIT.

once the FM is run, the object status is "RELS" , but still internally its not approved, can you let me know where am i going wrong

Former Member
0 Kudos

Its working as we have added another FM which basicallys unlocks the shopping cart created in the above step. i used a FM BBP_PD_SC_UNLOCK to do so before releasing the shopping cart.

Former Member
0 Kudos

Hi Shyam,

I am not sure you have found the solution for this requirement.. But here is my suggestion .. assign 'EC' to the export parameter I_HEADER-SUBTYPE eq 'EC' of the function module 'BBP_PD_SC_CREATE'. try this and let me your feedback..

John...