on 01-15-2013 11:41 AM
Hi All,
According to the selection of dropdownbyindex i need to display the input field.
For Example:
I have selected value from dropdownbyindex as 'AA' i need to display the inputfield with disable mode.
I have selected value from dropdownbyindex as 'AB' i need to display the inputfield with enable mode.
I have selected value from dropdownbyindex as 'Ac' i need not to display the inputfield.
Can any one guide me how to do this.
Hi Durga,
No need to create new attribute everytime for hiding or disabling...use the same attribute which is binded to the input field. There is one option for "Read Only" and "Disable". After that use SET_ATTRIBUTE_PROPERTY...this wil make easy and shorter...
Refer this link also..it is very good..
http://help.sap.com/saphelp_nw70/helpdata/EN/45/d44e0cdff073b1e10000000a11466f/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Properties of dropdown are read only and visible.
Follow steps are below.
1. create context on the view name: dmode with cardinality 0:1
2. create attribute visible and readonly with type WDY_BOOLEANfor the context dmode.
3. bind the attribute readonly to property read only of dropdown.
4. bind the attribute visble to property visble only of dropdown.
Now you need to set the value for the attribute.
you can use one of these methods. WDDOMODIFYVIEW of view and you can create method inside control (in this case you need to call from view) and you can also create method of ONSELECT of dropdown.
better for now write your code inside method of WDDOMODIFYVIEW.
IF dropdownbyindex EQ 'AA'.
set attribute readonly to X
set attribute display to X
ELSEIF dropdownbyindex EQ 'AB'.
clear attribute readonly.
set attribute display to X.
ELSEIF dropdownbyindex EQ 'AC'.
clear attribute display
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Durga,
Just find the below link from sap technical , which shows how to hide and display UI elemnts dynamically. ( In Sap technical it was about using radio button , in ur case it is drop down).
http://www.saptechnical.com/Tutorials/WebDynproABAP/Hide/Page1.htm
watch this tutorial ..
Reward points , if its helpful.
Regards
Aravindan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.