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

mt_outtab error in ALV tree node expantion

Karan_Chopra_
Active Participant
0 Likes
2,485

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

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

6 REPLIES 6
Read only

Karan_Chopra_
Active Participant
0 Likes
2,105

plzzzzz helpppp

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

Read only

0 Likes
2,105

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>.

Read only

Karan_Chopra_
Active Participant
0 Likes
2,105

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

Read only

Former Member
0 Likes
2,105

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

This shall avoid the dump.

Read only

Former Member
2,105

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.

Read only

0 Likes
1,960

Thank you so much! 

I was having the dump below, for a normal cl_gui_alv_grid->set_table_for_first_display, that I was calling inside a class from SE24 that I've created. The reason for the dump was excatly what you mentioned: My table was local to the method, and I had to change it to Global inside the class, in order to stop the dump. I don't understand why, but it worked!

The dump was:

GETWA_NOT_ASSIGNED
SAPLSLVC
BC-SRV-ALV

 

Field symbol has not yet been assigned.

Error in the ABAP Application Program

 

The current ABAP program "SAPLSLVC" had to be terminated because it has
come across a statement that unfortunately cannot be executed.

 

You attempted to access an unassigned field symbol
(data segment "-1").

 

"GETWA_NOT_ASSIGNED" " "
"SAPLSLVC" or "LSLVCU26"
"LVC_FILL_DATA_TABLE"

function lvc_fill_data_table .

assign mt_outtab->* to <tab1>.

mt_outtab freed stack