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: 

Get the class attributes name dynamically?

Former Member
0 Kudos

Hi all,

I have to call a transformation and give it as result parameter an internal table with ABAP_TRANS_RESBIND_TAB type.

How can I get the name & the adresse of the current class parameters ?

Thanks.

Edited by: Noureddine MOUTAA on Oct 20, 2008 2:01 PM

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

Check the view: VSEOATTRIB. It contains the metadata regarding the Attributes of the Class.

You can use the dynamic attribute like:


data_tab = 'R_TABLE'.

l_test = o_alv->(data_tab).

Regards,

Naimesh Patel

4 REPLIES 4

naimesh_patel
Active Contributor
0 Kudos

Check the view: VSEOATTRIB. It contains the metadata regarding the Attributes of the Class.

You can use the dynamic attribute like:


data_tab = 'R_TABLE'.

l_test = o_alv->(data_tab).

Regards,

Naimesh Patel

0 Kudos

is there any way to get the reference ?

0 Kudos

Hello Nourredine,

Try to use the class CL_ABAP_CLASSDESCR, there is an attribute (tables) which contains all attributes' properties.

What do you mean by get the reference? You can use a field symbol with the name to get the value of the attribut (is what you mean?)

Hope it helps

Olivier

0 Kudos

I have to call a transformation and give it as result parameter an internal table type ABAP_TRANS_RESBIND_TAB.

And to fill this internal table, I need the name and the reference of the attribute

I mean by REFERENCE the result of this instruction GET REFERENCE OF, as shown below:


DATA: attribute TYPE string.
DATA: the_reference TYPE REF TO data.
GET REFERENCE OF attribute INTO the_reference.

Thanks.

Edited by: Noureddine MOUTAA on Oct 20, 2008 4:37 PM