Skip to Content
avatar image
Former Member

Re: selected row index in table

I have a table column as link to action.

On selecting the link it should navigate to its details(detailed info). Without lead select i might click on the value. in this case how do i get that selected value.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 05, 2009 at 06:55 AM

    Implement the event onAction of linktoaction and place the following code in the method;

    Data: context_element type ref to if_Wd_context_element.
    
    context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
    context->element->get_static_attributes( importing static_attributes = ls_stru ),
    " ls_stru will have the contents of the entire row, ls_stru-fieldname will give you the value
    
    Radhika

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Radhika,

      Thanks a lot. It is exactly what i required.

      A small correction in the code.

      Data: context_element type ref to if_Wd_context_element.

      context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

      context_element->get_static_attributes( importing static_attributes = ls_stru ).

      thanks again

  • avatar image
    Former Member
    Sep 06, 2009 at 05:20 AM

    Hi,

    As radhika says you can only get the selected rows in table only. If you have to display some other details which are not present in UI table, then you will have get the primary field in the method suggested by radhika. Then you have to use a query to get the necessary fields from DB table using this primary field.

    Hope this helps you.

    thanks,

    Aslam

    Add comment
    10|10000 characters needed characters exceeded