Skip to Content
0
Former Member
Nov 07, 2012 at 03:58 PM

Set default value to dropdown field in CRM WEB UI

1868 Views

Hi,

I have requirement to set default value in dropdown list box in WEB UI, here are the technical details.

UI Component: TPMOE

View: HeaderEOF

Field: STRUCT.CUSTOMER_TYPE (Account Type)

I saw couple of discussion about setting the default value to list box and even tried one writing code in DO_PREPARE_OUTPUT method. But, it did not work.

Not sure what I am missing, please let me what else should I do to get the default value in drop-down list.

Here is the code...

method DO_PREPARE_OUTPUT.

Data lr_entity type ref to cl_crm_bol_entity .

CALL METHOD SUPER->DO_PREPARE_OUTPUT

EXPORTING

iv_first_time = ABAP_false .


lr_entity ?= me->typed_context->TRADE->collection_wrapper->get_current( ).

lr_entity->set_property( iv_attr_name = 'CUSTOMER_TYPE' iv_value = 'Account' ).

endmethod.