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

Type pools information gathering

Former Member
0 Likes
834

Hi guru's,

I have one problem. In my program i have to find the type of variable.

Ex

Data a type standard table of slis_t_fieldcat.

Data b type slis_t_fieldcat.

so A is an internal table

and B is an work area.

Data c type abab_bool.

now C is a variable.

Now in result i have to say like this.

a - Internal table.

b - work area

c - variable

how to find the

data type particularly for TYPE POOLS.

Pls help me.

Thanks & Regards,

Florian.

Hi guru's,

I have one problem. In my program i have to find the type of variable.

Ex

Data a type standard table of slis_t_fieldcat.

Data b type slis_t_fieldcat.

so A is an internal table

and B is an work area.

Data c type abab_bool.

now C is a variable.

Now in result i have to say like this.

a - Internal table.

b - work area

c - variable

how to find the

data type particularly for TYPE POOLS.

Pls help me.

Thanks & Regards,

Florian.

6 REPLIES 6
Read only

Former Member
0 Likes
795

>how to find the

>data type particularly for TYPE POOLS.

From SE11 you can go to that particular Type Group and check it inside.

or Double click on the Type pool which you want to see and it directly takes you to the Defintion place of the Type Pool.

Read only

0 Likes
795

hi vijay,

Actulally my problem is finding out datatype in my own program thru coding.. Can u pls help me...

Regards,

Florian

Read only

0 Likes
795

Using RTTS classes we can find the detaills check this once...

REPORT  ZTEST_DESCR

type-pools: slis.
data: dat type ref to data.
data:desc type ref to CL_ABAP_TYPEDESCR.
data: sli type ref to data.

data: str(30).

str = 'SLIS_T_FIELDCAT_ALV'.

create data sli type (str).


desc ?= cl_abap_classdescr=>describe_by_data_ref(
    p_data_ref           = sli
       ).
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


break-point.

Read only

0 Likes
795

hi vijay,

As you mensioned, i used the class CL_ABAP_TYPEDESCR. But the problem is that it returns three types of instances of,

CL_ABAP_TABLEDESCR - for Internal Table

CL_ABAP_STRUCTDESCR - for Structure

CL_ABAP_ELEMDESCR - for Variables.

Now, with this instance, how to get there class name? if i get it, i will cross check with these class names.

desc ?= cl_abap_classdescr=>describe_by_data_ref(

p_data_ref = sli

).

In this statement, how to get a class name of the instance desc?

Regards,

Florian.

Read only

Former Member
0 Likes
795

hi vijay,

As you mensioned, i used the class CL_ABAP_TYPEDESCR. But the problem is that it returns three types of instances of,

CL_ABAP_TABLEDESCR - for Internal Table

CL_ABAP_STRUCTDESCR - for Structure

CL_ABAP_ELEMDESCR - for Variables.

Now, with this instance, how to get there class name? if i get it, i will cross check with these class names.

desc ?= cl_abap_classdescr=>describe_by_data_ref(

p_data_ref = sli

).

In this statement, how to get a class name of the instance desc?

Regards,

Florian.

Read only

Former Member
0 Likes
795

As per vijay said i found the data types of type pools statement.