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: 

Type description using RTTI API

jack_graus2
Active Contributor
0 Kudos

Hello

Using the RTTI (Run-Time Type Identification) API classes I want to retrieve the DDIC description of a type. For a single field that is possible using CL_ABAP_TYPEDESCR->GET_DDIC_FIELD-FIELDTEXT.
When using the RTTI classes CL_ABAP_TABLEDESCR, CL_ABAP_STRUCTDESCR, ... is similar possible to retrieve structure or table DDIC description ?
Currently I do have this ABAP programmed using API's DD_TTHD_GET, DD_TABD_GET, ... But want to avoid programming.

Regards Jack Graus

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor

RTTI cannot return the text of a DDIC table, structure or table type.

9 REPLIES 9

Sandra_Rossi
Active Contributor
0 Kudos
DATA(rtti) = CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( 'SFLIGHT' ).

jack_graus2
Active Contributor
0 Kudos

Hello

My question was nog completely correct: I am using CL_ABAP_ELEMDESCR->GET_DDIC_FIELD( )-FIELDTEXT to retrieve data element description.

That works for data element types. But for table or structure types when using CL_ABAP_TABLEDESCR or CL_ABAP_STRUCTDESCR it is not possible to return the table or structure description with CL_ABAP_ELEMDESCR.

Regards

Sandra_Rossi
Active Contributor
0 Kudos

You mean, you'd like to know if there's a RTTI method to retrieve texts of table/structure components in bulk?

jack_graus2
Active Contributor
0 Kudos

Hello

I would like to retrieve DDIC structure description of table 'SFLIGHT' using RTTI.

Regards Jack

0 Kudos

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.

Sandra_Rossi
Active Contributor
0 Kudos

When you say "DDIC structure description of table 'SFLIGHT' using RTTI", you mean its text "Flight"? (in English)

Sandra_Rossi
Active Contributor

RTTI cannot return the text of a DDIC table, structure or table type.

BiberM
Active Participant

For DDIC Structures and Tables you could have a look to the DB-Table DD02T (for both).

Yes indeed there seems to be no method in the RTTI classes.

p244500
Active Contributor

Hi,

You can use FM DDIF_FIELDINFO_GET to get DDIC structure description.