Skip to Content
avatar image
Former Member

Get row selected at cursor action.

Hi,

I am new in web dynpro programming and I need help with getting a row selected when a tab from the column gets selected with the cursor.

For example if I click on the sales org. id tab then entire row should get selected as in the second image.

I found some information about the lead selection, but that only brings the manually selected line.

How can I select the row automatically?

Any help is much appreciated.

Best regards,

Elena

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    May 26, 2014 at 02:40 PM

    Hi,

    There are no onFocus events in Web Dynpro ABAP like in java script. Only way you could do is, create an Event onEnter for the Input fied ( Sales Org) and set the lead selection in the onEnter event. User must press Enter.

    Regards,

    Kiran

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 27, 2014 at 08:15 AM

    Thank you All for your support.

    I have added the following syntax:

    data: lo_element type ref to if_wd_context_element,
    lo_node type ref to if_wd_context_node,
    lv_index TYPE i.

    lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).


    if lo_element is bound.
    lv_index = lo_element->get_index( ).
    lo_node = lo_element->get_node( ).
    lo_node->SET_LEAD_SELECTION_INDEX( index = lv_index ).
    endif.


    It does select each row at the enter action but now it's not bringing up the sales org data.


    wd_assist->get_sales_org_data( context_element ).


    This line of code seems to be bypassed somehow.


    Any suggestions?


    I already tried changing the position where this gets called but still the line is skipped.


    Best regards,

    Elena

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 27, 2014 at 10:00 AM

    Hi Guys,

    I wanted to thank you all for the support. The information was really helpful.

    Btw the logic works fine with wd_assist->get_sales_org_data( context_element ).

    The thing was that only some certain sales org were triggering that method and I was using wrong testing data.

    Cheers and have a great day ahead!


    Best regards,

    Elena

    Add comment
    10|10000 characters needed characters exceeded