cancel
Showing results for 
Search instead for 
Did you mean: 

Set user Defined Status in the Shopping Cart

Former Member
0 Kudos

Hello,

I am facing problem while Setting user defined Status in the shopping cart. Below are the steps which I have followed.

1. I have created Status profile via Transaction 'BS02' and also created the Status 'On Hold' with Status number 'Exxxxx'.

2. Entry of this external status is also created in the table TJ30.

3. Also I tried assigning this Status profile in Transaction type for "BUS2121".

After making the above configuration for the new User defined status I have used below function module in my program.

I am using FM "CRM_STATUS_CHANGE_EXTERN" to set the User defined status in the shopping cart.

  CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'

    EXPORTING

      objnr                    = ls_header-guid

      user_status          = lv_stat

    IMPORTING

      stonr                    = lv_stonr

After this FM I am also using "COMMIT WORK AND WAIT ".

But still my Status is not updated in the Shopping Cart.

Expert please suggest if some one has work in this scenario.

Best Regards,

Chirag Shah

Accepted Solutions (0)

Answers (1)

Answers (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Chirag,

try to initialize Status schema before update.

CALL FUNCTION 'CRM_STATUS_OBJECT_CREATE'

     EXPORTING

       objnr                        = ls_header-guid

       obtyp                        = 'SCH'

       stsma                        = 'ZHOLD'

     EXCEPTIONS

       obtyp_invalid                = 1

       status_object_already_exists = 2

       stsma_invalid                = 3

       stsma_obtyp_invalid          = 4

       error_ocurred                = 5

       OTHERS                       = 6.

Regards

K