on 07-08-2011 4:12 PM
Dear All,
I am facing problem with getting the dropdownbykey value.I have created a domain and I vave
Fixed values and short description.When I bind the data element of the corresponding domain I am able to display
the short description on the screen.
But when I try to get_attribute on the ui element I am getting
Fixed value where as I am looking for short description .Please help .
I tried following things but in vain...
1. I tried get attribute - Result is Fixed value
2.I tried WDEVENT like key = wdevent->get_string( name = 'KEY' ).Still result is Fixed value
3.I tried get _static attributes also.Same result.
Please help in getting the short description of the domain.
Thanks,
Reddy
Hi sudhir,
If you use DropDownByKey it always tabkes key value. Yo will not get any description. Functionality is like that.
If you want to get description of domain use FM suggested by srinivas.
CALL FUNCTION 'STF4_GET_DOMAIN_VALUE_TEXT'
EXPORTING
IV_DOMNAME = 'ZVBELN'
IV_VALUE = '0005'
IMPORTING
EV_VALUE_TEXT = lv_text // lv_text contains your desired description
EXCEPTIONS
VALUE_NOT_FOUND = 1
OTHERS = 2 .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I always use function module DDIF_FIELDINFO_GET to get the domain values
and bind it to the attribute.
Thats pretty simple way to get the correct values from dropdown be you just need key or description.
also the dropdown should be dropdown by value.
Do let me know if you need more info. on dropdown by value and getting description from f.m DDIF_FIELDINFO_GET to
Regards
Bhanu Malik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.