‎2007 May 22 9:42 AM
Hi experts,
I'm using a Tree Control and sometimes this error appears (I use Automation Trace) :
<309=Automation(Error): *****************************ERROR OCCURED IN MODULE: [SAP Table Tree Control ]************************************************************************************************************
<309=Automation(Error): PROGRAM_ID |MODULE_NAME |METHOD_NAME |ERROR DESCRIPTION |VERSION |GUI VERSION |MODULE_PATH |
<309=Automation(Error): *******************************************************************************************************************************************************************************************
<309=Automation(Error): SAP.TableTreeControl.1 |SAP Table Tree Control |AddItemTable |Relative node for insert not found |6405.5.23.308 |6405.5.23.1024 |c:sappcSapGuiWDTTREE.OCX |
<309=Automation(Error): *******************************************************************************************************************************************************************************************
<309=Automation(Error):
<309=Automation(Error): Exception fire by :WDTTREE
<309=Automation(Error): Exception info:Relative node for insert not found
<309=Automation(Error): Exception code:0
<309=Automation(Error): Error occured at Verb : AddItemTable
<309=Automation(Error): Object: 15
<309=Automation(Error): SAPAWRFC leaving RfcFlushOle with RfcRaise(CALL_METHOD_FAILED)Can you help ?
Thanks for support.
David
‎2007 May 22 10:18 AM
Hello,
It only means you want to update the items of one node, but this node is not in your tree...
Could you please post your code?
‎2007 May 22 1:39 PM
Hi Walter,
thanks for the quick answer ...
Here is the code for building the Tree :
LOOP AT tab_out INTO wa_out.
MOVE sy-tabix TO my_line.
MOVE sy-tabix TO my_counter.
IF wa_out-stufe < bk_stufe.
READ TABLE tab_tabix INTO my_parent INDEX wa_out-stufe.
MOVE wa_out-stufe TO bk_stufe.
ENDIF.
IF wa_out-isbgru = 'X'.
MOVE my_line TO my_node.
MOVE wa_out-stufe TO wa_tabix.
ADD 1 TO wa_tabix.
MODIFY tab_tabix FROM my_node INDEX wa_tabix.
MOVE wa_tabix TO bk_stufe.
node-node_key = my_node. "#EC NOTEXT
node-relatkey = my_parent.
node-relatship = cl_gui_column_tree=>relat_last_child.
node-hidden = ' '.
node-disabled = ' '.
node-isfolder = 'X'.
CLEAR node-n_image.
CLEAR node-exp_image.
node-expander = 'X'.
APPEND node TO node_table.
my_parent = my_node.
my_line = my_node.
ELSE.
CLEAR node.
node-node_key = my_line. "#EC NOTEXT
node-relatkey = my_parent.
node-relatship = cl_gui_column_tree=>relat_last_child.
IF wa_out-txt = 'X'.
node-n_image = icon_text_ina.
ELSE.
node-n_image = icon_ppe_vnode.
ENDIF.
APPEND node TO node_table.
ENDIF.
CLEAR item.
item-node_key = my_line.
item-item_name = 'stufe'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_out-stufe.
APPEND item TO item_table.
CLEAR item.
item-node_key = my_line.
item-item_name = 'posnr'. " Item of Column 'Column1'
item-class = cl_gui_column_tree=>item_class_text. " Text Item
item-text = wa_out-item_no.
APPEND item TO item_table.
CLEAR item.
item-node_key = my_line.
item-item_name = 'change'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_out-change_no.
APPEND item TO item_table.
CLEAR item.
item-node_key = my_line.
item-item_name = 'kstand'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_out-mstae.
APPEND item TO item_table.
IF wa_out-txt = 'X'.
CLEAR item.
item-node_key = my_line.
item-item_name = 'column1'. " Item of Column 'Column1'
item-class = cl_gui_column_tree=>item_class_text. " Text Item
item-text = wa_out-txt_line.
APPEND item TO item_table.
ELSE.
CLEAR item.
item-node_key = my_line.
item-item_name = 'column1'. " Item of Column 'Column1'
item-class = cl_gui_column_tree=>item_class_text. " Text Item
item-text = wa_out-component.
APPEND item TO item_table.
CLEAR item.
item-node_key = my_line.
item-item_name = 'menge'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_out-comp_qty.
APPEND item TO item_table.
CLEAR item.
item-node_key = my_line.
item-item_name = 'meins'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_out-comp_unit.
APPEND item TO item_table.
CLEAR item.
item-node_key = my_line.
item-item_name = 'txt'.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_out-item_text1.
APPEND item TO item_table.
ENDIF.
ENDLOOP.
CALL METHOD wa_tree->add_nodes_and_items
EXPORTING
node_table = node_table
item_table = item_table
item_table_structure_name = 'MTREEITM'
EXCEPTIONS
failed = 1
cntl_system_error = 3
error_in_tables = 4
dp_error = 5
table_structure_name_not_found = 6.
IF sy-subrc <> 0.
WRITE:/ 'error'.
ENDIF.
ENDLOOP.
‎2007 May 22 4:33 PM
Hi David,
Without the content of tab_out and tabix, I can't really understand how it works...
Does it happens only certain time?
Or Could you check when it dumps the content of "node-relatkey" in your node_table and see why it contains an invalid key...
Regards,
Walter
‎2007 May 23 9:27 AM
Hi Walter,
Yes it appears only certain time, don't know why ...
In this case, I have a Short Dump "MESSAGE_TYPE_X" ...
Greetz,
David
‎2007 Jul 11 8:00 AM
No I've got the same problem in another program ... Very strange !