BOL PROGRAMMING
• 1.Get the BOL Core instance
LR_CORE =
CL_CRM_BOL_CORE=>get_instance( ).
2. Load the component set
LR_CORE->LOAD_COMPONENT_SET( 'ZMOB_cmpset' ).
3.Create the query instance by passing the search
object name
lr_query = CL_CRM_BOL_DQUERY_SERVICE=>get_ins
tance( iv_query_name = ’AdvancedMobileSearch' ).
BOL PROGRAMMING.. Continue..
• *adding query parameters
ls_param-name = 'MAX_HITS'.
LS_PARAM-VALUE = '2'.
APPEND LS_PARAM TO LT_PARAM.
LR_QUERY->SET_QUERY_PARAMETERS( LT_PARAM ).
* Adding Selection parameters
• LR_QUERY->ADD_SELECTION_PARAM
EXPORTING
IV_ATTR_NAME = 'GUEST_ID'
IV_SIGN = 'I'
IV_OPTION = 'EQ'
IV_LOW = '*'.
IV_HIGH =
BOL PROGRAMMING.. Continue..
• *adding query parameters
ls_param-name = 'MAX_HITS'.
LS_PARAM-VALUE = '2'.
APPEND LS_PARAM TO LT_PARAM.
LR_QUERY->SET_QUERY_PARAMETERS( LT_PARAM ).
* Adding Selection parameters
• LR_QUERY->ADD_SELECTION_PARAM
EXPORTING
IV_ATTR_NAME = 'GUEST_ID'
IV_SIGN = 'I'
IV_OPTION = 'EQ'
IV_LOW = '*'.
IV_HIGH =
• *Get the result list
• LR_RESULT = LR_QUERY-
GET_QUERY_RESULT( ).
• LR_entity = lr_result->get_first().
• While lr_entity is bound.
• Ui elements- lr_entity..
• Endwhile.
Important classes and Interfaces in BOL
BOL classes
Interfaces and Classes
BOL Entities
• CL_CRM_BOL_ENTITY_
MANAGER holds
references of BOL
Entities in entity_tab.
• The BO represented by
BOL entity is defined by
GenIL Layer.
Collection object
• Business Object in BOL
are nothing but Entity.
• IF_BOL_COL is generic
• IF_BOL_ENTITY_COL- Is
specific to Entity class.
• IF_BOL_BO_PROPERTY_
ACCESS- provides
properties of BO.
Working with collections
• A collection is a list of BOL entities
and is used in a similar way as an
internal table with object
Collection
references.
Get_next
• One can add BOL entities or delete Focus
them from a collection. The BOL Entity A
collection provides features such
as add, remove, clear, and so on,
to manage entities in a collection. BOL Entity B
All BOL entities are stored as
references in a collection. BOL Entity C
• Collections are often used in Web
UI, where collections are
transferred to collection wrappers BOL Entity D
of a context node to populate the
context node with data. BOL Entity ..
Get_previous
Local Iterator
Standard Interface to access properties of
Business Objects
Interface classes
BOL PROGRAMMING
• 1.Get the BOL Core instance
LR_CORE =
CL_CRM_BOL_CORE=>get_instance( ).
2. Load the component set
LR_CORE->LOAD_COMPONENT_SET( 'ZMOB' ).
3.Create the query instance by passing the search
object name
lr_query = CL_CRM_BOL_dQUERY_SERVICE=>get_i
nstance( iv_query_name = '' ).
BOL PROGRAMMING.. Continue..
• *adding query parameters
ls_param-name = 'MAX_HITS'.
LS_PARAM-VALUE = '2'.
APPEND LS_PARAM TO LT_PARAM.
LR_QUERY->SET_QUERY_PARAMETERS( LT_PARAM ).
* Adding Selection parameters
• LR_QUERY->ADD_SELECTION_PARAM
EXPORTING
IV_ATTR_NAME = 'GUEST_ID'
IV_SIGN = 'I'
IV_OPTION = 'EQ'
IV_LOW = '*'.
IV_HIGH =
BOL PROGRAMMING.. Continue..
• *adding query parameters
ls_param-name = 'MAX_HITS'.
LS_PARAM-VALUE = '2'.
APPEND LS_PARAM TO LT_PARAM.
LR_QUERY->SET_QUERY_PARAMETERS( LT_PARAM ).
* Adding Selection parameters
• LR_QUERY->ADD_SELECTION_PARAM
EXPORTING
IV_ATTR_NAME = 'GUEST_ID'
IV_SIGN = 'I'
IV_OPTION = 'EQ'
IV_LOW = '*'.
IV_HIGH =
Demo
• BOL program for fetching Booking details.
• Debugging.
Questions??..
Does every object in GenIL is represented
by BOL individual entities?