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

BAPI_SCEC_CREATE how to create SC with status PARK

Former Member
0 Likes
252

I try to create a SC with BAPI_SCEC_CREATE that gets the status PARK.

why ?

Since the related PM order that is used in accounting first has to be checked if it is has the right accountassignment.

the basis for the approval flow is also based on the account assignment in de PM order. So I try to create a SC with status Held that will be relaesed for approval when the PM order will be released.

I have only found about PO how to put it on held but not for BAPI_SCEC_CREATE

is this possible ?

or do I need another function to change the status before commiting ?

kind regards

Arthur de Smidt

Edited by: A. de Smidt on Nov 18, 2010 2:59 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

hmmm I try to use

lv_sc_guid = ls_e_header-businessprocess.
CALL FUNCTION 'BBP_PD_SC_STATUS_CHANGE'
  EXPORTING
    i_guid           = lv_sc_guid
    i_activity       = 'PARK' "Voorlopig opgeslagen
    I_SAVE_DB        = 'X'
*   I_TEST_RUN       =
  tables
    e_messages       = lt_e_messages
* CHANGING
*   E_CHANGED        =
          .

to change the status. it doesn't return errors (as it does when I try to do with other statussen like DMLL to block it

but it doesn't update the status

when I do a commit work afterwards it results in a shrtdump. sap note 1085700 also didn't solve this

anybody got an idea how to create a shoppingcart on hold ?

the reason is that the account assignment first needs to be checked before it may be released for approval.

the workflow for approval may not start before the check is done

kind regards

arthur

Edited by: A. de Smidt on Nov 22, 2010 10:41 AM

laurent_burtaire
Active Contributor
0 Likes

Hello Arthur,

Use method BBP_SC_CHANGE from BBP_DOC_CHANGE_BADI BAdI.

Here, you have importing parameter IV_PARK.

Regards.

Laurent.

Former Member
0 Likes

>

> Hello Arthur,

>

>

>

> Use method BBP_SC_CHANGE from BBP_DOC_CHANGE_BADI BAdI.

> Here, you have importing parameter IV_PARK.

>

> Regards.

>

>

>

> Laurent.

hmmm in my system srm 550 I don't see that parameter ??

VALUE( FLT_VAL ) TYPE BBP_SEARCH_OBJTYP

VALUE( IS_HEADER ) TYPE BBP_PDS_SC_HEADER_U

VALUE( IT_ITEM ) TYPE BBPT_PD_SC_ITEM_ICU

VALUE( IT_ACCOUNT ) TYPE BBPT_PDS_ACC

VALUE( IT_PARTNER ) TYPE BBPT_PDS_PARTNER

VALUE( IT_ORGDATA ) TYPE BBPT_PDS_ORG

VALUE( IT_HCF ) TYPE BBPT_PDS_HCF_SC

VALUE( IT_ICF ) TYPE BBPT_PDS_ICF_SC

kind regards

arthur

Former Member
0 Likes

perhaps also more information about the requirement.

a shoppingcart has as account assignment a PM order. if the shoppincart and pm order are created in the same flow than the approver is checked from the account assignment of the PM order. if however the accountassignment was not right in the PM order (there is a second check always necessary) then the approver has to be determined when the PM order is released.

so I have to keep the shoppincart from determing an approver as long as the PM order in the account assignment of the shoppingcart has status OPEN.

kind regards

arthur