Skip to Content

Access via null obj ref not possible error

Hi

I am using an assistance class and have specified it in the component...

i am getting the error Access via null obj ref not possible at following point in the code..

temp = wd_assist->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( key = '001' ).

i do not think we need to instantiate a assistance class ( or am i missing something ?/ )

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 04, 2011 at 11:31 AM

    do you have a text element created in your assistance class with key '001'?

    Regards,

    Ashish Shah

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Tarang Shah

      Hi,

      After reading all these posts and i have done a small test , it is working for me as the other posts already confirmed. I am not sure why it is not working for you the way you described and it is working for all others.

      I hope that you are not executing this code from used component->view referring the WD_ASSIST where in the wd_assist reference is not passed.

      moreover to make sure that the error is from this code you can code a if else construct.

      if wd_assist is bound.

      " get the text element.

      endif.

      If the above code is working then i suspect that the text element is not active .

      Success.

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2011 at 08:27 AM

    Hi ,

    Try calling the assistence class method as

    temp = wd_assist->GET_TEXT( key = '001' ).

    Thanks,

    Aditya.

    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.