process before output.
module t_1000_init.
loop at g_t_1000_itab
into g_t_1000_wa
with control t_1000
cursor t_1000-current_line.
module t_1000_move.
endloop.
module status_1000.
process after input.
loop at g_t_1000_itab.
chain.
field /bic/pncflstate-/bic/ncflstate.
field /bic/pncflstate-txtlg.
field /bic/pncflstate-/bic/ekrstate.
field /bic/pncflstate-/bic/ncdt.
field /bic/pncflstate-/bic/nctime.
module t_1000_modify on chain-request.
endchain.
endloop.
module user_command_1000.
***********************************************
*&---------------------------------------------------------------------*
*& Report ZN_INTERFACE_08
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report zn_manager_sap_1109_setting.
*"----------------------------------------------------------------------
*" Таблица. Нужна для объявления типов полей
tables /bic/pncflstate.
*-----------------------------------------------------------------------
*" Переменные и все-все-все...
types:
begin of t_t_1000,
/bic/ncflstate like /bic/pncflstate-/bic/ncflstate,
txtlg like /bic/pncflstate-txtlg,
/bic/ekrstate like /bic/pncflstate-/bic/ekrstate,
/bic/ncdt like /bic/pncflstate-/bic/ncdt,
/bic/nctime like /bic/pncflstate-/bic/nctime,
end of t_t_1000.
data:
g_t_1000_itab type t_t_1000 occurs 0,
g_t_1000_wa type t_t_1000. "work area
controls: t_1000 type tableview using screen 1000.
*-----------------------------------------------------------------------
perform select.
call screen 1000.
*-----------------------------------------------------------------------
module status_1000 output.
set pf-status 'ZNMENU_SETTING'.
case sy-ucomm.
*" Выход из программы
when 'EXIT' or 'BACK' or 'CANCEL'.
leave program.
endcase.
endmodule. " STATUS_1000 OUTPUT
*-----------------------------------------------------------------------
module t_1000_init output.
read table g_t_1000_itab
into /bic/pncflstate
index t_1000-current_line.
endmodule. "T_1000_INIT OUTPUT
*-----------------------------------------------------------------------
module t_1000_move output.
move-corresponding g_t_1000_wa to /bic/pncflstate.
endmodule. "T_1000_MOVE OUTPUT
*-----------------------------------------------------------------------
module t_1000_modify input.
move-corresponding /bic/pncflstate to g_t_1000_wa.
modify g_t_1000_itab
from g_t_1000_wa
index t_1000-current_line.
endmodule. "T_1000_MODIFY INPUT
*-----------------------------------------------------------------------
*" Сохранить и обновить
module user_command_1000 input.
case sy-ucomm.
when 'SAVE'.
loop at g_t_1000_itab into g_t_1000_wa.
update /bic/pncflstate
set /bic/ekrstate = g_t_1000_wa-/bic/ekrstate
where /bic/ncflstate = g_t_1000_wa-/bic/ncflstate.
endloop.
message 'Парамерты сохранены' type 'I'.
clear sy-ucomm.
when 'REFRESH'.
perform select.
endcase.
endmodule. "USER_COMMAND_1000 INPUT
*-----------------------------------------------------------------------
form select.
select *
from /bic/pncflstate into corresponding fields
of table g_t_1000_itab
where /bic/ncflstate > 0.
endform. "select
***********************************************