Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3180

Task creation and adding it to main IR which is not yet created

$
0
0

Hi all,

 

I am trying to create a task and assign it to the main IR. but the problem is Main IR is not yet saved in the database yet.

How to achieve this using BOL.

 

 

call function 'ZCRM_CREATE_TASK'----I am calling crm_order_maintain in this FM

just after this i am modifying same task and trying to add it to the ROOT list so that when main IR will call CRM_ORDER_SAVE it should have both.but i tried it has only 1.

 

 

     data : lr_core type ref to cl_crm_bol_core.
      data lr_entity1 type ref to cl_crm_bol_entity.
      data lr_order_h type ref to cl_crm_bol_entity.
      try.
          lr_core = cl_crm_bol_core=>get_instance( ).
          lr_core->start_up( exporting iv_appl_name = 'ONEORDER'
                                     iv_display_mode_support = abap_true ).
          lr_entity1 ?= lr_core->get_root_entity(
                    iv_object_name = 'BTAdminH'
                    iv_object_guid = lv_guid1 ).
lr_order_h = lr_entity1.

lr_order_h->switch_to_change_mode( ).
IF lr_order_h->lock( ) = 'X'.
  IF lr_order_h->is_changeable( ) = 'X'.
    lr_order_h->if_bol_bo_property_access~set_property( iv_attr_name = 'DESCRIPTION'
                                                               iv_value     = 'Melbourne' ).
     lr_core->modify( ).

ENDIF.ENDIF.


      

Anit

 

 

Please help.

 

THanks

Anit


Viewing all articles
Browse latest Browse all 3180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>