If you need parent entities, then use GET_PARENT method
Using GET_PARENT method:
DATA: current TYPE REF TO if_bol_bo_property_access.
DATA: dref TYPE REF TO data.
DATA: lr_current TYPE REF TO cl_crm_bol_entity,
lr_bt_statush TYPE REF TO cl_crm_bol_entity,
lr_bt_adminh TYPE REF TO cl_crm_bol_entity.
DATA: lv_process TYPE CRMT_PROCESS_TYPE_DB.
if iterator is bound.
current = iterator->get_current( ).
else.
current = collection_wrapper->get_current( ).
endif.
lr_current ?= current.
TRY.
lr_bt_statush ?= lr_current->get_parent( ).
CATCH cx_crm_genil_model_error .
ENDTRY.
TRY.
lr_bt_adminh ?= lr_bt_statush->get_parent( ).
CATCH cx_crm_genil_model_error .
ENDTRY.
TRY.
lr_bt_adminh->get_property_as_value( EXPORTING IV_ATTR_NAME = 'PROCESS_TYPE'
IMPORTING EV_RESULT = lv_process ).
CATCH cx_root.
ENDTRY.
No comments:
Post a Comment