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: 

cl_alv_event_data->m_data - Feed Stack Error

former_member1193316
Participant
0 Kudos

Dear SDNers,

I implemented F4 in ALV. After selecting value from F4, user will go to next screen. Again if user went back to the initial screen and trying to select value from F4, double click going to dump.

Here is the code. Please help me

TYPES: BEGIN OF onf4_event_parameters_type.
     TYPES: c_fieldname     TYPE lvc_fname.
     TYPES: cs_row_no       TYPE lvc_s_roid.
     TYPES: cr_event_data   TYPE REF TO cl_alv_event_data.
     TYPES: ct_bad_cells    TYPE lvc_t_modi.
     TYPES: c_display       TYPE char01.
     TYPES: END OF onf4_event_parameters_type.

     DATA: f4_params TYPE onf4_event_parameters_type.


CLEAR:f4_params.
     f4_params-c_fieldname = e_fieldname.
     f4_params-cs_row_no = es_row_no.
     f4_params-cr_event_data = er_event_data.
     f4_params-ct_bad_cells = et_bad_cells.
     f4_params-c_display = e_display.



FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
     DATA: ls_modi TYPE lvc_s_modi,
           ls_f4_itab TYPE f4_itab_type.



     ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
     ls_modi-row_id = f4_params-cs_row_no-row_id.
     ls_modi-fieldname = f4_params-c_fieldname.

     READ TABLE f4_itab INTO ls_f4_itab INDEX es_row_no-row_id.
     ls_modi-value = ls_f4_itab-value.
*    append ls_modi to lt_tab.
     APPEND ls_modi TO <itab>.



first time it is working fine. But next time when i came back to first screen again from second screen, this double click event giving dump.


Please help me.


Regards,

Venkat


1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

Be careful when you describe the error : you've got the error "FREED STACK error" (not feed stack)

It means that you created a reference to a local variable, so the reference is freed when the procedure is left, as the local variable doesn't exist anymore.

12 REPLIES 12

raymond_giuseppi
Active Contributor
0 Kudos

Did you forget the


er_event_data->m_event_handled = gc_true.

at end of the handling method?


Regards,

Raymond

0 Kudos

Dear Raymond,

No, i am using this as well. Still

0 Kudos

Guys,

Any clue i will get?

0 Kudos

Either provide detail of dump (export/attach) or check execution of statements in the method (sy-subrc on ASSIGN and APPEND)

0 Kudos

Dear Raymond,

Here is the code where dump is coming

ASSIGN f4_params-cr_event_data->m_data->* TO <itab>. ( Here sy-subrc getting failed)
     ls_modi-row_id = f4_params-cs_row_no-row_id.
     ls_modi-fieldname = f4_params-c_fieldname.

     READ TABLE f4_itab INTO ls_f4_itab INDEX es_row_no-row_id.
     ls_modi-value = ls_f4_itab-value.
     APPEND ls_modi TO <itab>.


First time it is working as i mentioned above



Once i went to next screen->came to first screen again-> used f4 -> selected value and double clicked.


Now



Here assingig value to field symbol. Where sy-subrc is 4 and giving dump saying  Field symbol has not yet been assigned.


Hope it is clear.Please let me know if you need any more information and help me.

0 Kudos

Here i got a clue that when i called another screen and going back to intial screen, i m clearing the container.

Here i wrote code like below to clear container.

IF g_custom_container IS NOT INITIAL.
     CALL METHOD g_custom_container->free.
     CLEAR:g_custom_container.
     FREE:g_custom_container.
   ENDIF.



Is it because of clearing my container, i am facing this issue. If yes, please let me know

0 Kudos

Can I get any clue?

0 Kudos

If you free the parent container, you may be required to free also the ALV grid inside?

0 Kudos

Dear Raymond,

I am clearing both parent container and grid as well. Please find below.

    CALL METHOD g_grid->refresh_table_display.
     CLEAR: g_grid.
     FREE : g_grid.
     CALL METHOD g_custom_container->free.
     CLEAR:g_custom_container.
     FREE:g_custom_container.



Still same error.

Sandra_Rossi
Active Contributor
0 Kudos

Be careful when you describe the error : you've got the error "FREED STACK error" (not feed stack)

It means that you created a reference to a local variable, so the reference is freed when the procedure is left, as the local variable doesn't exist anymore.

0 Kudos

Sorry. it is FREED STACK.

Please let me know the solution to clear this error

Regards

Venkat

0 Kudos

Thank you Sandra,

Issue solved. I re-declared variables globally and issue got solved..

Regards,

Venkat