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

OBJECTS_OBJREF_NOT_ASSIGNED error

Former Member
0 Likes
700

Hello All,

I am trying to run a custom BAPI program as a background job through the transaction sm36 and se38.The status of the job becomes "Cancelled" within 1 sec and it says there is an Object null reference.

If anyone has come across a similar error before,please be kind enough to revert with the solution.

Thank you.

Regards,

Gaurav.

3 REPLIES 3
Read only

Former Member
0 Likes
489

I think the program has tried to accept a component using 'NULL' object referance.

something like this:

data: o_obj type ref to <class>.

create object o_obj.

Regards,

ravi

Read only

Former Member
0 Likes
489

Hi,

The object you had used in the program should be declared as :

data : OBJ TYPE REF TO CL_GUI_ALV_GRID_DISPLAY.

Rgds

Read only

0 Likes
489

Hello,

Thank you for your replies.

The error in the dump is as follows :

The current ABAP program "SAPLCNDP" had to be terminated because one of the

statements could not be executed.

Error Analysis :

Attempt to access a component using 'NULL' object reference (points

to nothing).

An object reference must point to an object (an instance of a class)

before you can use it to access components (variable: " ").

Either the reference has not yet been set, or it has been reset to

'NULL' by a CLEAR statement.

As this is a standard code I cannot make any changes to the code.

What parameters do we need to pass when running a program in background ? Is there any special addition I need to make to the code for executing the code in background ?

Regards,

Gaurav.