2013 Feb 20 9:34 AM
Hi,
i need some advice for following problem.
I have a alv tree and want to add a node with the method add_node but i get the dump "UC_OBJECTS_NOT_CONVERTIBLE".
Data definition outtab_line:
DATA: BEGIN OF outtab_line,
typ TYPE c LENGTH 3,
vbeln TYPE vbap-vbeln,
posnr TYPE vbap-posnr,
matnr TYPE mara-matnr,
kalnr TYPE ckis-kalnr,
kapos TYPE ckis-posnr,
ukaln TYPE ckis-ukaln,
menge TYPE ckis-menge,
meeht TYPE ckis-meeht,
END OF outtab_line.
______________________________________________________________
...
CALL METHOD tree1->add_node
EXPORTING
i_relat_node_key = p_relat_key
i_relationship = cl_gui_column_tree=>relat_last_child
i_node_text = l_node_text
is_node_layout = ls_node_layout
is_outtab_line = outtab_line
it_item_layout = lt_item_layout
IMPORTING
e_new_node_key = p_node_key.
...
______________________________________________________________
METHOD ADD_NODE.
FIELD-SYMBOLS: <TAB1> TYPE standard TABLE,
<wa> type any.
assign mt_outtab->* to <tab1>.
* insert line in outtab
DATA: L_INDEX TYPE SY-TABIX.
if is_outtab_line is initial.
* create initial line
data l_dref_wa type ref to data.
create data l_dref_wa like line of <tab1>.
assign l_dref_wa->* to <wa>.
l_index = 0.
append <wa> to <Tab1>.
else.
APPEND IS_OUTTAB_LINE TO <TAB1>.
endif.
L_INDEX = SY-TABIX.
* add node to model
CALL METHOD ME->ADD_MODEL_NODE
EXPORTING
I_RELAT_NODE_KEY = I_RELAT_NODE_KEY
I_RELATIONSHIP = I_RELATIONSHIP
IS_NODE_LAYOUT = IS_NODE_LAYOUT
IT_ITEM_LAYOUT = IT_ITEM_LAYOUT
I_NODE_TEXT = I_NODE_TEXT
I_INDEX_OUTTAB = L_INDEX
IMPORTING
E_NEW_NODE_KEY = E_NEW_NODE_KEY.
ENDMETHOD.
______________________________________________________________
I suggest the problem is the field "Menge" of outtab_line with datatyp quan. Any ideas / solutions for this problem?
Thanks a lot.
BG
2013 Feb 21 8:47 AM
Hello,
got the soultion.
The dump occurs by the following line:
____________________________________________
METHOD ADD_NODE.
FIELD-SYMBOLS: <TAB1> TYPE standard TABLE,
<wa> type any.
assign mt_outtab->* to <tab1>.
* insert line in outtab
DATA: L_INDEX TYPE SY-TABIX.
if is_outtab_line is initial.
* create initial line
data l_dref_wa type ref to data.
create data l_dref_wa like line of <tab1>.
assign l_dref_wa->* to <wa>.
l_index = 0.
append <wa> to <Tab1>.
else.
APPEND IS_OUTTAB_LINE TO <TAB1>.
endif.
L_INDEX = SY-TABIX.
...
<TAB1> got assigned from mt_outtab, which is defined before with method set_table_for_first_display parameter it_outtab:
CALL METHOD tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
* i_logo =
* i_background_id =
it_list_commentary = gt_header[]
CHANGING
it_outtab = outtab[] "empty table
it_fieldcatalog = gt_fieldcat_tree[].
For it_outab i had a structure defined, which was not convertible with is_outtab_line from method add_node.
Best regards
GB
2013 Feb 20 9:44 AM
Hello,
Could you please check below links?
<< link dump removed >>
Thanks,
Abhijit
2013 Feb 21 8:47 AM
Hello,
got the soultion.
The dump occurs by the following line:
____________________________________________
METHOD ADD_NODE.
FIELD-SYMBOLS: <TAB1> TYPE standard TABLE,
<wa> type any.
assign mt_outtab->* to <tab1>.
* insert line in outtab
DATA: L_INDEX TYPE SY-TABIX.
if is_outtab_line is initial.
* create initial line
data l_dref_wa type ref to data.
create data l_dref_wa like line of <tab1>.
assign l_dref_wa->* to <wa>.
l_index = 0.
append <wa> to <Tab1>.
else.
APPEND IS_OUTTAB_LINE TO <TAB1>.
endif.
L_INDEX = SY-TABIX.
...
<TAB1> got assigned from mt_outtab, which is defined before with method set_table_for_first_display parameter it_outtab:
CALL METHOD tree1->set_table_for_first_display
EXPORTING
is_hierarchy_header = g_hierarchy_header
* i_logo =
* i_background_id =
it_list_commentary = gt_header[]
CHANGING
it_outtab = outtab[] "empty table
it_fieldcatalog = gt_fieldcat_tree[].
For it_outab i had a structure defined, which was not convertible with is_outtab_line from method add_node.
Best regards
GB