#1
|
|||
|
|||
Dump CRM_ORDER_MAINTAIN
Hola a Todos...
Estoy ejecutando la función CRM_ORDER_MAINTAIN con la cual actualizo el campo DURATION el cual está en la tabla IT_APPOINTMENT. Me genera un dump: CALL FUNCTION 'CRM_APPT_BUILD_INPUT_FIELDS' EXPORTING iv_ref_handle = '0' iv_ref_guid = im_wa_appointment-ref_guid iv_ref_kind = im_wa_appointment-ref_kind is_logical_key = wa_logical_key IMPORTING es_input_fields = wa_input_fields. CALL FUNCTION 'CRM_ORDER_MAINTAIN' EXPORTING it_appointment = i_appointment CHANGING ct_input_fields = i_input_fields EXCEPTIONS error_occurred = 1 document_locked = 2 no_change_allowed = 3 no_authority = 4 OTHERS = 5. Dump: Categoría Error de programación ABAP Err.tmpo.ejec. MESSAGE_TYPE_X Programa ABAP SAPLCRM_ORDER_OW Application Component CRM-BTX-BF Diagnóstico El módulo de funciones aparece varias veces en la jerarquía actual de llamadas. Este caso no está previsto. Se trata de un error de programa. Les agradeceré bastante cualquier apoyo. Saludos |
#2
|
|||
|
|||
Ejemplo.
Te paso el siguiente código ejemplo, a ver si te sirve de algo.
REPORT ztest. DATA: lv_log_handle TYPE balloghndl, ls_appointment TYPE CRMT_APPOINTMENT_COM, lt_appointment TYPE CRMT_APPOINTMENT_COMT, ls_input_field_names TYPE crmt_input_field_names, ls_input_field TYPE crmt_input_field, lt_input_fields TYPE crmt_input_field_tab, lt_header_guid TYPE crmt_object_guid_tab, lt_saved_objects TYPE crmt_return_objects. ls_appointment-appt_type = gc_type. ls_appointment-ref_guid = gv_guid. ls_appointment-mode = 'B'. ls_appointment-duration = 13. ls_appointment-is_duration = 'X'. REFRESH: lt_input_fields, lt_appointment. INSERT ls_appointment INTO TABLE lt_appointment. ls_input_field_names-fieldname = 'APPT_TYPE'. INSERT ls_input_field_names INTO TABLE ls_input_field-field_names. ls_input_field_names-fieldname = 'DURATION'. INSERT ls_input_field_names INTO TABLE ls_input_field-field_names. ls_input_field-objectname = 'APPOINMENT'. ls_input_field-ref_guid = gv_guid ls_input_field-ref_kind = 'B'. INSERT ls_input_field INTO TABLE lt_input_fields. CALL FUNCTION 'CRM_ORDER_MAINTAIN' EXPORTING it_appointment = lt_appointment CHANGING ct_input_fields = lt_input_fields cv_log_handle = lv_log_handle EXCEPTIONS error_occurred = 1 document_locked = 2 no_change_allowed = 3 no_authority = 4 OTHERS = 5. IF sy-subrc = 0. APPEND gv_guid TO lt_header_guid. CALL FUNCTION 'CRM_ORDER_SAVE' EXPORTING it_objects_to_save = lt_header_guid iv_update_task_local = 'X' iv_save_frame_log = 'X' IMPORTING et_saved_objects = lt_saved_objects EXCEPTIONS document_not_saved = 1 OTHERS = 2. IF sy-subrc = 0. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. ENDIF. ENDIF. |
#3
|
|||
|
|||
Corregí el problema...
Se estaba ejecutando un método de una clase Z dentro de la implementación de la badi CRM_SRV_SLA_CALCTIME, en este método se ejecutaba la función CRM_ORDER_MAINTAIN, el único problema era que no me dejaba hacerlo de esa manera, por lo tanto tuve que crear un programa Z y llamarlo desde el método de la clase Z, dentro del programa se ejecuta la función, con esto se resolvió el problema. Gracias. Saludos! |
Herramientas | Buscar en Tema |
Desplegado | |
|
|