cancel
Showing results for 
Search instead for 
Did you mean: 

Table and ABAB function

former_member211905
Participant
0 Kudos

Hey,

I have a table with five rows containing different values. I want to select one row and pass the selected value (called the EmbNo in code) to my ABAP function to get more data about the associated object I have selected.

In wdDoInit() I have set the default value like:

input.setEmbNo("700");

What can I do to set the EmbNo to the selected value instead?

Kind Regards

Øyvind Isaksen

Accepted Solutions (1)

Accepted Solutions (1)

former_member85655
Active Participant
0 Kudos

Hi Jorn,

You can read the value of the attribute from the context of the currently selected element like this and set it to your input.

input.setEmbNo(wdContext.nodeVal().currentValElement().get<<Attr-name>>());

Regards,

Arun

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Assuming you have following structure for your tablenode.

TableNode

|__

EmbNo

Then to pass the the selected value in your table,you create an action say onActionSelectEmbNo and assign it to onLeadSelect event of your table and write the code in that action which will be something like:

input.setEmbNo(wdContext.currentTableNodeElement().getEmbNo());

Regards,

Ajay

thomas_szcs
Active Contributor
0 Kudos

Hi Jørn,

In the action handler, call get_selected_elements() of the context node to which the table binds to. On the returned element, call get_attribute().

Best regards,

Thomas