*&---------------------------------------------------------------------*
*&  Include           ZSOFTCOPY__TRY                                   *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*& This file is part of ZSOFTCOPY.                                     *
*&                                                                     *
*& ZSOFTCOPY is free software: you can redistribute it and/or modify   *
*& it under the terms of the GNU General Public License as published   *
*& by the Free Software Foundation, either version 3 of the License,   *
*& or any later version.                                               *
*&                                                                     *
*& ZSOFTCOPY is distributed in the hope that it will be useful,        *
*& but WITHOUT ANY WARRANTY; without even the implied warranty of      *
*& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *
*& GNU General Public License for more details.                        *
*&                                                                     *
*& You should have received a copy of the GNU General Public License   *
*& along with ZDOWNLOAD. If not, see <http://www.gnu.org/licenses/>.   *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&  Author:     Ruediger von Creytz     ruediger.creytz@globalbit.net  *
*&  Copyright:  globalBIT, LLC          http://www.globalbit.net       *
*&                                                                     *
*&---------------------------------------------------------------------*


*-----------------------------------------------------------------------
* try_create_src_no_includes
*-----------------------------------------------------------------------
FORM try_create_src_no_includes
  USING
    it_src TYPE it_string
    value(i_src_name)
    value(i_progname)
  CHANGING
    ct_src_no_includes TYPE it_string.

  DATA lt_index TYPE it_src_include_index.

  REFRESH ct_src_no_includes.

  TRY.
*      CALL FUNCTION 'CREATE_SOURCE_WITHOUT_INCLUDES'
*        EXPORTING
*          source_i         = it_src
*          source_name      = i_src_name
*          global_check     = abap_true
*          global_program   = i_progname
*          replacing_source = space
*        IMPORTING
*          source_o         = ct_src_no_includes
*        EXCEPTIONS
*          OTHERS           = 1.

      PERFORM get_src_without_includes
        USING
          it_src
          i_src_name
          abap_true
          i_progname
          space
        CHANGING
          ct_src_no_includes
          lt_index.
    CATCH cx_root.
  ENDTRY.
ENDFORM.                    "try_create_src_no_includes


*-----------------------------------------------------------------------
* try_read_report
*-----------------------------------------------------------------------
FORM try_read_report
  USING
    value(i_progname)
  CHANGING
    ct_src TYPE it_string.

  REFRESH ct_src.

  TRY.
      READ REPORT i_progname INTO ct_src STATE 'A'.
    CATCH cx_sy_read_src_line_too_long.
    CATCH cx_root.
  ENDTRY.
ENDFORM.                    "try_read_report
