Application Development 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: 

mt_outtab error in ALV tree node expantion

Karan_Chopra_
Active Participant
0 Kudos

I ahve made tree ALC n get dump in the follwing code when I expand any node

ASSIGN mt_outtab->* TO <tab1>.
  " assign local copy of initial line of <tab1> to <wa>.
  CREATE DATA l_dref_wa LIKE LINE OF <tab1>.
  ASSIGN l_dref_wa->* TO <wa>.

this is because mt_outtab->* does no have values which is my table

dont know how its freed on expanding the node

I made a same prog from a system program n thats working fine but i cannot get the diffrence???

plz help

5 REPLIES 5

Karan_Chopra_
Active Participant
0 Kudos

plzzzzz helpppp

Edited by: Karan Chopra on Jul 1, 2010 6:39 PM

0 Kudos

hi,

dinamic table create is like this, how can you create your mt_outtab->* table;

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = lt

IMPORTING

ep_table = <fs_data>

EXCEPTIONS

generate_subpool_dir_full = 1

OTHERS = 2.

IF sy-subrc <> 0.

ENDIF.

*----


Assign Dyn Table To Field Sumbol

ASSIGN <fs_data>->* TO <tab1>.

CREATE DATA l_dref_wa LIKE LINE OF <tab1>.

ASSIGN l_dref_wa->* TO <wa>.

Karan_Chopra_
Active Participant
0 Kudos

this is system code not mine

How to go for it

this mt_outtab has free memory when ever I all some event for which method is in class definition

any one facing this problem

coz i came to know this is very common problem in tree ALV

Please help

Former Member
0 Kudos

Check if Internal table is empty before you pass the value to the ALV tree FM / Method.

This shall avoid the dump.

Former Member
0 Kudos

I had the same problem. The code dumps when I tried to expand a node of the ALV tree.

Solution: You have to assign a GLOBAL internal table when using set_table_for_first_display.

CALL METHOD tree1->set_table_for_first_display

EXPORTING

it_list_commentary = lt_list_commentary

is_hierarchy_header = l_hierhdr

CHANGING

it_outtab = gt_output_init

it_fieldcatalog = gt_fieldcatalog.

if gt_output_init is local the code dumps.

if gt_output_init is global it works fine.