cancel
Showing results for 
Search instead for 
Did you mean: 

Get element UI property in Event Handler

Former Member
0 Kudos

Hi,

it's possible read inside an action, ONACTIONGO_TO_DETAIL, the property TEXT, of a LinkToAction?

I want to read the property : TEXT of the LinkToAction and use this property like a parameter of the navigation :

WD_THIS->FIRE_TO_DETAIL_PLG( LV_TEXT ).

I have tried in some way, but i have obtained always error of Access Null. For example :

data: lr_linkToaction type ref to IF_WD_VIEW_ELEMENT, "CL_WD_LINK_TO_ACTION,

myView type ref to if_wd_view,

LV_TEXT type WDY_MD_TRANSLATABLE_TEXT.

CALL METHOD MYVIEW->GET_ELEMENT

EXPORTING

ID = 'LTA_COMPCODE'

RECEIVING

ELEMENT = lr_linkToaction

.

OR :

lr_linkToAction ?= myView->get_element( 'LTA_COMPCODE' ).

CALL METHOD LR_LINKTOACTION->GET_TEXT

  • EXPORTING

  • AS_EXTERNAL =

  • CONTEXT_ELEMENT =

  • CONTEXT_NODE_PATH_NAME =

  • TEXT_LENGTH = CO_UNKNOWN_TEXTLEN

RECEIVING

VALUE = LV_TEXT.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Antonello,

You cannot get a refernce to if_wd_view simply by declaring a variable referencing it. You can get a reference to it only through the WDDOMODIFYVIEW method.

What you can do is, bind the 'text' property of your button to an attribute in the context and then simply read that attribute (the caode can be generated using code wizard).

Regards,

Neha

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks, but i feel this so strange....it's a primary quality of the OOP reading and writing property of an object (GET / SET methods ) ... I'll do this by this way ...