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 Kudos
337

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
Read only

Former Member
0 Kudos
303

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
Read only

amit_khare
Active Contributor
0 Kudos
303

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

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

Read only

Former Member
0 Kudos
304

Hi,

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

so that we can avoid dump.

Thanks!

Read only

0 Kudos
303

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

Read only

0 Kudos
303
if not go_application is initial
Read only

0 Kudos
303

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

IF NOT go_application->material IS INITIAL.

Read only

matt
Active Contributor
0 Kudos
303

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

matt

Read only

Former Member
0 Kudos
303

>

> 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 ????

Read only

Former Member
0 Kudos
303

>

> 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

Read only

matt
Active Contributor
0 Kudos
303

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