Hello experts!
As it's mentioned in the title I have problem with starting campaign using ABAP source code. I'm using BOL to get to the right entity, but I don't know what I should do next. Below I've pasted my source code. Please help.
DATA: lr_entity TYPE REF TO cl_crm_bol_entity. DATA: lr_entity_rel TYPE REF TO cl_crm_bol_entity. DATA: lr_bol_core TYPE REF TO cl_crm_bol_core. DATA: lr_context TYPE REF TO if_bol_transaction_context. DATA: lv_object_guid TYPE crmt_object_guid. DATA: ls_params TYPE crmt_name_value_pair. DATA: lt_params TYPE crmt_name_value_pair_tab. DATA: lv_temp TYPE string. lr_bol_core = cl_crm_bol_core=>get_instance( ). lr_bol_core->load_component_set( 'CRMD_MKTPL' ). TRY. lr_bol_core->get_root_entity( EXPORTING iv_object_name = 'Campaign' iv_object_guid = '00155DB5D0071ED3B9C83DDD1AD3D231' RECEIVING rv_result = lr_entity " Entity ). CATCH cx_root. ENDTRY. lr_entity ?= lr_entity->get_related_entity( 'CPGStatusRel' ). IF lr_entity IS BOUND. "???? ENDIF. lr_bol_core->modify( ). lr_context = lr_entity->get_transaction( ). IF lr_context->check_save_needed( ) EQ abap_true. lr_context->save( ). lr_context->commit( ). ENDIF.
Thanks in advance