Application Development 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: 

Access via 'NULL' object reference not possible.

Former Member
0 Kudos
166

Hi,

I get the message: Access via 'NULL' object reference not possible.

IF NOT go_application->material->data-mara-matnr IS INITIAL.

.............

ENDIF.

How can I prevent this dump.

You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: " ").
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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
132

Hi,

Check the initiality ( if that objec is not iniital) of that object before assinging to antther...

so that we can avoid dump.

Thanks!

9 REPLIES 9

amit_khare
Active Contributor
0 Kudos
132

1. As adviced earlier, use SEARCH before posting the query.

2. Post the query in right forum. this should go under ABAP OBJECT.

Former Member
0 Kudos
133

Hi,

Check the initiality ( if that objec is not iniital) of that object before assinging to antther...

so that we can avoid dump.

Thanks!

0 Kudos
132

yes I know but how ??????

this didn't work.

IF NOT go_application->material->data-mara-matnr IS INITIAL.

Amit Khare seems to be very experienced, maybe he has the answer for my question.

Instead to say all over the time SEARCH

0 Kudos
132
if not go_application is initial

0 Kudos
132

go_application is always not initial but I have solved the prbl.

IF NOT go_application->material IS INITIAL.

matt
Active Contributor
0 Kudos
132

Please post in the correct forum. I'm getting fed up of moving your posts.

matt

Former Member
0 Kudos
132

>

> Please post in the correct forum. I'm getting fed up of moving your posts.

>

> matt

post in the correct forum ???????

Where else in the the world should this question be posted ????

Former Member
0 Kudos
132

>

> post in the correct forum ???????

> Where else in the the world should this question be posted ????

Well, this appears to have been moved. Where did you originally post it?

Rob

matt
Active Contributor
0 Kudos
132

It was originally posted in general. I moved it. I was tempted to post it in "reject"...