FM: CRM_ORDER_CHANGE_STATUS
I have a requirement to update the status of a CRM document (Oppertunity). After updation, eventhough the FM is returning sy-subrc = 0, Nothing is changed, when i see the doucment thru t-code CRMD_ORDER. My sample code is attached. Can any one help me in this ?.
DATA : iv_status TYPE crm_j_status,
iv_ref_guid TYPE crmt_object_guid,
iv_trace_log TYPE balloghndl.
INCLUDE crm_status_con.
INCLUDE crm_log_states_con.
BREAK-POINT.
iv_ref_guid = '443A15D3D8E3548AE1000000AF01022A'.
iv_status = 'E0001'.
CALL FUNCTION 'CRM_ORDER_CHANGE_STATUS'
EXPORTING
iv_ref_guid = iv_ref_guid
iv_status = iv_status
iv_activate = true
iv_ref_kind = 'A'
iv_all_items = true
iv_only_items = true
iv_trace_log = iv_trace_log
EXCEPTIONS
parameter_error = 1
not_allowed = 2
error_occurred = 3
OTHERS = 4.
BREAK-POINT.