Skip to Content
0
Apr 06, 2011 at 03:14 AM

What is the difference between 'CRM_ORDER_SAVE' and 'CRM_ORDER_MAINTAIN'?

729 Views

Hi Experts,

What is the difference between these two FMs?

'CRM_ORDER_SAVE' and 'CRM_ORDER_MAINTAIN'

I want to change the user status of an order in CRM. I have seen several posts in the forum some of which advises to use CRM_ORDER_MAINTAIN' while others 'CRM_ORDER_SAVE'.

I am really confused. Which one is the correct FM? I could not find any documentation for these FMs.

Do we need to use both these FMs or only one of them?

What is the correct order to call this FM?

1. CRM_STATUS_CHANGE_EXTERN "Change the user status

2. Commit work

3. CRM_ORDER_INITIALIZE

4. CRM_ORDER_MAINTAIN

5. Commit work.

6. CRM_ORDER_SAVE

Also what is the meaning of Ref_kind field? When do we give 'A' and when do we give 'B'?

ls_status-ref_guid = i_crmd_orderadm_h-guid.

ls_status-ref_kind = 'A'.

ls_status-status = 'E0003'.

ls_status-activate = 'X'.

APPEND ls_status TO lt_status.

CALL FUNCTION 'CRM_ORDER_MAINTAIN'

EXPORTING

IT_STATUS = lt_status

CHANGING

CT_INPUT_FIELDS = lt_input_fields

EXCEPTIONS

ERROR_OCCURRED = 1

DOCUMENT_LOCKED = 2

NO_CHANGE_ALLOWED = 3

NO_AUTHORITY = 4

OTHERS = 5.

Thanks

Gopal