Source code of program: ZEDI_EXPORT_IDOC_TO_XML

Description: EDI: Export IDoc to XML

*&---------------------------------------------------------------------*
*& Report  ZEDI_EXPORT_IDOC_TO_XML
*&
*&---------------------------------------------------------------------*
*& EDI: Export IDoc to XML
*& Author: Pavel JaroŇ°, 10. 9. 2014
*&---------------------------------------------------------------------*

REPORT  zedi_export_idoc_to_xml MESSAGE-ID zmm1.

TYPE-POOLS: icon.

TABLES: edidc.

TYPES: BEGIN OF gty_idoc,
          mestyp LIKE edidc-mestyp,
          docnum LIKE edidc-docnum,
          status LIKE edidc-status,
          direct LIKE edidc-direct,
        END OF gty_idoc.

DATA: gt_idocs TYPE TABLE OF gty_idoc WITH HEADER LINE,
      g_idoc_idx TYPE i,
      g_idoc_cnt TYPE i.

* objects for screen 100
DATA:
* sidebar
  ref_cont_left   TYPE REF TO cl_gui_docking_container,
  ref_cont_split  TYPE REF TO cl_gui_splitter_container,
  ref_cell_top    TYPE REF TO cl_gui_container,
  ref_cell_bott   LIKE ref_cell_top,

* tree
  ref_tree_model TYPE REF TO cl_simple_tree_model,
  ref_toolbar    TYPE REF TO cl_gui_toolbar,
  gt_node        TYPE treemsnota,
  gs_node        LIKE LINE OF gt_node,
  gt_events      TYPE cntl_simple_events,
  gs_event       LIKE LINE OF gt_events,
  gt_hits        TYPE treemnotab.

* HTML viewer
DATA: ref_cont100 TYPE REF TO cl_gui_custom_container,
      ref_viewer  TYPE REF TO cl_gui_html_viewer.

DATA: ok_code LIKE sy-ucomm,
      save_ok LIKE sy-ucomm.

****************************************
* SELECTION SCREEN                     *
****************************************
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_docnum FOR edidc-docnum,
                s_status FOR edidc-status,
                s_direct FOR edidc-direct,
                s_rcvprn FOR edidc-rcvprn,
                s_mestyp FOR edidc-mestyp,
                s_idoctp FOR edidc-idoctp,
                s_credat FOR edidc-credat,
                s_cretim FOR edidc-cretim.
SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_disp RADIOBUTTON GROUP rad1 DEFAULT 'X'
 USER-COMMAND exp.
SELECTION-SCREEN COMMENT 2(20) text-dsp FOR FIELD p_disp.
SELECTION-SCREEN POSITION 33.
PARAMETERS p_exp RADIOBUTTON GROUP rad1.
SELECTION-SCREEN COMMENT 35(20) text-exp FOR FIELD p_exp.
SELECTION-SCREEN END OF LINE.

PARAMETERS: p_fpath TYPE ibipparms-path DEFAULT 'C:\temp\idocs\' OBLIGATORY
             LOWER CASE MODIF ID exp.
SELECTION-SCREEN: END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath.
  PERFORM f4_folder CHANGING p_fpath.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'EXP'.
      IF p_exp = 'X'.
        screen-active = 1.
      ELSE.
        screen-active = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

****************************************
* START OF SELECTION                   *
****************************************
START-OF-SELECTION.
  PERFORM export_idocs.

*&---------------------------------------------------------------------*
*&      Form  export_idocs
*&---------------------------------------------------------------------*
FORM export_idocs.
  SELECT mestyp docnum status direct
  FROM edidc INTO TABLE gt_idocs
  WHERE docnum IN s_docnum
  AND status IN s_status
  AND direct IN s_direct
  AND rcvprn IN s_rcvprn
  AND credat IN s_credat
  AND cretim IN s_cretim
  AND mestyp IN s_mestyp
  AND idoctp IN s_idoctp.

  IF gt_idocs[] IS INITIAL.
    MESSAGE i001.
    EXIT.
  ENDIF.

  IF p_disp = 'X'.
*   display the first IDoc
    g_idoc_cnt = LINES( gt_idocs ).
    g_idoc_idx = 1.
    CALL SCREEN 100.
  ELSE.
*   export XML files into output folder
    LOOP AT gt_idocs.
      PERFORM process_idoc USING gt_idocs.
    ENDLOOP.
  ENDIF.
ENDFORM.                    "export_idocs

*&---------------------------------------------------------------------*
*&      Form  process_idoc
*&---------------------------------------------------------------------*
FORM process_idoc USING ps_idocs TYPE gty_idoc.
  DATA: lrf_idoc_xml TYPE REF TO cl_idoc_xml1,
        l_string TYPE string,
        lt_xml TYPE TABLE OF char255,
        l_filename TYPE string,
        l_doc_url(255) TYPE c.

  CREATE OBJECT lrf_idoc_xml
    EXPORTING
      docnum = ps_idocs-docnum
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc NE 0.
    WRITE: /'Error creating IDoc object for', ps_idocs-docnum.
    EXIT.
  ENDIF.

* Get IDoc data as string
  CALL METHOD lrf_idoc_xml->get_xmldata_as_string
    IMPORTING
      data_string = l_string.

  IF sy-subrc NE 0 OR lrf_idoc_xml IS INITIAL.
    WRITE: /'Error getting xml data as string for IDoc', ps_idocs-docnum.
    EXIT.
  ENDIF.

* split XML tags on single lines
  REPLACE ALL OCCURRENCES OF '><' IN l_string WITH '>~<'.
  SPLIT l_string AT '~' INTO TABLE lt_xml.

  IF p_disp = 'X'.
    CALL METHOD ref_viewer->load_data
      EXPORTING
        type         = 'text'
        subtype      = 'xml'
      IMPORTING
        assigned_url = l_doc_url
      CHANGING
        data_table   = lt_xml
      EXCEPTIONS
        OTHERS       = 4.

    IF sy-subrc <> 0 OR l_doc_url IS INITIAL.
      MESSAGE i000 WITH 'Error in init of HTML control'.
    ENDIF.

    CALL METHOD ref_viewer->show_url
      EXPORTING
        url = l_doc_url.
  ELSE.
    PERFORM add_back_slash CHANGING p_fpath.
    SHIFT ps_idocs-docnum LEFT DELETING LEADING '0'.
    CONCATENATE p_fpath ps_idocs-mestyp '_' ps_idocs-docnum '.xml' INTO l_filename.

    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename = l_filename
        filetype = 'DAT'
      CHANGING
        data_tab = lt_xml
      EXCEPTIONS
        OTHERS   = 4.
  ENDIF.
ENDFORM.                    "process_idoc

*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  PERFORM module_status_0100.
ENDMODULE.                    "status_0100 OUTPUT

*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  save_ok = ok_code.
  CLEAR ok_code.

  CASE save_ok.
    WHEN 'PREV'.
      CHECK g_idoc_cnt > 1.
      IF g_idoc_idx = 1.
        g_idoc_idx = g_idoc_cnt.
      ELSE.
        SUBTRACT 1 FROM g_idoc_idx.
      ENDIF.
      READ TABLE gt_idocs INDEX g_idoc_idx.
      PERFORM process_idoc USING gt_idocs.
    WHEN 'NEXT'.
      CHECK g_idoc_cnt > 1.
      IF g_idoc_idx = g_idoc_cnt.
        g_idoc_idx = 1.
      ELSE.
        ADD 1 TO g_idoc_idx.
      ENDIF.
      READ TABLE gt_idocs INDEX g_idoc_idx.
      PERFORM process_idoc USING gt_idocs.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
    WHEN OTHERS.
*     do nothing
  ENDCASE.
ENDMODULE.                    "user_command_0100 INPUT

*&---------------------------------------------------------------------*
*&      Form  module_status_0100
*&---------------------------------------------------------------------*
FORM module_status_0100.
  DATA: l_title(100) TYPE c,
        l_idx(15) TYPE c,
        l_cnt(15) TYPE c.

  READ TABLE gt_idocs INDEX g_idoc_idx.

  l_title = gt_idocs-docnum.
  SHIFT l_title LEFT DELETING LEADING '0'.
  l_idx = g_idoc_idx.
  CONDENSE l_idx NO-GAPS.
  l_cnt = g_idoc_cnt.
  CONDENSE l_cnt NO-GAPS.
  CONCATENATE l_idx l_cnt INTO l_idx SEPARATED BY '/'.

  CONCATENATE 'IDoc' l_title '|' gt_idocs-mestyp '|' l_idx
  INTO l_title SEPARATED BY space.

  SET TITLEBAR 'MAIN100' WITH l_title.

* shall we continue?
  CHECK ref_cont100 IS INITIAL.

*---------------------------------------------
  SET PF-STATUS 'MAIN100'.

*------ sidebar + tree -----*
  PERFORM create_sidebar.
  PERFORM create_tree.

*------ main container -----*
  CREATE OBJECT ref_cont100
    EXPORTING
      container_name = 'CONT100'.

  CREATE OBJECT ref_viewer
    EXPORTING
      parent = ref_cont100.

  READ TABLE gt_idocs INDEX g_idoc_idx.
  PERFORM process_idoc USING gt_idocs.
ENDFORM.                    "module_status_0100

*---------------------------------------------------------------------*
*       CLASS lcl_event_hdl_toolbar DEFINITION
*---------------------------------------------------------------------*
CLASS lcl_event_hdl_toolbar DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS on_function_selected  FOR EVENT function_selected
                                        OF cl_gui_toolbar
                                        IMPORTING fcode.
ENDCLASS.                    "lcl_event_hdl_toolbar DEFINITION

*---------------------------------------------------------------------*
*       CLASS lcl_event_hdl_tree DEFINITION
*---------------------------------------------------------------------*
CLASS lcl_event_hdl_tree DEFINITION.
  PUBLIC SECTION.
    METHODS:
      on_node_double_click
        FOR EVENT node_double_click
        OF cl_simple_tree_model
        IMPORTING node_key.
ENDCLASS.                    "lcl_event_hdl_tree DEFINITION

DATA: e_receiver TYPE REF TO lcl_event_hdl_tree.

*---------------------------------------------------------------------*
*       CLASS lcl_event_hdl_toolbar IMPLEMENTATION
*---------------------------------------------------------------------*
CLASS lcl_event_hdl_toolbar IMPLEMENTATION.
  METHOD on_function_selected.

    DATA: l_titletext TYPE string,
          l_search_result_type  TYPE i,
          l_search_result_node_key  TYPE string.

    CASE fcode.

      WHEN 'EXPAND_ALL'.
        CALL METHOD ref_tree_model->expand_root_nodes
          EXPORTING
            expand_subtree = 'X'
          EXCEPTIONS
            OTHERS         = 1.

      WHEN 'COLLAPSE_ALL'.
        CALL METHOD ref_tree_model->collapse_all_nodes
          EXCEPTIONS
            OTHERS = 1.

      WHEN 'PRINT'.

        l_titletext = 'Print'.
        CALL METHOD ref_tree_model->print_tree
          EXPORTING
            all_nodes = space
            title     = l_titletext
            preview   = 'X'
          EXCEPTIONS
            OTHERS    = 1.

      WHEN 'SEARCH' OR 'SEARCHNEXT'.

        IF fcode = 'SEARCH'.

          CALL METHOD ref_tree_model->unselect_all.

          CALL METHOD ref_tree_model->find
            IMPORTING
              result_type     = l_search_result_type
              result_node_key = l_search_result_node_key.


          CASE l_search_result_type.
            WHEN cl_simple_tree_model=>find_match.
              CLEAR gt_hits.
              INSERT l_search_result_node_key INTO TABLE gt_hits.

            WHEN cl_simple_tree_model=>find_no_match.
              EXIT.

            WHEN cl_simple_tree_model=>find_canceled.
              EXIT.
          ENDCASE.
        ELSE.

          CALL METHOD ref_tree_model->find_next
            IMPORTING
              result_type     = l_search_result_type
              result_node_key = l_search_result_node_key.


          CASE l_search_result_type.
            WHEN cl_simple_tree_model=>find_match.
              CLEAR gt_hits.
              INSERT l_search_result_node_key INTO TABLE gt_hits.

            WHEN cl_simple_tree_model=>find_no_match.
              EXIT.

            WHEN cl_simple_tree_model=>find_canceled.
              EXIT.
          ENDCASE.
        ENDIF.

        CALL METHOD ref_tree_model->select_nodes
          EXPORTING
            node_key_table = gt_hits
          EXCEPTIONS
            OTHERS         = 1.

        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
    ENDCASE.
  ENDMETHOD.                    "on_function_selected
ENDCLASS.                    "lcl_event_hdl_toolbar IMPLEMENTATION

*---------------------------------------------------------------------*
*       CLASS lcl_event_hdl_tree IMPLEMENTATION
*---------------------------------------------------------------------*
CLASS lcl_event_hdl_tree IMPLEMENTATION.
  METHOD on_node_double_click.
    DATA: ls_idoc LIKE LINE OF gt_idocs.

    READ TABLE gt_idocs INTO ls_idoc WITH KEY docnum = node_key.
    CHECK sy-subrc = 0.
    g_idoc_idx = sy-tabix.
    PERFORM process_idoc USING ls_idoc.
  ENDMETHOD.                    "on_node_double_click
ENDCLASS.                    "lcl_event_hdl_tree IMPLEMENTATION

*&---------------------------------------------------------------------*
*&      Form  create_sidebar
*&---------------------------------------------------------------------*
FORM create_sidebar.
  CREATE OBJECT ref_cont_left
    EXPORTING
      ratio  = 17
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc NE 0.
    EXIT.
  ENDIF.

  CREATE OBJECT ref_cont_split
    EXPORTING
      parent  = ref_cont_left
      rows    = 2
      columns = 1
    EXCEPTIONS
      OTHERS  = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

* configure splitter container ...
* Easy Splitter Container unfortunately
* not able to be configurable enough:
* user should not be able to move border bar!
  CALL METHOD ref_cont_split->set_border
    EXPORTING
      border = cl_gui_cfw=>false
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  CALL METHOD ref_cont_split->set_row_mode
    EXPORTING
      mode   = cl_gui_splitter_container=>mode_absolute
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  CALL METHOD ref_cont_split->set_row_height
    EXPORTING
      id     = 1
      height = 23
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  CALL METHOD ref_cont_split->set_row_sash
    EXPORTING
      id     = 1
      type   = cl_gui_splitter_container=>type_movable
      value  = cl_gui_splitter_container=>false
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  ref_cell_top  = ref_cont_split->get_container( row = 1 column = 1 ).
  ref_cell_bott = ref_cont_split->get_container( row = 2 column = 1 ).
ENDFORM.                    "create_sidebar

*&---------------------------------------------------------------------*
*&      Form  create_tree
*&---------------------------------------------------------------------*
FORM create_tree.
  CREATE OBJECT ref_toolbar
    EXPORTING
      parent = ref_cell_top
    EXCEPTIONS
      OTHERS = 4.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  PERFORM configure_toolbar CHANGING ref_toolbar.

  gs_event-eventid = cl_gui_toolbar=>m_id_function_selected.
  INSERT gs_event INTO TABLE gt_events.

  CALL METHOD ref_toolbar->set_registered_events
    EXPORTING
      events = gt_events
    EXCEPTIONS
      OTHERS = 4.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  SET HANDLER lcl_event_hdl_toolbar=>on_function_selected
      FOR ref_toolbar.

  CREATE OBJECT ref_tree_model
    EXPORTING
      node_selection_mode = cl_simple_tree_model=>node_sel_mode_multiple
    EXCEPTIONS
      OTHERS              = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  CALL METHOD ref_tree_model->create_tree_control
    EXPORTING
      parent = ref_cell_bott
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

  PERFORM set_events.

  PERFORM add_nodes USING ref_tree_model.
ENDFORM.                    "create_tree

*---------------------------------------------------------------------*
*       FORM set_events                                               *
*---------------------------------------------------------------------*
FORM set_events.
  DATA: lt_event TYPE cntl_simple_events,
        ls_event TYPE cntl_simple_event.

* define the events which will be passed to the backend
  ls_event-eventid = cl_simple_tree_model=>eventid_node_double_click.
  ls_event-appl_event = 'X'. " process PAI if event occurs
  APPEND ls_event TO lt_event.

  CALL METHOD ref_tree_model->set_registered_events
    EXPORTING
      events                    = lt_event
    EXCEPTIONS
      illegal_event_combination = 1
      unknown_event             = 2.

*   objekt pro obsluhu udalosti
  CREATE OBJECT e_receiver.
  SET HANDLER e_receiver->on_node_double_click FOR ref_tree_model.
ENDFORM.                    "set_events

*---------------------------------------------------------------------*
*       FORM ADD_NODES                                                *
*---------------------------------------------------------------------*
*       build up a hierarchy consisting of                            *
*       carriers, connections and flight dates                        *
*---------------------------------------------------------------------*
FORM add_nodes USING l_ref_tree_model TYPE REF TO cl_simple_tree_model.
  DATA:
    ls_node TYPE treemsnodt,
    l_cx_root TYPE REF TO cx_root,
    ls_idoc LIKE LINE OF gt_idocs,
    l_direct(1) TYPE c.

  SORT gt_idocs BY mestyp DESCENDING docnum ASCENDING.

  LOOP AT gt_idocs INTO ls_idoc.
*   the first node level
    AT NEW mestyp.
      ls_node-node_key = ls_idoc-mestyp.
      CONCATENATE text-msg ls_idoc-mestyp
      INTO ls_node-text SEPARATED BY space.
      CALL METHOD l_ref_tree_model->add_node
        EXPORTING
          node_key = ls_node-node_key
          isfolder = 'X'
          text     = ls_node-text
          expander = 'X'
        EXCEPTIONS
          OTHERS   = 5.
    ENDAT.

*   the second node level
    CLEAR ls_node.
    ls_node-node_key = ls_idoc-docnum.
    SHIFT ls_idoc-docnum LEFT DELETING LEADING '0'.
    IF ls_idoc-direct = '2'.
      l_direct = 'I'. "inbound
    ELSE.
      l_direct = 'O'. "outbound
    ENDIF.
    CONCATENATE ls_idoc-docnum ls_idoc-status l_direct
    INTO ls_node-text SEPARATED BY ' | '.
    ls_node-relatkey = ls_idoc-mestyp.
    CALL METHOD l_ref_tree_model->add_node
      EXPORTING
        node_key          = ls_node-node_key
        relative_node_key = ls_node-relatkey
        relationship      = cl_simple_tree_model=>relat_last_child
        isfolder          = ' '
        text              = ls_node-text
        expander          = ' '
      EXCEPTIONS
        OTHERS            = 5.
  ENDLOOP.

  SORT gt_idocs BY mestyp docnum.

* expand current IDoc
  READ TABLE gt_idocs INTO ls_idoc INDEX g_idoc_idx.
  ls_node-node_key = ls_idoc-docnum.

  CALL METHOD ref_tree_model->expand_node
    EXPORTING
      node_key            = ls_node-node_key
      expand_predecessors = 'X'
      expand_subtree      = 'X'
    EXCEPTIONS
      node_not_found      = 4.
ENDFORM.                    "add_nodes

*&---------------------------------------------------------------------*
*&      Form  configure_toolbar
*&---------------------------------------------------------------------*
FORM configure_toolbar
 CHANGING p_ref_toolbar TYPE REF TO cl_gui_toolbar.

* expand all
  CALL METHOD p_ref_toolbar->add_button
    EXPORTING
      fcode     = 'EXPAND_ALL'
      icon      = icon_expand_all
      butn_type = cntb_btype_button
      quickinfo = 'Expand all'
    EXCEPTIONS
      OTHERS    = 4.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

* collapse all
  CALL METHOD p_ref_toolbar->add_button
    EXPORTING
      fcode     = 'COLLAPSE_ALL'
      icon      = icon_collapse_all
      butn_type = cntb_btype_button
      quickinfo = 'Collapse all'
    EXCEPTIONS
      OTHERS    = 1.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

* print
  CALL METHOD p_ref_toolbar->add_button
    EXPORTING
      fcode     = 'PRINT'
      icon      = icon_print
      butn_type = cntb_btype_button
      quickinfo = 'Print'
    EXCEPTIONS
      OTHERS    = 4.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

* search
  CALL METHOD p_ref_toolbar->add_button
    EXPORTING
      fcode     = 'SEARCH'
      icon      = icon_search
      butn_type = cntb_btype_button
      quickinfo = 'Search'
    EXCEPTIONS
      OTHERS    = 4.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.

* search next
  CALL METHOD p_ref_toolbar->add_button
    EXPORTING
      fcode     = 'SEARCHNEXT'
      icon      = icon_search_next
      butn_type = cntb_btype_button
      quickinfo = 'Search next'
    EXCEPTIONS
      OTHERS    = 4.

  IF sy-subrc <> 0.
    EXIT.
  ENDIF.
ENDFORM.                    "configure_toolbar

*&---------------------------------------------------------------------*
*&      Form  f4_folder
*&---------------------------------------------------------------------*
FORM f4_folder CHANGING p_path TYPE c.
  DATA: l_folder TYPE string,
        l_title TYPE string.

  l_folder = p_path.
  l_title = 'Choose folder'(fld).

  CALL METHOD cl_gui_frontend_services=>directory_browse
    EXPORTING
      window_title    = l_title
      initial_folder  = l_folder
    CHANGING
      selected_folder = l_folder.

  p_path = l_folder.
  PERFORM add_back_slash CHANGING p_path.
ENDFORM.                                                    "f4_folder

*&---------------------------------------------------------------------*
*&      Form  add_back_slash
*&---------------------------------------------------------------------*
FORM add_back_slash CHANGING pc_file TYPE c.
  CONSTANTS lc_bslash TYPE c VALUE '\'.
  DATA l_len TYPE i.

  CHECK NOT pc_file IS INITIAL.

  l_len = STRLEN( pc_file ) - 1.
  IF pc_file+l_len(1) <> lc_bslash.
    CONCATENATE pc_file lc_bslash INTO pc_file.
  ENDIF.
ENDFORM.                    "add_back_slash

*GUI Texts
*----------------------------------------------------------
* MAIN100 --> &1 &2
* MAIN100 --> &1 &2

*Text elements
*----------------------------------------------------------
* 001 Selection Criteria
* DSP Display IDocs
* EXP Export IDocs
* FLD Choose folder
* MSG Message


*Selection texts
*----------------------------------------------------------
* P_FPATH         Output folder
* S_CREDAT D       .
* S_CRETIM D       .
* S_DIRECT D       .
* S_DOCNUM D       .
* S_IDOCTP D       .
* S_MESTYP D       .
* S_RCVPRN D       .
* S_STATUS D       .


*Messages
*----------------------------------------------------------
*
* Message class: ZMM1
*000   &1 &2 &3 &4
*001   No data meet selection criteria