You are on page 1of 3

method display_data.

call function 'ZZ_CALL_SCREEN'


exporting
screen_number = screen_number
program = program
title_text = title_text
i_gridtitle = i_gridtitle
i_zebra = i_zebra
i_edit = i_edit
i_opt = i_opt
i_object = z_object
changing
e_ucomm = e_ucomm
it_fldcat = it_fldcat
gt_outtab = gt_outtab.
e_ucomm = sy-ucomm.
endmethod.
* ...

function zz_call_screen .
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" REFERENCE(SCREEN_NUMBER) TYPE SY-DYNNR
*" REFERENCE(PROGRAM) TYPE SY-REPID
*" REFERENCE(TITLE_TEXT) TYPE CHAR50
*" REFERENCE(I_GRIDTITLE) TYPE LVC_TITLE
*" REFERENCE(I_ZEBRA) TYPE LVC_ZEBRA
*" REFERENCE(I_EDIT) TYPE LVC_EDIT
*" REFERENCE(I_OPT) TYPE LVC_CWO
*" REFERENCE(I_OBJECT) TYPE REF TO ZZHR_ALV_GRID
*" CHANGING
*" REFERENCE(E_UCOMM) TYPE SY-UCOMM
*" REFERENCE(IT_FLDCAT) TYPE LVC_T_FCAT
*" REFERENCE(GT_OUTTAB) TYPE STANDARD TABLE
*"----------------------------------------------------------------------
*
assign gt_outtab to <dyn_table>.
move title_text to screen_title.
assign i_object to <zogzilla>.
export <dyn_table> to memory id 'dawggs'.
export i_gridtitle to memory id 'i_gridtitle'.
export i_edit to memory id 'i_edit'.
export i_zebra to memory id 'i_zebra'.
export i_opt to memory id '�_opt'.
export it_fldcat to memory id 'it_fldcat'.
case screen_number.
when '100'.
call screen 100.
when '200'.
call screen 200.
endcase.

endfunction.
process before output.
module status_0100.
*
process after input.
module user_command_0100.

rocess before output.


module status_0200.
*
process after input.
module user_command_0200.

*----------------------------------------------------------------------*
* INCLUDE LZHR_MISCO01 *
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module status_0100 output.
import <dyn_table> from memory id 'dawggs'.
import i_gridtitle from memory id 'i_gridtitle'.
import i_edit from memory id 'i_edit'.
import i_opt from memory id '�_opt'.
import it_fldcat from memory id 'it_fldcat'.
i_object = <zogzilla>.
call method i_object->display_grid
exporting
i_gridtitle = i_gridtitle
i_edit = i_edit
i_zebra = i_zebra
i_opt = i_opt
g_fldcat = it_fldcat
g_outtab = <dyn_table>
changing
it_fldcat = it_fldcat
gt_outtab = <dyn_table>.

set pf-status '001'.


set titlebar '000' with screen_title.

endmodule. " STATUS_0100 OUTPUT


*&---------------------------------------------------------------------*
*& Module STATUS_0200 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module status_0200 output.
import <dyn_table> from memory id 'dawggs'.
import i_gridtitle from memory id 'i_gridtitle'.
import i_edit from memory id 'i_edit'.
import i_opt from memory id '�_opt'.
import it_fldcat from memory id 'it_fldcat'.
i_object = <zogzilla>.
call method i_object->display_grid
exporting
i_gridtitle = i_gridtitle
i_edit = i_edit
i_zebra = i_zebra
i_opt = i_opt
g_fldcat = it_fldcat
g_outtab = <dyn_table>
changing
it_fldcat = it_fldcat
gt_outtab = <dyn_table>.

set pf-status '001'.


set titlebar '000' with screen_title.

endmodule. " STATUS_0200 OUTPUT

*----------------------------------------------------------------------*
* INCLUDE LZHR_MISCI01 *
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module user_command_0100 input.
case sy-ucomm.
when 'BACK'.
leave to screen 0.
when 'EXIT'.
leave program.
when 'RETURN'.
leave program.
when others.
endcase.

endmodule. " USER_COMMAND_0100 INPUT


*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0200 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module user_command_0200 input.
case sy-ucomm.
when 'BACK'.
leave to screen 0.
when 'EXIT'.
leave program.
when 'RETURN'.
leave program.
when others.
endcase.
endmodule. " USER_COMMAND_0200 INPUT

You might also like