Skip to Content
author's profile photo Former Member
Former Member

How to return a value from a selected table row

Hi

Ive got a RFC connection to sap which render the results in a table.

How can I return one of the cell values from the table of a selected row

Thanks

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2004 at 09:07 AM

    What do you mean by "return"? Is the table editable?

    The value at table cell (row, column) is determined by the context node used as the table's data source.

    Each node element (roughly) corresponds to a row. The column has a cell editor that is bound to some attribute of the data source node.

    The selected row corresponds to the data source node's selection.

    Regards, Armin

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2004 at 09:42 AM

    Hi

    When I select(Highlight) a row in a table. Ive also got an action button . So when I hit the action button I want to

    display one of the colum values from the selected row.

    Do you have code that can do this

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Let X be the context node used as the table's data source, Y be an attribute of X that is displayed in some table column.

      After selecting row i, it holds:

      wdContext.nodeX().getLeadSelection() == i

      The value of attribute Y for the selected row is:

      wdContext.currentXElement().getY()

      Regards, Armin