on 11-13-2015 3:00 PM
Hi
I've this question, during a loading of web dynpro I need to disable an input field for a particular kind of users, how can I disable an input field in WDDOINIT method?
Thank you
Hi I've done by myself, it's possible to do it into WDINIT method using an attribute to fill that is used to bind the input filed enable property.
It's possible to disable/enable the field into WDDOMODIFYVIEW with attribute 'FIRST' = X and using class CL_WD_INPUT_FIELD
l_input type ref to cl_wd_input_field.
l_input ?= view->get_element( 'COUNTRY' ).
l_input->set_read_only( abap_true ).
I'll mark this as correct answer if nobody will reply in 5 days
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes
The first method I've mentioned and honestly that I've used for my web dynpro, with a boolean attribute that is valorised with TRUE or FALSE linked to property "enable" of the input object
The method WDDOMODIFYVIEW has the attribute FIRST that is valorised ad X the first time is called when you open the web dynpro.
Thank you
Hi,
Either you can set the attribute value in WDDOMODIFYVIEW( ) (With condition FIRST_TIME = X) or WDDOINIT( ).
But the best practice is to write the code in WDDOINIT( ) as you are just setting the variable value to true/false.WDDOMODIFYVIEW( ) will be triggered on every action of that particular view even though you set FIRST_TIME value.
Thanks
KH
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.