cancel
Showing results for 
Search instead for 
Did you mean: 

How to access attributes of object dynamically

Former Member
0 Kudos

Hi All,

I am new to web dynpro, I have a requirement in which I have a Z class, which is getting called when I press GO in Portal screen(Selection Screen having i/p fields),I need to put some validation on Z class, I have an importing parameter in Z class :

IO_SELOBJ type ref to Object.

At the time of debugging, I can see this Object refers to /SCF/CL_SELECTION_ABS class,

having attributes V_PRODUCT, V_LOCATION T_SELRANGE etc.. and the value of these attributes are present at runtime..

I need to access attribute T_SELRANGE table of object IO_SELOBJ in Z class,

T_SELRANGE is a table that contains the values filled as i/p in selection screen at portal.

I need to access the attribute of this object at run time.

I need urgent help, Please give your valuable comments .

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Try like this:

data lr_tmp_ref type ref to /SCF/CL_SELECTION_ABS.

lr_tmp_ref ?=  IO_SELOBJ.

now access the attribute using lr_tmp_ref->T_SELRANGE

Hope this helps u.,

Regards,

Kiran