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: 

How to find out structure of internal table?

Former Member
0 Kudos
566

Hi

is there any way how to find out name of structure upon which internal

table was created?

i got internal table passed to function module by any table

type. There can be different types of table passed in. Inside of

module a need to find out the structure of table.

I've found a tricky way how to find this information using following

command 'DESCRIBE FIELD dobj INTO td.', but its probably not a correct

way because using this command is not recommended in application

programs.

Is there any function module, or something i can use for getting this information?

Thanks

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos
427

Look at the RTTI classes and their methods, especially CL_ABAP_STRUCTDESCR and CL_ABAP_TABLEDESCR.

http://help.sap.com/abapdocu_70/en/ABENRTTI.htm

Thomas

4 REPLIES 4

Former Member
0 Kudos
427

se37 --> type function module name --> display

in data declartion part the type would be there .

if the FM is calling from any report then in the main report , there would be definition of internal table . search it .

thanks

SuhaSaha
Advisor
Advisor
0 Kudos
427

Hello,

You can make use of the SAP RTTS for this purpose.

Search in SDN for details.

BR,

Suhas

ThomasZloch
Active Contributor
0 Kudos
428

Look at the RTTI classes and their methods, especially CL_ABAP_STRUCTDESCR and CL_ABAP_TABLEDESCR.

http://help.sap.com/abapdocu_70/en/ABENRTTI.htm

Thomas

0 Kudos
427

Thanks very much

This has solved my problem:

DATA descr_ref TYPE ref to cl_abap_typedescr.

DATA tabname TYPE string.

descr_ref = cl_abap_typedescr=>describe_by_data( itab ).

tabname = descr_ref->absolute_name.