Hello,
Maybe someone could help me with the following question:
I have created an enhancement on component PRDOBJ. There I have created a button which should link to a new service order (component BT116H_SRVO).
The link is working fine but when navigating there appears a popup which prompts to save yes/no. Is there a way to discard this popup and show the view of a new service order without first saving a new serviceorder.
I'm using the following code right now.
DATA: lt_params TYPE crmt_name_value_pair_tab, ls_params TYPE crmt_name_value_pair, lr_core TYPE REF TO cl_crm_bol_core, lr_factory TYPE REF TO cl_crm_bol_entity_factory, lr_order TYPE REF TO cl_crm_bol_entity, lr_col TYPE REF TO if_bol_bo_col, lr_nav TYPE REF TO if_crm_ui_navigation_service. CONSTANTS: lc_ui_action TYPE crmt_ui_actions VALUE 'C'. CHECK iv_proc_type IS NOT INITIAL. * set process type ls_params-name = 'PROCESS_TYPE'. ls_params-value = iv_proc_type. "Z*** APPEND ls_params TO lt_params. * Create Root Entity lr_core = cl_crm_bol_core=>get_instance( ). lr_factory = lr_core->get_entity_factory( 'BTOrder' ). "#EC NOTEXT lr_order = lr_factory->create( lt_params ). CHECK lr_order IS BOUND. CREATE OBJECT lr_col TYPE cl_crm_bol_bo_col. lr_col->add( iv_entity = lr_order iv_set_focus = abap_true ). * call API to send the changes before the removal * from the global transaction lr_core->modify( ). * Add navigation descriptor CALL METHOD cl_crm_uiu_bt_navigate=>prepare_col_for_navigate EXPORTING ir_collection = lr_col iv_ui_action = lc_ui_action EXCEPTIONS no_nav_descriptor_inserted = 1 OTHERS = 2. lr_nav = cl_crm_ui_navigation_service=>get_instance( ). lr_nav->navigate_dynamically( lr_col ).
Thanks in advance,
John