on 03-16-2011 3:33 PM
Hi,
i need to change the status of CRM servicecontract from open to released using ABAP.
I found the function module CRM_ORDER_CHANGE_STATUS.
I called it like this but nothing happens:
CALL FUNCTION 'CRM_ORDER_CHANGE_STATUS'
EXPORTING
iv_ref_guid = lv_guid
iv_status = 'I1004'
* IV_ACTIVATE = TRUE
* IV_REF_KIND = 'A'
* IV_ALL_ITEMS = TRUE
* IV_ONLY_ITEMS = FALSE
* IV_TRACE_LOG =
EXCEPTIONS
PARAMETER_ERROR = 1
NOT_ALLOWED = 2
ERROR_OCCURRED = 3
OTHERS = 4
.
SY-SUBRC = 0 after the call.
I also tried to call CRM_ORDER_SAVE afterwards, also with SY-SUBRC = 0.
But the status is not changed.
Could one of you experts please assist.
Thank you
Kind regards
Manfred
Hi,
Are you calling BAPI_TRANSACTION_COMMIT after chanign the status?
Regds,
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Uncomment line IV_REF_KIND = 'A'
If stil doesn't work uncomet also IV_ACTIVATE = TRUE and change TRUE with 'X'.
And as mentioned you have to use also BAPI_TRANSACTION_COMMIT or CRM_ORDER_SAVE.
You can also use one of my examples...
CALL FUNCTION 'CRM_ORDER_CHANGE_STATUS'
EXPORTING
iv_ref_guid = <lf_order_data>-guid
iv_status = <lf_order_data>-ustatbn
EXCEPTIONS
parameter_error = 1
not_allowed = 2
error_occurred = 3
OTHERS = 4.
IF sy-subrc = 0.
podatki za save
ls_save-guid = <lf_order_data>-guid.
ls_save-object_type = 'BUS2000115'.
APPEND ls_save TO lt_save.
shrani
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
TABLES
objects_to_save = lt_save
saved_objects = lt_saved
return = lt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
User | Count |
---|---|
6 | |
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.