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

Changing the order status using CRM_ORDER_MAINTAIN

0 Likes
634

image-1.pngimage-2.png

Hello Experts,

Can you please help me on the below requirement .

I am trying to change the Order status using the FM CRM_ORDER_MAINTAIN(please find the attachment for the code).

When i am executing this FM i am getting SY_SUBRC = 0, but in the back end it's not updating the status.

But when i tried to change the status using the transaction CRMD_ORDER it's successfully updated.

I am passing same values exactly in the program what are getting filled while executing the transaction but i don't know why it's not updating through Program .

Please help me on this.

Thanks & Regards,

Sagar.

Accepted Solutions (0)

Answers (1)

Answers (1)

spencer_liang
Advisor
Advisor
0 Likes

Your code might be wrong.

debug crmd_order and you will see how the structure is filled

CT_INPUT_FIELDS[1]

REF_HANDLE 0000000000

REF_GUID 0050569F0EA61ED8A5BBE454127C3361

REF_KIND A

OBJECTNAME STATUS

LOGICAL_KEY E0003CRMORDER

FIELD_NAMES [1x3(64)]Sorted Table

FIELDNAME ACTIVATE

CHANGEABLE

INACTIVE

IT_STATUS

REF_HANDLE 0000000000

REF_GUID 0050569F0EA61ED8A5BBE454127C3361

REF_KIND A

STATUS E0003

USER_STAT_PROC CRMORDER

ACTIVATE X

PROCESS

what mgith be wrong:

1, should not comment ls_status-user_stat_proc = 'zpa_svo'

2, ls_field_names-fieldname="status" -> we need fieldname = activate and fieldname=status is not necessary.

3, [ls_input_fields-field_names = lt_field_name], I doubt if it works properly. you may try to insert into ls_input_fields-field_names directly.