Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Disabled the txt field that corresponds to an object cl_crm_bol in run time

Hello experts,

I have the content of my object, but I would like to disabled the txt field that corresponds to this field by code.

sSectorPod = lr_entityPoint->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'PD_SPARTE' ).

Disabled the txt field that corresponds to 'PD_SPARTE' attribute by code with a method, Could you help me please???

Thanks in advance.

Tags:
Former Member
Former Member replied

Hi Garcia,

I dont have access to the server right now, hence I cant paste a sample code now!. but I can elaborate what i meant..

page layout or page variables you can find them in the page attributes tab of .htm page, where you have to create a new variable of type CRMT_BOOLEAN, say lv_bool.

now, open the layout tab and modify the attribute of input field as disabled = <%= lv_bool %>

thats all at the .htm page, now come to your controller ( *_IMPL class ) I assume that you have aready made it in customer namespace ( z ) so that we can modify. here you have to check the value of the variable ( via getter method ) and under the condition you have to set the variable lv_bool to TRUE / FALSE. a sample code you can see from the set_models( ) method of the controler, please go through it.

hope it helps..

Regards, Sudeep..

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question