cancel
Showing results for 
Search instead for 
Did you mean: 

fetching values from domain from fixed values

Former Member
0 Kudos

hi,

this is related to my earlier posting of fetching values from domain.

TABLE NAME IS Z_CODES

FIELD NAME IS CODE

DOMAIN IS CD

under DOMAIN, value range tab -> single values. in that i have few FIXED values around 10 and may likely to change. how to pull these and insert these values in the range table in my program .

any help would be appreciated.

Thanks,

kranthi.

Message was edited by: kranthi kumar

Message was edited by: kranthi kumar

Message was edited by: kranthi kumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kranthi,

If you know the domain name, then, you can execute a query on table DD07L. The texts for the values can be retrieved from DD07T, with sy-langu.

DOMNAME - Domain name

AS4LOCAL - Activiation status. Make sure you query with value 'A', for the active version.

VALPOS will determine the order in which the values exist.

If the domain has a range, then, the fields DOMVALUE_L and DOMVALUE_H will be populated.

Cheers,

Rahul

Former Member
0 Kudos

Hi Kranthi,

I would not recommend to access the meta data tables directly. You may use function module DDIF_FIELDINFO_GET.

It has a very detailed documentation.

Greetings

Stephan

Answers (3)

Answers (3)

eyal_alsheikh
Active Participant
0 Kudos

Hi Kranthi,

I think you can use Function Module

GET_DOMAIN_VALUES

This returns all the fixed values in a domain with the

values description in the VALUES_TAB table parameter.

Hope it helps,

Eyal.

Former Member
0 Kudos

Hi,

I tried the function modules, but im unable to pick up the fixed values(under single values in value range tab) from the domain corresponding to that field.

im filling my range table in my program in hard coded way. i want to fill this range table with the values picked up from the domain.

could some one help me on this . your help would be appreciated.

Thanks,

kranthi.

athavanraja
Active Contributor
0 Kudos

use one of the following FMs which would give you the domains fixed values.

DDUT_DOMVALUES_GET

SWU_GET_TABLE_TO_DOMNAME

now declare a range table.

ranges: code_r for Z_CODES-code .

now loop thru the resulting table of the FM.

loop at ....

move: fmresult_tab-value to code_r-low ,

'I' to code_r-sign ,

'EQ' to code_r-option .

append code_r .

clear code_r .

endloop .

Hope this helps.

Regards

Raja

andreas_mann3
Active Contributor
0 Kudos

Hi,

try fm SWU_GET_TABLE_TO_DOMNAME

regards Andreas

Former Member
0 Kudos

> Hi,

>

> try fm SWU_GET_TABLE_TO_DOMNAME

>

>

> regards Andreas

Believe me: DDIF_FIELDINFO_GET is more robust, and if it is to complicated for you, you may also use DDUT_DOMVALUES_GET, although its documentation states that it is obsolete and now should be replaced by DDIF_FIELDINFO_GET.

Greetings

Stephan