Hi Experts,
I have my code as below:
lr_current is turning out to be intial and is throwing an exception which i want to avoid.
I need to pass some data into this lr_current when it is initial to avoid this?
data: lr_current TYPE REF TO if_bol_bo_property_access,
lr_coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper.
TRY.
lr_current ?= lr_coll_wrapper->get_current( ).
CHECK lr_current IS BOUND.
DATA : lv_country TYPE string.
lv_country = lr_current->get_property_as_string( iv_attr_name = 'COUNTRY' ).
IF lv_country is INITIAL.
lr_current->set_property( iv_attr_name = 'COUNTRY' iv_value = 'US' ).
ENDIF.
CATCH cx_sy_move_cast_error.
endtry.
Can any one pls suggest?