Working with collections wrapper
In CRM : Work Area's equivalent is Entity
Internal Tables equivalent is Collection Wrapper.
So - for a table - you would have to add multiple entities into a collection wrapper -
which in turn would be displayed on UI on its own.
Entity reference Class is : CL_CRM_BOL_ENTITY
Collection Wrapper reference Class is: CL_BSP_WD_COLLECTION_WRAPPER.
DATA: lr_btadmini TYPE REF TO cl_crm_bol_entity,
lv_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
lr_entity TYPE REF TO cl_crm_bol_entity,
lv_zzfld000002 TYPE char10 ,
lv_adrc TYPE adrc ,
l7_msg_service TYPE REF TO cl_bsp_wd_message_service,
lvsp_msg_v1 TYPE string VALUE 'Please enter the correct address',
lv_size type char2 .
lv_wrapper = me->ztyped_context->zbtadmini->get_collection_wrapper( ).
lv_size = lv_wrapper->size( ).
IF lv_wrapper IS BOUND .
lr_entity ?= lv_wrapper->get_first( ). : Switching pointer to first record (entity)
WHILE lr_entity IS BOUND. : Loop in the wrapper
lv_zzfld000002 = lr_entity->get_property_as_string( 'ZZFLD000002' ). lr_entity ?= lv_wrapper->get_next( ).
ENDWHILE.
ENDIF .
Post a Comment