Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the entries of the value table of a domain?

majcon
Active Participant
0 Kudos

Hi all,

I´ll try to find a function module or method which will me return for a domain the entries of the value table.

Better said the description text of the relevant keys...

(Yes I know the the fm and methods which only returns the fixed values like for example  cl_crm_eewa_ddicinfo=>getdomainvalues or the fm  DDIF_DOMA_GET)

Is there any existing solution or need I to reevent the wheel?

Thanks in advance!

Best regards,

Damir

11 REPLIES 11

ceedee666
Active Contributor

Hi Damir,

If you pass a language value into DDIF_DOMA_GET it returns the long texts in this language.

Isn't that the functionality you need?

Christian

majcon
Active Participant
0 Kudos

Hi Christian,

this fm only returns the fixed values (for example values of view dd07v), but I need an fm which will take the value table. For example try Domain S_MEALNUM it contains the entitytab SMEAL with a connected Texttable SMEALT and here it should return the text for the existing keys...

BR Damir

Former Member

Hi Damir,

Please try using FM DDIF_FIELDINFO_GET. If you pass table name, field name and Data element. This will return list of domain values with corresponding texts.

Thanks and Regards,

Addy

0 Kudos

Adding to above.

FM DDUT_TEXT_FOR_VALUE.

Thanks and Regards,

Addy

Former Member
0 Kudos

Greetings Damir,

Try to get details of value table from DD01L table.

Use FM DDUT_TEXTTABLE_GET to get name of text table and use that to get data.

Thanks,

Hardik.

0 Kudos

Hi,

if you don't use the stardard FM "ddif_dom_get" you should see the METHOD "get_ddic_fixed_values" of the CLASS "cl_abap_elemdescr".

best regards

Laura

0 Kudos

Hi Laura,

thanks for your reply, but these kind of fm only return the fixed values.

I need a solution which return the values of a possible value table.

For example you can use the Domain 'S_MEALNUM' and the fm or method should return the existing values from the value table or better said for the existing text table...

BR,

Damir

0 Kudos

Hi,

for the domain you tell me there no list of values that you can get form standard fm o method.

The values are in the table SMEAL.

According to me you should get the name of the values table ( use FM: DDIF_DTEL_GET, return field:  DD04V_WA-ENTITYTAB ) and than call a dynamic query on that table to get the values .

best regards

Laura

0 Kudos

Hi,

yes that was the reason why I wrote "need to re-event the wheel"...

I thought that there is an existing functionality which provide me the informations

BR,

Damir

Sudhakargadde
Participant
0 Kudos

Hi Majer,

There is no existing solution in my search, please let us know if you find any solution, my recommendation we need to re-event the wheel.

Regards,

Sudhakar.

ray_mannion
Participant
0 Kudos

This works well for me. It is only 3 lines of code.

I have a domain ZSTATUS which has fixed values.

My report passes the field <item>-status into the descriptor and then this cl_fpm_list_utils class method returns the description. It only does it using the current language.

    DATA lo_elemdescr TYPE REF TO cl_abap_elemdescr.
    lo_elemdescr ?= cl_abap_typedescr=>describe_by_data( p_data = <item>-status ).
    ms_header-status_text = cl_fpm_list_utils=>get_ddic_fixed_value( EXPORTING io_elem_descr = lo_elemdescr iv_value = <item>-status ).<br>