on 05-19-2006 3:36 PM
Did any one use this fm to update the Status field of an Opportunity in CRM ? If yes, could you help me please. Is this the right function module? I tried to run a test in se37, but I cannot put in any value in the import parameter? Can you help? I have only value of the GUI of an Opportunity and its status. Where do I put these values based on the import structure below:
Import parameters:
IT_STATUS_COM
IT_STATUS_COMINT
IV_CHECK_ONLY
IV_TRACE
IV_NO_1O_MAINTAIN
Changing parameters:
CT_INPUT_FIELD_NAMES
Jennifer.
Hi Jennifer,
I think for your requorement the simplest FM would be "CRM_ORDER_CHANGE_STATUS". Inside the function module you have to pass the following:
Import parameters:
-
1. GUID of the opportunity to IV_REF_GUID
2. Target Status code to IV_STATUS
3. Value 'X' to IV_ACTIVATE
That is all you have to do to update the status in the opportunity transaction.
Sample Code:
CALL FUNCTION 'CRM_ORDER_CHANGE_STATUS'
EXPORTING
IV_REF_GUID = IS_HEADER_GUID
IV_STATUS = 'E0002'
IV_ACTIVATE = LC_X
EXCEPTIONS
PARAMETER_ERROR = 1
NOT_ALLOWED = 2
ERROR_OCCURRED = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Let me know if this helps!
Jash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jennifer,
Other way of status update can be done using FM CRM_ORDER_MAINTAIN. Insert a break point in this FM, goto oppurtunity and manually change status and you can see how interface tables are populated in CRM_ORDER_MAINTAIN.
Thanks
Kamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jennifer,
The easier way to set the status is to use:
1. FM CRM_STATUS_CHANGE_EXTERN_OW if you want to change user status
2. Fm CRM_STATUS_SET_INTERN_OW if you want to change system status.
Pass GUID in parameter objnr
However, both of them internally call CRM_STATUS_MAINTAIN_OW.
And one more thing: you wónt be able to change status from SE37 as this requires transaction commit.
Regards
Kaushal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.