cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic disable of a LinkToAction in a table

matteo_montalto
Contributor
0 Kudos

Hi experts,

I have a (standard) table which has in the first column an hyperlink (LinkToAction). For certain rows of the table, I have to disable that hyperlink.

So far, I tried with the following code in WDDOMODIFYVIEW but I don't understand how to get an instance of CL_WD_LINK_TO_ACTION in order to disable it:

DATA lo_nd_versioning TYPE REF TO if_wd_context_node.

DATA elemset TYPE WDR_CONTEXT_ELEMENT_SET.

DATA ls_element TYPE REF TO IF_WD_CONTEXT_ELEMENT.

*   navigate from <CONTEXT> to <VERSIONING> via lead selection

     lo_nd_versioning = wd_context->path_get_node( path = `COMP_CONTROLLER.VERSIONING` ).

     CALL METHOD LO_ND_VERSIONING->GET_ELEMENTS

*      EXPORTING

*        FROM   =

*        TO     =

       RECEIVING

         SET    = elemset

         .

     LOOP AT elemset INTO ls_element.

* here ELEMSET contains the current row of the table in my loop

     ENDLOOP.

Now, the Hyperlink I see from the Layout tab in se80 is called VERSION_NO; however I can just see the value of it and don't know how to access to the specific LinkToAction element for each row (as I have to manage them separately...  each one should be evaluated ad runtime in order to see if the link should be enabled or not).

Please provide some help on task, suggestions will be appreciated

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Matteo,

You will need to use cell variants to achieve your requirement. You cant set linktoaction enable and disable row wise.

Follow this tutorial for cell variants, its similar to what you want.

http://webdynproabap.wordpress.com/2012/12/04/table-with-cell-variant/

-Manish