Application Development and Automation 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: 
Read only

Data Dictionary Structure

Former Member
0 Likes
878

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
Read only

RichHeilman
Product and Topic Expert
Product and Topic Expert
0 Likes
841

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

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

2 REPLIES 2
Read only

RichHeilman
Product and Topic Expert
Product and Topic Expert
0 Likes
842

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

Read only

Former Member
0 Likes
841

Thank you that works perfectly