Hi Experts,
I have made a small customized on the Web UI BT107H_OAS .
I added a Drop down list box on the view BT107H_OAS/Details by adding the field Category .
When I ran the Web UI I'm able to see the newly added field, but the field was input disabled.
When I debug the view, I noticed under the GET_I_CATEGORY method, some relationship was missed with respect to 'BTHeaderActivityExt' .
Plesae see the code below.
Class - CL_CRM_UIU_BTADMINH_CN
method GET_I_CATEGORY.
DATA: current TYPE REF TO if_bol_bo_property_access.
rv_disabled = 'TRUE'.
if iterator is bound.
current = iterator->get_current( ).
else.
current = collection_wrapper->get_current( ).
endif.
TRY.
DATA: coll TYPE REF TO if_bol_entity_col.
DATA: entity TYPE REF TO cl_crm_bol_entity.
entity ?= current.
coll = entity->get_related_entities(
iv_relation_name = 'BTHeaderActivityExt' ). "#EC NOTEXT
current = coll->get_current( ). <--- Here the current values becomes initial and thus the category field was disabled.
IF current IS NOT BOUND.
RETURN.
ENDIF.
IF current->is_property_readonly(
'CATEGORY' ) = abap_false. "#EC NOTEXT
rv_disabled = 'FALSE'.
ENDIF.
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
cx_crm_genil_model_error.
RETURN.
ENDTRY.
endmethod.
Please advice me on fixing the above issue.
Many Thanks!
James....