Skip to Content
0
Apr 12, 2013 at 01:17 PM

Dynamic disable of a LinkToAction in a table

46 Views

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 😉