Hi Marouane,
You know , it gets very simple to use dynamic navigation to fulfill this requirement . You can create a root entity for the BOL object BTOrder and using the BOL relations of the new entity you can create a BTADMINH entity set header fields etc, further you can open up the newly buffered created transaction .
Method navigate.
*1. first create navigation descriptor and check if navigation is supported
CALL METHOD cl_crm_ui_descriptor_obj_srv=>create_ui_object_based
EXPORTING
iv_ui_object_type = 'BT111_OPPT'
iv_ui_object_action = 'B'
RECEIVING
rr_result = lv_descriptor_object.
lr_nav_serv = cl_crm_ui_navigation_service=>get_instance( ).
TRY.
* check if navigation is supported
IF lr_nav_serv->is_dynamic_nav_supported( ir_descriptor_object = lv_descriptor_object )
= abap_true.
***************************************************************************
CREATE OBJECT lv_data_collection
TYPE
cl_crm_bol_bo_col.
CHECK lv_data_collection IS BOUND.
***************************************************************************
lv_data_collection->insert( iv_bo = lv_descriptor_object
iv_index = 1 ).
***************************************************************************
data : lr_core type ref to cl_crm_bol_core.
lr_core ?= cl_crm_bol_Core=>get_instance( ).
ls_param-name = 'PROCESS_TYPE'.
ls_param-value = 'OPPT'.
append ls_param to lt_param.
lr_coll ?= lr_core->root_Create( iv_object_name = 'BTOrder' iv_number = 1 iv_create_param = lt_param ).
lr_entity ?= lr_coll->get_first( ).
" AFTER RECEIVING THIS LR_ENTITY , you can create it's bol relation to initiate any fields on web ui.
CHECK lr_entity IS BOUND.
lv_data_collection->insert( iv_bo = lr_entity
iv_index = 2 ).
lr_nav_serv->navigate_dynamically( iv_data_collection = lv_data_collection ).
ENDIF.
CATCH cx_sy_ref_is_initial. "#EC NO_HANDLER
ENDTRY.