cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the DropDownByKey value as short description from the domain

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Dear Bhanu,Srinivas,kris

Thanks for your replies it worked...

former_member199125
Active Contributor
0 Kudos

Hi Sudhir,

use STF4_GET_DOMAIN_VALUE_TEXT' function module to retrieve the short descriptions. And go through below link it will be helpful to you.

Regards

Srinivas

Former Member
0 Kudos

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