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

T Table field attributes

former_member194669
Active Contributor
0 Likes
1,052

Hi All,

Is there any function module to get the custom table fields and associated T table fields

I have requirement to get the fieldname and its full attributes and if any T table is associated the custom table, the i need to get the fieldname and attributes of T table also.

Thanks

aRs

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
868

Hi Rich,

One more question regarding this.

How can i programatically find out whether a table (partent) have an association of T table (text)

Thanks

aRs

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
868

Try DDIF_FIELDINFO_GET

Regards,

Rich Heilman

Read only

0 Likes
868

An example........



report zrich_0001 .

data: idfies type table of  dfies  with header line.

parameters: p_table type  ddobjname.

call function 'DDIF_FIELDINFO_GET'
     exporting
          tabname        = p_table
     tables
          dfies_tab      = idfies
     exceptions
          not_found      = 1
          internal_error = 2
          others         = 3.


loop at idfies.
  write:/ idfies-fieldname, idfies-position,
         idfies-rollname, idfies-fieldtext.
endloop.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
868

Hi,

USe the table DD03L. this table gives you the list of all the fields and corresponding in a table.

Regards,

Vara

Read only

former_member194669
Active Contributor
0 Likes
868

Hi Rich,

Thanks for your reply.

The function module only providing info related to Main (Parent) table and not giving the details about the T table. In that case i have to call this function module second time for getting T table values.

Thanks

aRs

Read only

0 Likes
868

You mean Text Table values? Yeah, just call it again.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
868

Hi

Use the following Function Module

"DDIF_FIELDINFO_GET"

you just pass TabName & Fieldname at Exporting Parameters

this will gives you the Field Description.

Regards

Sreeni

Read only

former_member194669
Active Contributor
0 Likes
869

Hi Rich,

One more question regarding this.

How can i programatically find out whether a table (partent) have an association of T table (text)

Thanks

aRs

Read only

0 Likes
868

Please check the modified code.



report zrich_0001 .

data: idfies type table of  dfies  with header line.
data: p_txttable type dd08v-tabname.

parameters: p_table type  ddobjname.








call function 'DDIF_FIELDINFO_GET'
     exporting
          tabname        = p_table
     tables
          dfies_tab      = idfies
     exceptions
          not_found      = 1
          internal_error = 2
          others         = 3.


loop at idfies.
  write:/ idfies-fieldname, idfies-position,
         idfies-rollname, idfies-fieldtext.
endloop.


call function 'DDUT_TEXTTABLE_GET'
  exporting
    tabname          = p_table
 importing
   texttable        = p_txttable
*   CHECKFIELD       =
          .

skip 3.

call function 'DDIF_FIELDINFO_GET'
     exporting
          tabname        = p_txttable
     tables
          dfies_tab      = idfies
     exceptions
          not_found      = 1
          internal_error = 2
          others         = 3.


loop at idfies.
  write:/ idfies-fieldname, idfies-position,
         idfies-rollname, idfies-fieldtext.
endloop.

Regards,

Rich Heilman