report zsalv_004 .
data gt_itab type table of sflight.
data gt_itab2 type table of mara.
data g_flg type c.
data gr_table type ref to cl_salv_table.
data gr_table2 type ref to cl_salv_table.
data gr_columns type ref to cl_salv_columns_table.
data gr_column type ref to cl_salv_column_table.
data gr_functions type ref to cl_salv_functions_list.
data gr_container type ref to cl_gui_custom_container.
data gr_container2 type ref to cl_gui_custom_container.
data ok_code type syucomm.
select * from sflight into table gt_itab
up to 25 rows.
select * from mara into table gt_itab2
up to 25 rows.
call screen 100.
*&---------------------------------------------------------------------*
*& Module 0100_PBO OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module 0100_pbo output.
set pf-status '0100'.
* GR_TABLE->refresh( ).
cl_gui_cfw=>flush( ).
clear : gr_container, gr_table.
free : gr_container,gr_table.
if g_flg is initial.
*1. 컨테이너 생성
create object gr_container
exporting
container_name = 'CONTAINER'.
else.
*1. 컨테이너 생성
create object gr_container
exporting
container_name = 'CONTAINER'.
endif.
*2. ALV 테이블 및 데이터 전달
if g_flg is initial.
cl_salv_table=>factory(
exporting
r_container = gr_container
container_name = 'CONTAINER'
importing
r_salv_table = gr_table
changing
t_table = gt_itab ).
else.
cl_salv_table=>factory(
exporting
r_container = gr_container
container_name = 'CONTAINER'
importing
r_salv_table = gr_table
changing
t_table = gt_itab2 ).
endif.
*3. ALV 기본 기능 버튼 설정
* gr_functions->set_default( ).
* gr_functions->set_all( abap_true ).
*4. ALV 호출
if g_flg is initial.
gr_functions = gr_table->get_functions( ).
gr_table->display( ).
g_flg = 'X'.
else.
gr_functions = gr_table->get_functions( ).
gr_columns = gr_table->get_columns( ).
gr_column ?= gr_columns->get_column( 'MANDT' ).
gr_column ?= gr_columns->add_column( 'MATNR' ).
gr_table->refresh( ).
endif.
endmodule. " 0100_PBO OUTPUT
*&---------------------------------------------------------------------*
*& Module 0100_PAI INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module 0100_pai input.
case ok_code.
when 'BACK' or 'EXIT' or 'CANC'.
set screen 0.
leave screen.
endcase.
endmodule. " 0100_PAI INPUT
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
51 | report zsalv_041 . | sapjoy | 2010.08.20 | 3002 |
50 | REPORT Z05_014 | sapjoy | 2008.04.15 | 3022 |
49 | Z01_020 [2] | sapjoy | 2006.12.03 | 3035 |
48 | REPORT Z_DYNAMIC_SCREEN [1] | sapjoy | 2010.10.08 | 3057 |
47 | doi_create [1] | sapjoy | 2008.12.26 | 3060 |
46 | Z02_003 [2] | sapjoy | 2006.12.03 | 3071 |
45 | Z01_018 [2] | sapjoy | 2006.12.03 | 3079 |
» | report zsalv_004 | sapjoy | 2010.08.20 | 3084 |
43 | REPORT Z18_002 | sapjoy | 2007.03.06 | 3091 |
42 | REPORT z20_002 [2] | sapjoy | 2007.04.16 | 3105 |
41 | report zsalv_042 . | sapjoy | 2010.08.20 | 3137 |
40 | REPORT zsapdoi_001. [2] | sapjoy | 2008.12.20 | 3143 |
39 | REPORT z18_02. | sapjoy | 2012.08.02 | 3184 |
38 | REPORT Z06_001 MESSAGE-ID ZTEST . [1] | sapjoy | 2006.12.05 | 3214 |
37 | REPORT ZALVCOLOR | sapjoy | 2010.10.10 | 3216 |
36 | REPORT z18_01. | sapjoy | 2012.08.02 | 3221 |
35 | REPORT Z_WHEREUSEDLIST [4] | sapjoy | 2011.03.29 | 3224 |
34 | REPORT ZSAPTIP_002. | sapjoy | 2009.02.20 | 3227 |
33 | REPORT z19_004 | sapjoy | 2007.03.28 | 3245 |
32 | REPORT z18_06. | sapjoy | 2012.08.02 | 3253 |