on 2023 Apr 12 9:27 PM
I have created a function module and assigned it to an action box (IW22), The function module updates the partner (vendor) in the notification via BAPI_ALM_NOTIF_DATA_MODIFY. There is no commit in the function module, The commit should take place when the notification is saved in IW22.
After the function module has been executed successfully a runtime error happens (Access using a 'ZERO' object reference is not possible) when the control is given back to the calling program due to a null value being passed to a method in the SAP program QM07_UPDATE_ACTIONBOX.
It looks 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 when running the function module stand-alone via SE37 (except for that the update is not stored in the database), So except for this error that occurs after my function module was processed the code in the FM itself seem to be correct.
Any assistance would be greatly appreciated. Below are more details from the error received:
Category ABAP programming error
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED
Except. CX_SY_REF_IS_INITIAL
ABAP Program SAPLQM07
Application Component QM-QN
Date and Time 2023.04.12 21:49:24
Short Text:
Access using a 'ZERO' object reference is not possible.
What happened?
Error in the ABAP application program.
The current ABAP program "SAPLQM07" had to be terminated because it found a
statement that could not be executed.
Error analysis
An exception has occurred which is explained in more detail below. The
exception is assigned to class 'CX_SY_REF_IS_INITIAL' and 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 this
exception, the current program was terminated.
The reason for the exception is:
You are trying to access a component with a 'ZERO' object reference
(points to 'nothing'). Variable: "TREE_ACTIONBOX".
An object reference must point to an object (an instance of a class)
before it can be used to access a component. The reference has either
never been set, or it was set to 'ZERO' with a CLEAR statement.
Missing RAISING clause in interface
Program SAPLQM07
Include LQM07U12
Row 1
Module Type (FUNCTION)
Module Name QM07_UPDATE_ACTIONBOX
Trigger Location of Exception
Program SAPLQM07
Include LQM07U12
Row 39
Module Type (FUNCTION)
Module Name QM07_UPDATE_ACTIONBOX
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 ".
Source Code Extract
Line SourceCde
9 *" TABLES
10 *" TI_QMSM STRUCTURE QMSM
11 *" TI_QMMA STRUCTURE QMMA
12 *"----------------------------------------------------------------------
13
14 data: l_dnodes_tab type treev_nks.
15 data: l_node type qmnode.
16 data: l_lines like sy-tfill.
17
18 clear g_viqmel.
19 clear g_qmsm. refresh g_qmsm.
20 clear g_qmma. refresh g_qmma.
21 clear g_manum.
22
23 move i_viqmel to g_viqmel.
24 move ti_qmsm[] to g_qmsm[].
25 move ti_qmma[] to g_qmma[].
26 move i_manum to g_manum.
27
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.
47
48 * Knoten
Active Calls/Events
No. Ty. Program Include Line
Name
8 FUNCTION SAPLQM07 LQM07U12 39
QM07_UPDATE_ACTIONBOX
7 FORM SAPLIQS0 LIQS0F75 658
FUNKTION_ACTIONBOX_F75
6 FORM SAPLIQS0 LIQS0F00 5419
FCODE_ACTI_F00
5 FORM SAPLV00F LV00FF0F 92
FCODE_BEARBEITEN
4 FUNCTION SAPLV00F LV00FU02 44
SCREEN_SEQUENCE_CONTROL
3 FORM SAPLIQS0 LIQS0F20 413
SCREEN_SEQUENCE_F20
2 FORM SAPLIQS0 LIQS0F20 357
ABLAUF_F20
1 MODULE (PAI) SAPLIQS0 LIQS0I00 125
ABLAUF_I00
Hello Viveka,
Please check SAP KB- 2551661 - QM02 - DUMP OBJECTS_OBJREF_NOT_ASSIGNED
Please update if it works
Best Regards,
Milind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Milind,
I have tested with the following and deactivated the STATUS_BUFFER_REFRESH statement (called by a read BAPI..) , but it still does not work.
Set a breakpoint at the statements 'COMMIT', 'COMMIT WORK' and 'COMMIT WORK AND WAIT' and at the function module STATUS_BUFFER_REFRESH .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to target someone, if this person has posted an Answer, use the button COMMENT, if this person is the Original Poster of the question he/she will be automatically informed, otherwise copy/paste their hyperlinked name so that the person receives a warning (NB: @ doesn't work/but typing this character will suggest hyperlinked names).
User | Count |
---|---|
87 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.