02-16-2006 9:52 AM
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
02-16-2006 9:54 AM
Hi
You can use fm RFC_READ_TABLE, this is an rfc fm but you can use as std fm.
Max
02-16-2006 9:54 AM
Hi
You can use fm RFC_READ_TABLE, this is an rfc fm but you can use as std fm.
Max
02-16-2006 9:55 AM
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.
02-16-2006 9:57 AM
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
02-16-2006 10:10 AM
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