Hi all
My issue was solved. I need to create core object 'BTOrder' before calling method ip_create.
Here is code snippet I've used.
DATA lr_core TYPE REF TO cl_crm_bol_core.
DATA lr_entity TYPE REF TO cl_crm_bol_entity.
DATA: ls_params TYPE crmt_name_value_pair.
DATA: lt_params TYPE crmt_name_value_pair_tab.
DATA : lr_factory TYPE REF TO cl_crm_bol_entity_factory.
lr_core = cl_crm_bol_core=>get_instance( ).
lr_core->load_component_set( EXPORTING iv_component_set_name = 'ONEORDER' ).
CLEAR : ls_params , lt_params[].
ls_params-name = 'PROCESS_TYPE'.
ls_params-value = 'Z003'.
APPEND ls_params TO lt_params.
TRY.
lr_factory = lr_core->get_entity_factory( iv_entity_name = 'BTOrder' ).
lr_entity = lr_factory->create( lt_params ).
CATCH cx_crm_unsupported_object.
ENDTRY.
Then add it to collection of component controller's context node.
Thank you everyone.
Regards
Krit R.