2008 Aug 18 12:45 PM
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.
2008 Aug 18 12:49 PM
>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.
2008 Aug 19 4:25 AM
hi vijay,
Actulally my problem is finding out datatype in my own program thru coding.. Can u pls help me...
Regards,
Florian
2008 Aug 19 5:05 AM
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.
2008 Aug 19 6:34 AM
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.
2008 Aug 19 6:33 AM
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.
2008 Aug 20 12:24 PM
As per vijay said i found the data types of type pools statement.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |