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

Read Type Group

Former Member
0 Likes
523

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.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
468

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

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
469

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

Read only

0 Likes
468

Thanks for the clarification.