Skip to Content
author's profile photo Former Member
Former Member

Get element UI property in Event Handler

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 03:53 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 09:16 AM

    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 ...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.