Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change the status of a CRM order CRM_ORDER_CHANGE_STATUS

jayaprakash_m
Explorer
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

Hi Jayaprakash,

As far as your query is concerned just check out whether the status 'E0001' is configured or not, if its not configured than the FM will return sy-subrc 0 but no effect would occur.

Also in case of any other problem try using the Function Module 'CRM_STATUS_MAINTAIN_OW' where in you can pass the necessary parameters and check.

Do let me know if any other concerns.

-Regards

Murtaza Kapadia

Former Member
0 Kudos

Hi All

I am getting the same problem as stated above. I cannot update the user status. Did anybody solved this issue.

Please let me know if you are.

Regards

Anandan