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: 

Data Dictionary Structure

Former Member
0 Kudos

Hi

I was wondering if anyone would have a function call that would pull back the data dictionary structure for tables like TVARV. I tried VIEW_GET_DDIC_INFO but I recieve and error saying that no TVDIR entry exsits. Is there anything else that might work? If not is there a table that I could use to pull a select for all the table field information?

Thanks

John

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here ya go.



report zrich_0002.


data: ddfields type table of ddfield with header line.

parameters: p_tab(30) type c.

call function 'DD_NAMETAB_TO_DDFIELDS'
  exporting
*   KEYFIELDS       = 'X'
*   NULLABLE        = 'X'
    tabname         = p_tab
* IMPORTING
*   SUBRC           =
  tables
    ddfields        = ddfields.


loop at ddfields.
  write:/ ddfields-fieldname,
          ddfields-position,
          ddfields-keyflag,
          ddfields-datatype,
          ddfields-leng,
          ddfields-decimals,
          ddfields-nullable.
endloop.


If this post has helped you, please award points accordingly. Thanks.

Regards,

Rich HEilman

2 REPLIES 2

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here ya go.



report zrich_0002.


data: ddfields type table of ddfield with header line.

parameters: p_tab(30) type c.

call function 'DD_NAMETAB_TO_DDFIELDS'
  exporting
*   KEYFIELDS       = 'X'
*   NULLABLE        = 'X'
    tabname         = p_tab
* IMPORTING
*   SUBRC           =
  tables
    ddfields        = ddfields.


loop at ddfields.
  write:/ ddfields-fieldname,
          ddfields-position,
          ddfields-keyflag,
          ddfields-datatype,
          ddfields-leng,
          ddfields-decimals,
          ddfields-nullable.
endloop.


If this post has helped you, please award points accordingly. Thanks.

Regards,

Rich HEilman

Former Member
0 Kudos

Thank you that works perfectly