Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Access via 'NULL' object reference not possible

Former Member
0 Likes
603

Hi Experts.

My basic requirement is, Need to download data into one excel sheet with multiple worksheets(15 worksheets) from different internal tables. I wrote a program using interfaces and methods. Now the problem is, one time it is working fine and after some time it is getting dump. The dump information is 'Access via 'NULL' object reference not possible.'

Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
     caught in
    procedure "ADD_SHEET" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component.
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.

I searched in SCN forum, but I didn't get any answer. What is this error? How can I get rid of this error?

Please help me....

Thanks

Ravi.

2 REPLIES 2
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
541

Hello Ravi,

Posting the code where you get the short dump will be helpful.

But from the ST22 analysis you can get the fact that you have not created an instance of the class You have missed the CREATE OBJECT <class_name> statement before calling the instance method.

BR,

Suhas

Read only

Former Member
0 Likes
541

Thanks Suhas for reply.

But this program is already executed successfully in a week back. Now, it is going short dump. Me and User bit surprised on this.

I am fully worried about this...please help me on this. Why it is going to dump. Same code, no one can change this code. This is user high priority object.

Please help me.

Thanks

Ravi.