Skip to Content
author's profile photo
Former Member

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 comment
10|10000 characters needed characters exceeded

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 comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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
    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 comment
    10|10000 characters needed characters exceeded