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 values of the value table ?

Former Member
0 Kudos

Hello all,

I want to get the values of the value table, given a domain name.

Ex: To get the MATNR values of table MARA, giving the MATNR as input on the selection screen.

Is it possible? Is there any FM?

Thanks

SR

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

You can use fm RFC_READ_TABLE, this is an rfc fm but you can use as std fm.

Max

4 REPLIES 4

Former Member
0 Kudos

Hi

You can use fm RFC_READ_TABLE, this is an rfc fm but you can use as std fm.

Max

Former Member
0 Kudos

Hi,

Use this table to get the values of VALUE TABLE.

Table:DD07T

Here give the DOMAIN and get the values related to it.

Thanks.

If this helps you reward with points.

hymavathi_oruganti
Active Contributor
0 Kudos

to get the values of value table as f4 help, the field should have foriegn key relation and the check table name should be the value table. other wise u cant see the values of value table

0 Kudos

Hi

forget my previous answer.

Yuo can use a code like this:

PARAMETERS: p_table TYPE ddobjname,

p_dom LIKE dfies-domname.

DATA dfies_tab LIKE STANDARD TABLE OF dfies WITH HEADER LINE.

DATA: ftab TYPE TABLE OF string.

FIELD-SYMBOLS: <fs_table> TYPE table.

CALL FUNCTION 'DDIF_FIELDINFO_GET'

EXPORTING

tabname = p_table

TABLES

dfies_tab = dfies_tab

EXCEPTIONS

not_found = 1

internal_error = 2

OTHERS = 3.

CHECK sy-subrc <> 0.

LOOP AT dfies_tab WHERE domname = p_dom.

APPEND dfies_tab-fieldname TO ftab.

ENDLOOP.

SELECT (ftab)

FROM (p_table)

INTO TABLE <fs_table>.

In this case you have to create dynamically the table <fs_table> or you can also use a table string:

DATA: T_DATA TYPE STANDARD TABLE OF STRING.

SELECT (ftab)

FROM (p_table)

INTO TABLE T_DATA.

Max