cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine wheter static attributes are initial or from which type

Former Member
0 Kudos

Hi,

i have a problem with my application. In my searchhelp i copy the value of the requesting context to my searchhelp component:


method SUPPLY_SEARCHVALUE .

DATA:
  stru_search  TYPE if_componentcontroller=>element_search.

wd_this->value_help_listener->f4_context_element->get_static_attributes( importing static_attributes = stru_search ).

node->bind_structure( new_item = stru_search  ).

endmethod.

but sometimes, I get an error within the call of the method get_static_attributes which says that there is a problem with move corresponding.

So, how can I dynamically get the content of the requesting context ???

or how can I determine (try - catch perhaps) if there is an error ?

Thanks a lot !!

Accepted Solutions (1)

Accepted Solutions (1)

former_member215843
Active Participant
0 Kudos

Hi Michael,

if you use get_static_attributes, it is useful to know the structure of the node. Otherwise the move-corresponding could fail or not move all necessary data.

There is a method get_static_attributes_ref, which creates a data reference and copies all static data into it. Then you could work with RTTI and dynamic assignments with this data reference.

But this will only work for the statically declared attributes, and any dynamic attributes would not be taken into account.

The solution, if you want to include the dynamic attributes, is to get the node_info, then ask the node_info for the attribute list, and then you can get each attribute separately, or you fetch the static attributes together, and the dynamical attributes one by one.

Regards, Regina

Answers (0)