Hello,
I am trying to add a custom copy event apart from the standard one which would have new rules for copy control implemented by the BADI ZTR_CRM_COPY_BADI. The BADI works fine.
However, to replicate the standard copy, I use the following code in my process_event:
CASE iv_event.
WHEN 'ZTR_ALT_QUOTE'.
CALL METHOD super->if_crm_bsp_model_access_il~process_event
EXPORTING
iv_event = 'COPY'
iv_screen_structure_name = iv_screen_structure_name
iv_focus_object_key = iv_focus_object_key
iv_event_index = iv_event_index
it_selected_object_key = it_selected_object_key
it_all_object_key = it_all_object_key
IMPORTING
et_class_name = et_class_name
ev_object_key = ev_object_key
et_changed_objects = et_changed_objects
et_inserted_objects = et_inserted_objects
et_deleted_objects = et_deleted_objects.
WHEN OTHERS.
CALL METHOD super->if_crm_bsp_model_access_il~process_event
EXPORTING
iv_event = iv_event
iv_screen_structure_name = iv_screen_structure_name
iv_focus_object_key = iv_focus_object_key
iv_event_index = iv_event_index
it_selected_object_key = it_selected_object_key
it_all_object_key = it_all_object_key
IMPORTING
et_class_name = et_class_name
ev_object_key = ev_object_key
et_changed_objects = et_changed_objects
et_inserted_objects = et_inserted_objects
et_deleted_objects = et_deleted_objects.
ENDCASE.
ENDMETHOD.
This causes the new document to be created, however, on the PCUI screen, only the old doc with the old transaction number is displayed. If I try to switch to a new action, I get the popup for data loss and if I save, the message "Transaction .... has been saved" is displayed and I can find the new document in the system.
Could someone please let me know how I should trigger a screen refresh and add a new line with the new document?
The values for the export parameters from the process_event method is the same for the standard and the custom copy on debugging. Please advice.
Thanks,
Rohini.