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

runtime error while i add a node in ALV Tree in oops

Former Member
0 Likes
608

i am adding a node to alv tree using oop am passing a work area and when i execute it is going for a dump and it says UC_OBJECTS_NOT_CONVERTIBLE

and the below where it is bold and italic it is where the dump is occuring

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.

2 REPLIES 2
Read only

0 Likes
506

Hi,

look at your previous call of method: set_table_for_first_display.

There you defined a parameter for it_outtab, which is also used in method add_node:

...

assign mt_outtab->* to <tab1>.

...

When you define it_outtab of method set_table_for_first_display and is_outtab_line of method add_node the same way, the problem should be solved.

Best regards,

BG

Read only

Former Member
0 Likes
506