‎2006 Sep 07 10:30 AM
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.
‎2006 Sep 07 10:35 AM
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
‎2006 Sep 07 10:35 AM
Hi,
The object you had used in the program should be declared as :
data : OBJ TYPE REF TO CL_GUI_ALV_GRID_DISPLAY.
Rgds
‎2006 Sep 07 12:05 PM
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.