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_attribute method

Former Member
0 Kudos

Hello,

I´ve created an instance of a local class and have set a special attribute.

Now I want to use the value of is attribute for a different class using

lr_layout->set_save_restriction(

gr_default_values->get_restriction( ) ).

but this doesn´t work. any suggestions?

I´ve found out that the following code works,

but in this case i have to declare alwas local variables.

DATA: ls_val TYPE salv_de_layout_restriction.

ls_val = gr_default_values->get_restriction( ).

CALL METHOD lr_layout->set_save_restriction

EXPORTING

value = ls_val.

As i want to predifine a lot of attributes it would be mor easy to use the first code

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Bernhard, you are thinking like a java developer, this is good. Unfornately, this syntax is not yet supported by ABAP. So for now, you will need to do as you have done with the variable.

Regards,

Rich Heilman

2 REPLIES 2

Former Member
0 Kudos

is there any idea ??

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Bernhard, you are thinking like a java developer, this is good. Unfornately, this syntax is not yet supported by ABAP. So for now, you will need to do as you have done with the variable.

Regards,

Rich Heilman