Skip to Content
0
Former Member
Mar 29, 2006 at 05:06 PM

leave to screen 0 does not branch to initialization event (ALV)

291 Views

Hi All,

I'm new at this forum thing so be gentle. I have created the standard custom control in a new screen, setup the field catalog and other parameters and when I call the screen and do the :

IF g_custom_container IS INITIAL.

CREATE OBJECT g_custom_container

EXPORTING

container_name = 'ZTMR_EVAL_GRID'.

CREATE OBJECT g_grid

EXPORTING

i_parent = g_custom_container.

CLEAR wa_disvariant.

wa_disvariant-report = sy-repid.

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

is_variant = wa_disvariant

i_save = 'A'

is_layout = wa_layout

CHANGING

it_outtab = detail_tab[]

it_fieldcatalog = itab_fldcat

it_sort = itab_sort.

CREATE OBJECT event_receiver.

SET HANDLER event_receiver->handle_top_of_page FOR g_grid.

ENDIF.

, everything works great. The problem occurs when hit the BACK button in my PAI module, it returns to the line after the CALL SCREEN XXX, ENDFORM, PERFORM output_alv_grid_report and then branches to :

FUNCTION hrpy_process_fire_event in the source code of LHRST1U01 in the main program SAPLHRST1.

It does this instead of branching to the INITIALIZATION event (selection-screen) which is what it's supposed to do?

Any help would be greatly appreciated - Thanks in advance,

Jim