Skip to Content
avatar image
Former Member

How can I identify a table line in a context without a lead selection?

Hi!

I have a Web Dynpro with a table of WBS elements, and since this Web dynpro is developed in another system than the WBS data I have to create dropdowns and search helps manually.

The problem is : if a user choose a fields dropdown or search help on a line in the table without selecting the whole line, I'm not able to get the lead selection or line index. I need to read some of the other values on the WBS elements line to be able to create the dropdown. Some of the dropdown values are depending on fex. company code. It's easy enough if I do not need any input values to the search help, then it works fine.

Does anyone know how I can get a table lines context when it is not marked as selected? It's just the cursor that stands on a field search help on a line.

regards, Tine

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Feb 24, 2009 at 02:31 PM

    Hi Tine,

    Getting the Row Data on element click. In my application i have TABLE that has internal table binded to

    it. Each row in my table has a Button, i have written the below code for onClick action, when row need not necessarily be in LEAD SELECTION. Thus if you write the same for OnEnter or othe UI element event it should work.

    "CONTEXT_ELEMENT
    OnClickAction
    
    Data : lr_elem type ref to if_wd_context_element,
              ls_data type ZST_myData.  
      
    CALL METHOD WDEVENT->GET_CONTEXT_ELEMENT
      EXPORTING
        NAME   = 'CONTEXT_ELEMENT'
      RECEIVING
        VALUE  = lr_elem.
    
    CALL METHOD LR_ELEM->GET_STATIC_ATTRIBUTES
      IMPORTING
        STATIC_ATTRIBUTES = ls_data.
    
    
    endmethod.

    "ls_data has all the content of the ROW on which click occured.

    Greetings

    Prashant

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2009 at 02:38 PM

    Hi!

    Thanks for input.

    Problem is I don't think a click on a fields dropdown list or search help icon can trigger any action: It's not natural to press the enter button when you want to see a dropdown list.

    Or do you have any suggestions how a serach help can trigger an action?

    regards, Tine

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Tine,

      DropDown will have OnSelect event that should be good candidate to put in source there. Since the EVENT object contains all the info it may get you entire line information.

      Greetings

      Prashant

  • avatar image
    Former Member
    Feb 24, 2009 at 03:00 PM

    Hi!

    I have now tried this out (and I think I have tried this before). The onSelect event is not triggered before the user choose an element form the Dropdown list. And that is a bit too late since I need the action for generating the dropdown list.

    Pity it did not work.

    regards, tine

    Add comment
    10|10000 characters needed characters exceeded