11-30-2015 7:54 AM
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-30-2015 8:01 AM
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
11-30-2015 8:07 AM
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
11-30-2015 8:34 AM
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
11-30-2015 8:50 AM
11-30-2015 9:40 AM
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.
11-30-2015 9:54 AM
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
11-30-2015 12:27 PM
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
11-30-2015 1:15 PM
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
11-30-2015 4:11 PM
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
11-30-2015 10:10 AM
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.
06-21-2021 10:03 PM
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>