Skip to Content
0
Former Member
Mar 16, 2011 at 03:33 PM

How to use CRM_ORDER_CHANGE_STATUS

360 Views

Hi,

i need to change the status of CRM servicecontract from open to released using ABAP.

I found the function module CRM_ORDER_CHANGE_STATUS.

I called it like this but nothing happens:

CALL FUNCTION 'CRM_ORDER_CHANGE_STATUS'
    EXPORTING
      iv_ref_guid           = lv_guid
      iv_status             = 'I1004'
*     IV_ACTIVATE           = TRUE
*     IV_REF_KIND           = 'A'
*     IV_ALL_ITEMS          = TRUE
*     IV_ONLY_ITEMS         = FALSE
*     IV_TRACE_LOG          =
   EXCEPTIONS
     PARAMETER_ERROR       = 1
     NOT_ALLOWED           = 2
     ERROR_OCCURRED        = 3
     OTHERS                = 4
            .

SY-SUBRC = 0 after the call.

I also tried to call CRM_ORDER_SAVE afterwards, also with SY-SUBRC = 0.

But the status is not changed.

Could one of you experts please assist.

Thank you

Kind regards

Manfred