Advertisement
Kusterek

ZWL_GET_DATA_FROM_FILE

Dec 5th, 2019
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 1.46 KB | None | 0 0
  1. *&---------------------------------------------------------------------*
  2. *& Report ZWL_GET_DATA_FROM_FILES
  3. *&---------------------------------------------------------------------*
  4. *&
  5. *&---------------------------------------------------------------------*
  6. REPORT zwl_get_data_from_file.
  7.  
  8. TYPES: tt_pc    TYPE TABLE OF zwl_hashed_pc WITH EMPTY KEY,
  9.        tt_pz    TYPE TABLE OF zwl_hashed_pz WITH EMPTY KEY,
  10.        tt_masks TYPE TABLE OF zwl_hashed_masks WITH EMPTY KEY.
  11.  
  12. CONSTANTS: c_file TYPE string VALUE '.json'.
  13.  
  14. DATA: go_cfg       TYPE REF TO zwl_cl_taxpayer_cfg_helper,
  15.       gv_ok        TYPE c,
  16.       gv_str_pc    TYPE string,
  17.       gv_str_pz    TYPE string,
  18.       gv_str_masks TYPE string.
  19.  
  20. SELECTION-SCREEN BEGIN OF BLOCK ss_block WITH FRAME TITLE TEXT-001.
  21. PARAMETERS: p_path  TYPE txt50 OBLIGATORY,
  22.             p_dats  TYPE dats DEFAULT sy-datum,
  23.             p_batch TYPE zwl_batch_size OBLIGATORY.
  24. SELECTION-SCREEN END OF BLOCK ss_block.
  25.  
  26. INITIALIZATION.
  27.   PERFORM get_initialization_data.
  28.  
  29.   INCLUDE zwl_get_data_from_file_fm.
  30.  
  31. START-OF-SELECTION.
  32.  
  33.   "Sprawdzanie czy było przetwarzane
  34.   CHECK go_cfg->get_last_update_date( ) < p_dats.
  35.  
  36.   CHECK gv_ok = 'X'.
  37.  
  38.   PERFORM check_files_exists CHANGING gv_ok. "Sprawdzanie czy są wszystkie pliki
  39.  
  40.   CHECK gv_ok = 'X'.
  41.  
  42.   PERFORM clear_db_tables.    "Czyszczenie tabel BD
  43.   PERFORM convert_data.
  44.   PERFORM set_update_date.    "Ustawienie daty ostatniej konfiguracji
  45.  
  46.   COMMIT WORK AND WAIT.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement