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: 

Runtime error from null value

Former Member
0 Kudos
1,039

I have a request to create a Function Module that will be assigned to an Action Box, which when executed will copy long text for Quality Notification tasks. I have the module created and working, but after my code is executed a runtime error happens due to a null value being passed to a method in the SAP program QM07_UPDATE_ACTIONBOX. It looks to me like it is trying to perform some kind of cleanup tasks, and is trying to delete a node tree that does not exist. My code did nothing with any kind of node tree, so I am not sure how to avoid this runtime error. My code works as desired, except for this error that occurs after my code is processed. Any assistance would be greatly appreciated! Below are more details from the error received...

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 "QM07_UPDATE_ACTIONBOX" "(FUNCTION)", 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 (variable: "TREE_ACTIONBOX"). 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.

Information on where terminated

Termination occurred in the ABAP program "SAPLQM07" - in "QM07_UPDATE_ACTIONBOX". The main program was "SAPLIQS0 ".

In the source code you have the termination point in line 39 of the (Include) program "LQM07U12". The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in procedure "QM07_UPDATE_ACTIONBOX" "(FUNCTION)", but it was neither handled locally nor declared in the RAISING clause of its signature.

The procedure is in program "SAPLQM07 "; its source code begins in line 1 of the (Include program "LQM07U12 ".

28 * bei Tree werden Knoten und Items gelöscht bei Table Control wird

29 * nur g_control_tab neu aufgebaut

30 if g_tree = c_x.

31 *---- Löschen der bestehenden Knoten und Items

32

33 * Tabelle der Knotenschlüssel erzeugen

34 loop at g_node_tab into l_node.

35 append l_node-node_key to l_dnodes_tab.

36 endloop.

37

38 * Items

>>>>> call method tree_actionbox->delete_all_items_of_nodes

40 EXPORTING

41 node_key_table = l_dnodes_tab

42 EXCEPTIONS

43 failed = 1

44 cntl_system_error = 2

45 error_in_node_key_table = 3

46 dp_error = 4.

7 REPLIES 7

andrs_sarcevic
Contributor
0 Kudos
563

It seems to be standard code... Have you searched for OSS notes?

0 Kudos
563

Yes, I have searched the notes. I used the keywords suggested in the dump...

If the error occures in a non-modified SAP program, you may be able to find an interim solution in an SAP Note.

If you have access to SAP Notes, carry out a search with the following keywords:

"OBJECTS_OBJREF_NOT_ASSIGNED" "CX_SY_REF_IS_INITIAL"

"SAPLQM07" or "LQM07U12"

"QM07_UPDATE_ACTIONBOX"

0 Kudos
563

Have you received an answer yet?  How did you resolve.  I am having exactly the same issue.

0 Kudos
563

This message was moderated.

viveka_schwartz3
Explorer
0 Kudos
563

I have exactly the same issue so many years after. Could please SAP provide an answer to this?

There is an OSS note (

2551661 - QM02 - DUMP OBJECTS_OBJREF_NOT_ASSIGNED occurs)

describing a similar problem with QM02.

According to the OSS Note it is not allowed to use standard FM STATUS_BUFFER_REFRESH. However, this standard function module is used by SAP themselves in for example BAPI_CONTRACT_GETDETAIL .

So it is not possible to skip the execution of STATUS_BUFFER_REFRESH if it´s called by a (Read) BAPI, which I need.

Any other OSS notes were not found with the key words.

0 Kudos
563

You need to open an incident at support.sap.com

viveka_schwartz3
Explorer
0 Kudos
563

I tried to deactivate the call to BAPI_CONTRACT_GETDETAIL , but it did not solve the problem. The program still abends.