on 09-29-2014 7:52 AM
iam getting exception ,changes not allowed in CRM_ORDER_MAINTAIN ,et_exception error ,.please help urgent.
ERROR ;changes not allowed in ET_EXCEPTION.
please help urgemt..where we check and where we need to change any parameters please..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LOOP AT
it_crmd_orderadm_h1.
CLEAR:it_crmd_orderadm_i, it_item[].
READ TABLE it_crmd_orderadm_i WITH KEY
header = it_crmd_orderadm_h1-guid BINARY SEARCH.
IF sy-subrc = 0.
LOOP AT it_crmd_orderadm_i FROM sy-tabix.
IF it_crmd_orderadm_i-header = it_crmd_orderadm_h1-guid.
CLEAR:it_crm_jest1.
READ TABLE it_crm_jest1 WITH KEY objnr = it_crmd_orderadm_i-guid BINARY SEARCH.
IF sy-subrc NE 0.
CLEAR:it_crmd_schedlin.
READ TABLE it_crmd_schedlin WITH KEY item_guid = it_crmd_orderadm_i-guid BINARY SEARCH
.
CLEAR
:it_item.
it_item-guid = it_crmd_orderadm_i-guid.
it_item-ordered_prod = it_crmd_orderadm_i-ordered_prod.
APPEND it_item.
CLEAR:wa_sales, wa_input_fields, it_field_names[], wa_field_names.
wa_sales-ref_handle = '0000000000'.
wa_sales-ref_guid = it_crmd_orderadm_i-guid.
wa_sales-ref_kind = 'B'.
wa_sales-rejection = '60'.
* APPEND wa_sales TO it_sales.
INSERT wa_sales INTO TABLE it_sales.
wa_input_fields-ref_handle = '0000000000'.
wa_input_fields-ref_guid = it_crmd_orderadm_i-guid.
wa_input_fields-ref_kind = 'B'.
wa_input_fields-objectname = 'SALES'.
wa_field_names-fieldname = 'REJECTION'.
INSERT wa_field_names INTO TABLE wa_input_fields-field_names.
INSERT wa_input_fields INTO TABLE it_input_fields.
CLEAR:wa_input_fields-field_names[], wa_input_fields.
wa_input_fields-ref_handle = '0000000000'.
wa_input_fields-ref_guid = it_crmd_orderadm_i-guid.
wa_input_fields-ref_kind = 'B'.
wa_input_fields-objectname = 'STATUS'.
wa_field_names-fieldname = 'ACTIVATE'.
INSERT wa_field_names INTO TABLE wa_input_fields-field_names.
INSERT wa_input_fields INTO TABLE it_input_fields.
CLEAR:wa_status.
wa_status-ref_handle = '0000000000'.
wa_status-ref_guid = it_crmd_orderadm_i-guid.
wa_status-ref_kind = 'B'.
wa_status-status = 'I1032'.
wa_status-activate = 'X'.
INSERT wa_status INTO TABLE it_status.
* APPEND wa_status TO it_status.
* ENDIF.
ENDIF.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
IF it_sales[] IS NOT INITIAL AND it_input_fields[] IS NOT INITIAL
AND it_status[] IS NOT INITIAL.
CLEAR:t_text[].
REFRESH:t_lines.
CLEAR:l_lines.
CLEAR:wa_input_fields-field_names[], wa_input_fields.
wa_input_fields-ref_handle = '0000000000'.
wa_input_fields-ref_guid = it_crmd_orderadm_h1-guid.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-objectname = 'TEXTS'.
wa_field_names-fieldname = 'LINES'.
INSERT wa_field_names INTO TABLE wa_input_fields-field_names.
INSERT wa_input_fields INTO TABLE it_input_fields.
l_lines-tdformat = '*'.
l_lines-tdline = 'Shortclose'.
APPEND l_lines TO t_lines.
l_text-lines = t_lines[].
l_text-ref_handle = '0000000000'.
l_text-ref_guid = it_crmd_orderadm_h1-guid.
l_text-ref_kind = 'A'.
l_text-tdid = 'ZTOS'.
l_text-tdstyle = 'SYSTEM'.
l_text-tdform = 'SYSTEM'.
l_text-tdspras = 'E'.
l_text-mode = 'A'.
APPEND l_text TO t_text.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_sales = it_sales[]
it_text = t_text[]
it_status = it_status[]
IMPORTING
et_exception = et_exception
CHANGING
ct_input_fields = it_input_fields[]
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc = 0.
CLEAR:et_saved_objects[],et_exception[],et_objects_not_saved[].
REFRESH order_guid.
APPEND it_crmd_orderadm_h1-guid TO order_guid.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = order_guid
IMPORTING
et_saved_objects = et_saved_objects
et_exception = et_exception
et_objects_not_saved = et_objects_not_saved
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
IF sy-subrc EQ 0 AND et_saved_objects[] IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ELSE.
LOOP AT it_item.
CLEAR:it_final.
it_final-object_id = it_crmd_orderadm_h1-object_id.
it_final-ordered_prod = it_item-ordered_prod.
it_final-message = 'Eror update orderr'.
APPEND it_final.
ENDLOOP.
CLEAR:it_item[].
ENDIF.
ELSE.
LOOP AT it_item.
CLEAR:it_final.
it_final-object_id = it_crmd_orderadm_h1-object_id.
it_final-ordered_prod = it_item-ordered_prod.
it_final-message = 'Eror update orderr'.
APPEND it_final.
ENDLOOP.
CLEAR:it_item[].
ENDIF.
ENDIF.
ENDIF.
CLEAR:it_sales[], wa_sales, it_input_fields[], wa_input_fields,
it_field_names[], wa_field_names.
ENDLOOP
.
Hi Kalpana,
Let me understand your requirement properly. You are giving the details in the selection screen and then trying to update the order with CRM_ORDER_MAINTAIN. Now you are getting an error saying "No changes allowed" in the importing table et_exception. Right?. Now, kindly let me know the following.
1) Did you try updating the same order via webui?. Does it make any issue.
2) You were saying about some dumps. Which line you are getting the dump and what is the dump description.
Thanks,
Faisal
Yes rite..what ever u said about my requirement its correct.
Error - CRM_ORDER_MAINTAIN -ET_EXCEPTION-NO CHANGES ALLOWED
In CRMD_ORDER- i opened the order number- ,but iam not allowed to do changes in that order..sam exception in CRMD_ORDER-changes not possible.
If i add orderadm_h paramaters in crmd_order_maintain - iam getting dump like..
Short text of error message:
Error in system D22CLNT217 while copying the document
Long text of error message:
Diagnosis
Errors occurred while transferring the document into anothe
system. To view the error messages, see the enclosed log.
....
So if my understanding is correct, you have an R/3 system connected to CRM. Orders usually move to R/3 after saving and other things like delivery happens in R/3. Right?. The orders which you are trying to update are being moved to R/3 and thus it's not allowing you to change it. If you check your outbound queues or bdocs(transaction:SMW01) you will see the order is not completely processed.
This is not the issue with your code. It's an issue with the data u try. Plz keep the old code only and try to find a right order number which is allowing you to change. Otherwise check the bdocs and see why they are getting failed and fix the issue.
Thanks,
Faisal
Hi Kalpana,
Whether you can change the same in the front end (Web UI / IC). Then try using the FM.
Please explain scenario or what are you trying to change?
Regards,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
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.