cancel
Showing results for 
Search instead for 
Did you mean: 

WD ABAP. set context noe for an inputField

Former Member
0 Kudos

Hello community,

Does anybody know how to set a context attribute that mapped to an inputField?

node = wd_context->get_child_node( 'NodeName' ).

node->bind_elements( new_items = ANY_TABLE ).

It seems to be very inconvenient to pass any table (ANY_TABLE). Why can't I just pass a string to this method?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

There is a quick way to set values into attributes. Use the ABAP Web Dynpro Code Wizard for Read Context. It will generate all the code to get you down to the attribute that you choose in the graphical dialog. Then just change the generated code from a GET_ATTRIBUTE to a SET_ATTRIBUTE.

Former Member
0 Kudos

Hi Thomas,

thanks for the answer!

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi,

Do you have general understanding about context structure and data binding?

You are binding attribute to the particular property, not a node (with some exceptions like dataSource for table). But to set attribute you need at least one node element. There is always one - root. You can define cardinality of node 1..x and in this case you don`t need to create or bind your node. You can immediately set attribute value.

Best regards, Maksim Rashchynski.