Skip to Content
0
Former Member
May 29, 2012 at 05:12 AM

Default value for field in CRM WEB UI

902 Views

Hi all

I need to set default value for the field in crm web ui.

component AIC_CMCR_H (enhanced) , view AIC_CMCR_H/AICCMCRHeaderEF

Field BTPARTNERSET / EMP_RESP_NAME

I've tried to do like http://scn.sap.com/thread/1098584

my impl. class is ZL_AIC_CMCR_AICCMCRHEADER_IMPL

method DO_INIT_CONTEXT

code:

CALL METHOD SUPER->DO_INIT_CONTEXT
.
data : lv_entity type ref to CL_CRM_BOL_ENTITY.

lv_entity ?= me->typed_context->BTPARTNERSET->collection_wrapper->get_current( ).
IF sy-subrc = 0.

lv_entity->set_property( iv_attr_name = 'PARTNER_FCT'
iv_value = 'SDCR0002' ).
lv_entity->set_property( iv_attr_name = 'PARTNER_NO'
iv_value = '0000000141' ).
ENDIF.

---

also tried

lv_entity->set_property( iv_attr_name = 'EMP_RESP_NAME '
iv_value = 'XNAME' ).

But i always getting dump with

Entry parameter of method CL_CRM_BOL_ENTITY->SET_PROPERTY contains value

PARTNER_FCT / PARTNER_NO / EMP_RESP_NAME , which is not allowed

Regards Dan