Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *&---------------------------------------------------------------------*
- *& Report ZBN_FF67DEF_CHECK
- *&---------------------------------------------------------------------*
- *& Проверка данных по умолчанию для транзакции FF67
- *& Исправление при необходимости. Должно быть WVAR_ART = 4 для всех пользователей
- *& Служебная программа, только для однократного запуска по необходимости
- *&---------------------------------------------------------------------*
- report zbn_ff67def_check.
- tables: usr02.
- select-options: so_bname for usr02-bname.
- parameters: p_updart as checkbox.
- tables febmka.
- data: novaluta_flag.
- data: nofdis_flag.
- data: lt_usr02 type standard table of usr02 with header line.
- data: begin of gs_report,
- bname type usr02-bname,
- vari_start type febmka-vari_start,
- kont_int type febmka-kont_int,
- debi_mid type febmka-debi_mid,
- kred_mid type febmka-kred_mid,
- wvar_art type febmka-wvar_art,
- novaluta_flag(1) type c,
- nofdis_flag(1) type c,
- end of gs_report.
- data: gt_report like gs_report occurs 0 with header line.
- start-of-selection.
- if p_updart = 'X'.
- data: lv_ans(1) type c.
- data: lt_spopli like spopli occurs 0 with header line.
- lt_spopli-selflag = '1'. lt_spopli-varoption = 'Продолжить'. append lt_spopli.
- lt_spopli-selflag = '2'. lt_spopli-varoption = 'Отменить операцию'. append lt_spopli.
- call function 'POPUP_TO_DECIDE_LIST'
- exporting
- textline1 = 'Вы действительно хотите обновить данные?'
- textline2 = 'Будут изменены данные по умолчанию'
- textline3 = 'для транзакции FF67'
- titel = 'Подтверждение'
- importing
- answer = lv_ans
- tables
- t_spopli = lt_spopli
- exceptions
- others = 99.
- case lv_ans.
- when '1'.
- "Do nothing, continue
- when others.
- leave program.
- endcase.
- endif.
- select * from usr02 into table lt_usr02
- where bname in so_bname.
- loop at lt_usr02.
- import febmka-vari_start
- febmka-kont_int
- febmka-debi_mid
- febmka-kred_mid
- febmka-wvar_art
- novaluta_flag
- nofdis_flag
- from database rfdt(mk) id lt_usr02-bname.
- check sy-subrc = 0. "
- clear gs_report.
- gs_report-bname = lt_usr02-bname.
- gs_report-vari_start = febmka-vari_start.
- gs_report-kont_int = febmka-kont_int.
- gs_report-debi_mid = febmka-debi_mid.
- gs_report-kred_mid = febmka-kred_mid.
- gs_report-wvar_art = febmka-wvar_art.
- gs_report-novaluta_flag = novaluta_flag.
- gs_report-nofdis_flag = nofdis_flag.
- append gs_report to gt_report.
- if p_updart = 'X'.
- if gs_report-wvar_art ne '4'.
- febmka-wvar_art = '4'.
- export febmka-vari_start
- febmka-kont_int
- febmka-debi_mid
- febmka-kred_mid
- febmka-wvar_art
- novaluta_flag "XVALUT
- nofdis_flag
- to database rfdt(mk) id lt_usr02-bname.
- endif.
- endif.
- endloop.
- data: gr_table type ref to cl_salv_table.
- data: gr_functions type ref to cl_salv_functions_list.
- data: gr_layout type ref to cl_salv_layout.
- data: ls_key type salv_s_layout_key.
- constants: gc_true type sap_bool value 'X',
- gc_false type sap_bool value space.
- call method cl_salv_table=>factory
- importing
- r_salv_table = gr_table
- changing
- t_table = gt_report[].
- gr_functions = gr_table->get_functions( ).
- gr_functions->set_all( abap_true ).
- gr_layout = gr_table->get_layout( ).
- ls_key-report = sy-repid.
- gr_layout->set_key( ls_key ).
- gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
- data: lr_columns type ref to cl_salv_columns_table,
- lr_column type ref to cl_salv_column_table.
- lr_columns = gr_table->get_columns( ).
- lr_columns->set_optimize( gc_true ).
- lr_column ?= lr_columns->get_column( 'NOVALUTA_FLAG' ). lr_column->set_short_text( 'NOVALUTA' ). lr_column->set_visible( gc_false ).
- lr_column ?= lr_columns->get_column( 'NOFDIS_FLAG' ). lr_column->set_short_text( 'NOFDIS' ). lr_column->set_visible( gc_false ).
- gr_table->display( ).
- end-of-selection.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement