***************************************************************************************************************
*BOL PROGRAMMING
*SAP CRM WEBCLIENT
*GIVES INTRODUCTION TO * basic activities like search, create, update in the bol
*programming in order to give introduction to the main classes and methods of business object layer.
***************************************************************************************************************
*used data
DATA: lr_core TYPE REF TO cl_crm_bol_core.
*in order to use any service of BOL, we need to start the MODEL (component set) using
* CORE class.
lr_core = cl_crm_bol_core=>get_instance( ).
*once we have the instance, then load the component set.
*here we will be using ONEORDER component set.
*when we are working on web ui, this will be handled by framework. here we are doing it in the report programming so we need to handle it
TRY.
CALL METHOD lr_core->load_component_set
EXPORTING
iv_component_set_name = 'ONEORDER'.
CATCH cx_crm_genil_general_error .
ENDTRY.
*component is loaded, so we can use the BOL services. Let us search for a particular
*contract. for that we need to get an instance of dquery service class.
DATA: lr_query TYPE REF TO cl_crm_bol_dquery_service,
lr_result TYPE REF TO cl_crm_bol_bo_col.
*-->SEARCH OPERATION
"get the instance of dynamic search object,which will be used to search service contracts.
*BOL PROGRAMMING
*SAP CRM WEBCLIENT
*GIVES INTRODUCTION TO * basic activities like search, create, update in the bol
*programming in order to give introduction to the main classes and methods of business object layer.
***************************************************************************************************************
**************UPDATING OPERATION***************************
***************CREATE operation*****************************