Skip to Content
avatar image
Former Member

How to get click value or index of the LINK_TO_ACTION element?

I insert a LINK_TO_ACTION element in the table container.

When user click the field,I tried to get the click value but I was failed.(WDEVENT does not work)

Could you give me some advice or sample code?

Thank you very much....

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 28, 2010 at 02:26 AM

    It should give you the element of the table row that the link to action was found in. I've certainly done this in the past.

    In your action you can get the element of the table - just click on the little square box in the top toolbar in you action tab of the view. This then should allow you to explicitly add the element to the parameters of the action method.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 28, 2010 at 03:12 AM

    For your reference

    METHOD onactionshow_sc .

    CONSTANTS:lc_context_element TYPE string VALUE 'CONTEXT_ELEMENT'.

    DATA lo_el_item_show TYPE REF TO if_wd_context_element.

    DATA ls_item_show TYPE wd_this->element_item_show.

    DATA lv_zsc TYPE wd_this->element_item_show-zsc.

    • @TODO handle non existant child

    • IF lo_nd_item_show IS INITIAL.

    • ENDIF.

    • get element via lead selection

    CALL METHOD wdevent->get_context_element


    name = lc_context_element


    value = lo_el_item_show.

    • alternative access via index

    • lo_el_item_show = lo_nd_item_show->get_element( index = 1 ).

    • @TODO handle not set lead selection

    IF lo_el_item_show IS INITIAL.



    • get single attribute



    name = `ZSC`


    value = lv_zsc ).


    Add comment
    10|10000 characters needed characters exceeded