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

Dump while creating tree

Former Member
0 Likes
975

Hi All,

I am getting a dump while creating tree. I have written the following code (the root node has already been created) :-

REFRESH lit_node_table.

CLEAR : lwa_node, lfd_nodekey.

lwa_node-node_key = 'Level2'."Child node - Second level

lwa_node-relatkey = 'Level1'.

lwa_node-relatship = cl_gui_simple_tree=>relat_last_child.

lwa_node-text = 'Assembly group'.

lwa_node-n_image = c_icon_l2.

lwa_node-exp_image = c_icon_l2.

APPEND lwa_node TO lit_node_table.

lwa_node-node_key = 'Level3'."Child node - Third level

lwa_node-relatkey = 'Level2'.

lwa_node-relatship = cl_gui_simple_tree=>relat_last_child.

lwa_node-text = 'Reference Operation Set'.

lwa_node-n_image = c_icon_l3.

lwa_node-exp_image = c_icon_l3.

APPEND lwa_node TO lit_node_table.

CALL METHOD grc_tree->add_nodes

EXPORTING

table_structure_name = 'ABDEMONODE'

node_table = lit_node_table.

Where am I going wrong ?

Regards,

Ashish

4 REPLIES 4
Read only

Former Member
0 Likes
641

Hi can you post the dump that you are getting. That can be a bit meaningful.

Read only

0 Likes
641

Hi,

I dont get a dump when I create nodes at 2nd level. But, I get the dump only when I add 3rd level nodes

From the dump I could make out it has got something to do with flush(). But, I am not able to make out the exact root cause of the problem.

This is the dump I am getting:-

Short text of error message:

Control Framework : Error processing control

Long text of error message:

Diagnosis

An error occurred when the system tried to process the commands

from the Automation Queue on the presentation server.

There are several possible reasons for this:

- The installation of the SAP GUI on the presentation server is

faulty or obsolete.

- There is an error in the application program

- There is an error in the SAPGUI or an integrated control

Procedure

1. Make sure that you have imported the appropriate Support

Package, the current kernel, and GUI patch for the release of your

system

2. Check whether the error occurs locally on one or a few PCs, or

generally on all PCs. Note whether the error only occurs for some

users, for example because of a specific Customizing setting.

If it only occurs locally, this suggests an installation problem

with the PC. Check the installation; if necessary, reinstall the

software. In the dump, search for the SY-MSGLI field, since it may

point to the cause of the error.

3. Activate the Automation Trace (in accordance with SAP Note

158985).

4.Start the transaction and continue until the screen immediately

before the dump.

5. From the System -> Utilities menu, choose Autom. Queue,

Synchronous Processing.

The status bar of the GUI displays the text:

"Automation synchron flush mode on"

6. If you now proceed with the application, the short dump will

display the ABAP call that caused the error; the Automation Trace

will contain the error on the presentation server.

7. If necessary, load the short dump and trace files on to

sapservX, so that SAP can analyze them.

Technical information about the message:

Message class....... "CNDP"

Number.............. 006

Variable 1.......... " "

Variable 2.......... " "

Variable 3.......... " "

Variable 4.......... " "

Regards,

Ashish

Read only

0 Likes
641

Did you try the procedure suggested by the dump?

"Automation trace" and "Automation synchron flush mode on"

The trace can be long and is not easy to read, but when you search for "Error" you find messages like:

<234=Error: AssignProperty2: COleDispatchException 0x800A1459() Relative node for insert not found

when e.g. the parent node does not exist.

Read only

uwe_schieferstein
Active Contributor
0 Likes
641

Hello Ashish

Given the method ADD_NODES I assume that you are using CL_GUI_SIMPLE_TREE.

Looking at sample report SAPSIMPLE_TREE_CONTROL_DEMO you will see that this standard program uses structure MTREESNODE. Thus, I guess you are using the wrong structure to define the nodes itab.


...
  PERFORM BUILD_NODE_TABLE USING NODE_TABLE.

* node_table_structure_name     = 'MTREESNODE'
*   A programmer using the tree control must create a structure in the
*   dictionary. This structure must include the structure TREEV_NODE
*   and must contain a character field with the name 'TEXT'.

  CALL METHOD G_TREE->ADD_NODES
    EXPORTING
      TABLE_STRUCTURE_NAME = 'MTREESNODE'
      NODE_TABLE           = NODE_TABLE
    EXCEPTIONS
      FAILED                         = 1
      ERROR_IN_NODE_TABLE            = 2
      DP_ERROR                       = 3
      TABLE_STRUCTURE_NAME_NOT_FOUND = 4
      OTHERS                         = 5.
  IF SY-SUBRC <> 0.
    MESSAGE A000.
  ENDIF.

ENDFORM.                    " CREATE_AND_INIT_TREE

Regards

Uwe