‎2010 Feb 23 2:26 PM
Hi there dear ABAP'ers.
1. I would like to ask do you know some function module that I pass a table name to and it would return this table fields list?
2. Is there some possibility to get not only table fields list, but their types as well?
What I want to do is that I want to get ADRC table fields list and put this fields list into searchhelp later.
I will be thankful for some suggestions.
Regards,
P.
‎2010 Feb 23 2:28 PM
Hi,
You can use the FM below.
Calling FM to get the dictionary field attributes
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = rv_table (Your table name)
TABLES
dfies_tab = lt_fields
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.This will give all the field attributes as well.
Regards,
Ganga
‎2010 Feb 23 2:28 PM
Hi,
You can use the FM below.
Calling FM to get the dictionary field attributes
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = rv_table (Your table name)
TABLES
dfies_tab = lt_fields
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.This will give all the field attributes as well.
Regards,
Ganga
‎2010 Feb 23 2:30 PM
Plz SEARCH in SCN before posting, it is already discussed here lot of times.