Skip to Content

Read Type Group

Hi,

I am trying to read the type group ( type-pools ICON ) using below code:

data: obj TYPE REF TO cl_abap_typedescr,

typ TYPE REF TO cl_abap_structdescr,

table TYPE STANDARD TABLE OF abap_componentdescr.

obj = cl_abap_typedescr=>describe_by_name( 'ICON' ).

typ ?= obj.

table = typ->get_components( ).

what i am getting is Transparent table's(ICON) components instead, as Transparent table ICON also exists!!!

i am not able to read Type groups components,

is it possible to read type groups components using above method or any method for that matter????

Please suggest.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 12, 2010 at 08:45 AM

    Type groups are specific DDIC objects, which you cannot evaluate using RTTS classes. This can be provided i.e by fm TYPD_GET_OBJECT , but not the way you are trying. In your case system assumes you provide valid DDIC object (table, structure, data object) to method describe_by_name . That's why it returns components of a table, not a type group with same name.

    Regards

    Marcin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.