프로그래밍/SAP ABAP

SAP ALV 화면 분할

2019. 3. 19. 17:51

화면을 만들 스크린 생성 0100 번
Process before oupput.
module status_0100.
module display_container_output.

Prcoess after input.
module exit_0100 at exit-command.
module ok_code.
module user_command_0100.
moudle clear_ok.

Gui status 생성
Gui title 생성

——

Module status_0100 output.
set titlebar ‘title_0100’.
set pf-status ‘status_0100’.
Endmodule.

Moduel display_container_output output.
perform alv1_display.
perform alv2_display.
Endmodule.


Module exit_0100 input.
case sy-ucomm.
when ‘BACK’.
leave to screen 0.
when ‘EXIT’ or ‘CANCEL’.
leave program.
endcase.
Endmodule.


Module ok_code input.
clear : g_ok_code.
g_ok_code = ok_code.
if sy-ucomm. Eq space.
clear g_ok_code.
endif.
Endmodule.


Module user_command_0100 input.
call method cl_gui_cfw=>dispatch.

case ok_code.
when ‘BACK’.
leave to screen 0.
when ‘’EXIT.
leave program.
endcase.
Endmodule.


Module clear_ok input.
clear : g_ok_code.
Endmodule.

———-

form alv1_display.

gs_stbl-row = ‘X’.
gs_stbl-col = ‘X’.

if g_dock1 is initail.

if g_dock1 is not initial.
call method g_dock1->free.
endif.

create object g_dock1
exporting
repid = g_repid
dynnr = sy-dynnr
side = g_dock1->dock_at_top
ratio = 60
extension = sy-scols.

create object g_grid1
exporting
i_parent = g_dock1.

perform cont_alv_variant.
perform cont_alv_layout.
perform cont_alv_fieldcatalog.
perform cont_alv_toolbar_exclude changing gt_exclude.
perfrom cont_alv_sort.

call emthod g_grid1->set_ready_for_input
exporting
i_ready_for_input = 0.

call method g_grid1->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_modified.

call mehtod g_grid1->set_table_for_first_display
exporting
is_layout = gs_layout
is_variant = gs_variant
i_save = ‘A’
i_default = ‘X’
it_tollbar_excluding = gt_exclude
changing
it_sort = gt_sort
it_outtab = gt_alv1[]
it_fieldcatalog = gt_fieldcatalog[].

call method g_grid1->set_toolbar_interactive.

call method cl_gui_cfw=>flush
exceptions
cntl_system_error = 1
cntl_error = 2
others = 3.

else.

call method g_grid1->refresh_table_display
exporting
is_stable = gs_stbl
i_soft_refresh = abap_true.
endif.


endform.

'프로그래밍 > SAP ABAP' 카테고리의 다른 글

sap fi table  (0) 2019.03.22
ALV fieldcatalog 에서 0 제거하는 방법  (0) 2019.03.20
기준일 최근 영업일 찾기 함수  (0) 2019.03.13
Display t-code  (0) 2019.03.12
Payment Terms 생성  (0) 2019.03.12