SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

ZREPTRAN_46C - report-and dialog program transporter



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP Dictionary -> Migration
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Sun Feb 03, 2008 1:42 am    Post subject: ZREPTRAN_46C - report-and dialog program transporter Reply with quote

A report for a simply up- and download of reports, dialog programs, classes or interfaces inclusive all textelements, includes, dynpros, PF-Statuses and Titlebars. A specific functionality: upload of all reports out of an account. Our developer attach tihs tool for the transfer of programs per disc from the development system to another system (e.g. at an other customer).

Code:

*&---------------------------------------------------------------------*
*& Report  ZREPTRAN_46C                                                *
*&---------------------------------------------------------------------*

REPORT  zreptran_46c LINE-SIZE 170      .

TABLES: d010inc, trdir, eudb, title, d020t, trkey, tfdir, tmdir, tadir,
        seoclass,  seoclassdf, seoclassex, seoclasstx, seometarel,
        seocompo,  seocompodf, seocompoex, seocompotx, seoimplrel,
        seomapatt, seomapcls,  seoredef,   seofriends, seotypepls,
        seosubco,  seosubcodf, seosubcoex, seosubcotx.

TYPES: abapline(72).

TYPES: BEGIN OF ty_tit,
        code TYPE rsoldleng-title,
        text TYPE title-text_line,
       END OF ty_tit.

TYPES: BEGIN OF ty_reptxt,
        id TYPE textpool-id,
        key TYPE textpool-key,
        entry TYPE textpool-entry,
        length(4) TYPE n,
       END OF ty_reptxt.

TYPES: BEGIN OF ty_d020t,
        prog TYPE d020t-prog,
        dynr TYPE d020t-dynr,
        dtxt TYPE d020t-dtxt,
       END OF ty_d020t.

TYPES: BEGIN OF dynp_rel_type,         "Dynpro-Releases
        rel(1),
        dot(1),
        version(2),
       END OF dynp_rel_type.

TYPES: BEGIN OF ty_seocompodf_t.
        INCLUDE STRUCTURE seocmpkey.
TYPES:  version TYPE seocompodf-version,
        alias TYPE seocompodf-alias,
        redefin TYPE seocompodf-redefin,
        exposure TYPE seocompodf-exposure,
        state TYPE seocompodf-state,
        editorder(4) TYPE n,
        locked TYPE seocompodf-locked,
        dispid(4) TYPE n.
        INCLUDE STRUCTURE seochange.
        INCLUDE STRUCTURE seomtdapx.
        INCLUDE STRUCTURE seoevtapx.
        INCLUDE STRUCTURE seotypapx.
TYPES:  typtype TYPE seocompodf-typtype,
        type TYPE seocompodf-type,
        tableof TYPE seocompodf-tableof,
        srcrow1(4) TYPE n,
        srccolumn1(2) TYPE n,
        srcrow2(4) TYPE n,
        srccolumn2(2) TYPE n.
        INCLUDE STRUCTURE seocmpref.
TYPES: END OF ty_seocompodf_t.

TYPES: BEGIN OF ty_seosubcodf_t.
        INCLUDE STRUCTURE seoscokey.
TYPES:  version TYPE seosubcodf-version,
        editorder(4) TYPE n,
        dispid(4) TYPE n.
        INCLUDE STRUCTURE seochange.
TYPES:  pardecltyp TYPE seosubcodf-pardecltyp,
        parpasstyp TYPE seosubcodf-parpasstyp,
        typtype TYPE seosubcodf-typtype,
        type TYPE seosubcodf-type,
        tableof TYPE seosubcodf-tableof,
        srcrow1(4) TYPE n,
        srccolumn1(2) TYPE n,
        srcrow2(4) TYPE n,
        srccolumn2(2) TYPE n,
        parvalue TYPE seosubcodf-parvalue,
        paroptionl TYPE seosubcodf-paroptionl.
        INCLUDE STRUCTURE seoexcapx.
TYPES: END OF ty_seosubcodf_t.


* Release bis 3.1
*INCLUDE mseuxcom.
DATA: eu_key TYPE rseu1_key.
*     Titel
DATA: tit    TYPE STANDARD TABLE OF ty_tit     WITH HEADER LINE.
* Release ab  4.6
DATA: fun4   TYPE STANDARD TABLE OF rsmpe_funt WITH HEADER LINE.
DATA: ctx4   TYPE STANDARD TABLE OF rsmpe_ctx  WITH HEADER LINE.
DATA: mtx4   TYPE STANDARD TABLE OF rsmpe_mnlt WITH HEADER LINE.
DATA: men4   TYPE STANDARD TABLE OF rsmpe_men  WITH HEADER LINE.
DATA: act4   TYPE STANDARD TABLE OF rsmpe_act  WITH HEADER LINE.
DATA: doc4   TYPE STANDARD TABLE OF rsmpe_atrt WITH HEADER LINE.
DATA: sta4   TYPE STANDARD TABLE OF rsmpe_stat WITH HEADER LINE.
DATA: set4   TYPE STANDARD TABLE OF rsmpe_staf WITH HEADER LINE.
DATA: pfk4   TYPE STANDARD TABLE OF rsmpe_pfk  WITH HEADER LINE.
DATA: but4   TYPE STANDARD TABLE OF rsmpe_but  WITH HEADER LINE.
DATA: tit4   TYPE STANDARD TABLE OF rsmpe_titt WITH HEADER LINE.
DATA: stx4   TYPE STANDARD TABLE OF rsmptexts  WITH HEADER LINE.
DATA: adm4   TYPE rsmpe_adm.
* Release ab  4.6c
DATA: biv46c TYPE STANDARD TABLE OF rsmpe_buts WITH HEADER LINE.

DATA: reports  TYPE STANDARD TABLE OF trdir-name WITH HEADER LINE.

DATA: i_repsrc TYPE STANDARD TABLE OF abapline   WITH HEADER LINE.
DATA: i_reptx  TYPE STANDARD TABLE OF textpool   WITH HEADER LINE.
DATA: i_reptxt TYPE STANDARD TABLE OF ty_reptxt  WITH HEADER LINE.

DATA: i_adm4 TYPE STANDARD TABLE OF rsmpe_adm    WITH HEADER LINE.

DATA: i_tmd TYPE STANDARD TABLE OF tmdir.
DATA: i_tfd TYPE STANDARD TABLE OF tfdir.
DATA: i_cls TYPE STANDARD TABLE OF seoclass.
DATA: i_cdf TYPE STANDARD TABLE OF seoclassdf.
DATA: i_clx TYPE STANDARD TABLE OF seoclassex.
DATA: i_clt TYPE STANDARD TABLE OF seoclasstx.
DATA: i_cmr TYPE STANDARD TABLE OF seometarel.
DATA: i_cmp TYPE STANDARD TABLE OF seocompo.
DATA: i_cmd TYPE STANDARD TABLE OF seocompodf WITH HEADER LINE.
DATA: i_cmd_t TYPE STANDARD TABLE OF ty_seocompodf_t WITH HEADER LINE.
DATA: i_cmx TYPE STANDARD TABLE OF seocompoex.
DATA: i_cmt TYPE STANDARD TABLE OF seocompotx.
DATA: i_irl TYPE STANDARD TABLE OF seoimplrel.
DATA: i_mat TYPE STANDARD TABLE OF seomapatt.
DATA: i_mac TYPE STANDARD TABLE OF seomapcls.
DATA: i_red TYPE STANDARD TABLE OF seoredef.
DATA: i_frd TYPE STANDARD TABLE OF seofriends.
DATA: i_tpl TYPE STANDARD TABLE OF seotypepls.
DATA: i_sco TYPE STANDARD TABLE OF seosubco.
DATA: i_scd TYPE STANDARD TABLE OF seosubcodf WITH HEADER LINE.
DATA: i_scd_t TYPE STANDARD TABLE OF ty_seosubcodf_t WITH HEADER LINE.
DATA: i_scx TYPE STANDARD TABLE OF seosubcoex.
DATA: i_sct TYPE STANDARD TABLE OF seosubcotx.
DATA: i_inc TYPE STANDARD TABLE OF d010inc-include WITH HEADER LINE.

DATA: i_d020t TYPE STANDARD TABLE OF ty_d020t WITH HEADER LINE.

DATA: hdr TYPE d020s,
      fld TYPE STANDARD TABLE OF d021s WITH HEADER LINE,
      src TYPE STANDARD TABLE OF d022s WITH HEADER LINE,
      mat TYPE STANDARD TABLE OF d023s WITH HEADER LINE.

CONSTANTS:
           stars(64)          VALUE
'****************************************************************',
                                                            "#EC NOTEXT
           comment1(64)       VALUE
'*   THIS FILE IS GENERATED BY THE SCREEN PAINTER.              *',
                                                            "#EC NOTEXT
           comment2(64)       VALUE
'*   NEVER CHANGE IT MANUALLY, PLEASE !                         *',
                                                            "#EC NOTEXT
           dynpro_text(8)     VALUE '%_DYNPRO',             "#EC NOTEXT
           header_text(8)     VALUE '%_HEADER',             "#EC NOTEXT
           params_text(8)     VALUE '%_PARAMS',             "#EC NOTEXT
           descript_text(13)  VALUE '%_DESCRIPTION',        "#EC NOTEXT
           fields_text(8)     VALUE '%_FIELDS',             "#EC NOTEXT
           kreuz(1)           VALUE 'x',                    "#EC NOTEXT
           flowlogic_text(11) VALUE '%_FLOWLOGIC'.          "#EC NOTEXT
DATA: header_char TYPE scr_chhead.
DATA: fields_char TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
DATA: dynp_char TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
DATA: prog_len     TYPE p.
DATA: BEGIN OF dynp,
        prog TYPE d020s-prog,
        dnum TYPE d020s-dnum,
      END OF dynp.
DATA:
*     scrp_rel  TYPE dynp_rel_type VALUE '4.02'.  "Rel. Scrp. 4.02
      scrp_rel  TYPE dynp_rel_type VALUE '4.60'.  "Rel. Scrp. 4.6A
DATA  dynp_rel  TYPE dynp_rel_type.    "akt. Rel. Dynpro
DATA: dynpro_rel(4).
DATA  status.
DATA  prog_len_akt TYPE p.
DATA  release.
DATA  rows  LIKE sy-curow.
DATA  lines LIKE sy-cucol.

DATA: filename TYPE string.

DATA: subrc LIKE sy-subrc.
DATA: os(10).
DATA: delux VALUE '/'.
DATA: delwn VALUE '\'.
DATA: delim.
DATA: dirux(80) VALUE '-l>dir.tmp'.
DATA: dirwn(80) VALUE '/Q /Cdir>dir.tmp'.
DATA: command(80).
DATA: shellux(80) VALUE 'bash'.
DATA: shellwn(80) VALUE 'cmd.exe'.
DATA: shell(80).
DATA: datei     TYPE rlgrap-filename.
DATA: answer.
DATA: incname   TYPE d010inc-include.
DATA: repname   TYPE d010inc-include.
DATA: rest1     TYPE d010inc-include.
DATA: rest2     TYPE d010inc-include.
DATA: kz_renam.
DATA: classname TYPE seoclsname.
DATA: classtype(2).


SELECT-OPTIONS:   report   FOR trdir-name,
                  cnam     FOR trdir-cnam MATCHCODE OBJECT user_addr,
                  unam     FOR trdir-unam MATCHCODE OBJECT user_addr,
                  devclass FOR tadir-devclass,
                  subc     FOR trdir-subc,
                  RSTAT    FOR trdir-rstat,
                  cdat     FOR trdir-cdat,
                  udat   for trdir-udat.
PARAMETERS:       pfad(80) LOWER CASE DEFAULT 'F:\ABAPs\'.
SELECTION-SCREEN: SKIP.
PARAMETERS:       r3_l   RADIOBUTTON GROUP func,
                  r3_d   RADIOBUTTON GROUP func,
                  r3_d_l RADIOBUTTON GROUP func,
                  d_l    RADIOBUTTON GROUP func,
                  d_r3   RADIOBUTTON GROUP func,
                  d_r3_l RADIOBUTTON GROUP func,
                  alle AS CHECKBOX,
                  suffix(80) LOWER CASE.


INITIALIZATION.
  CALL FUNCTION 'WS_QUERY'
       EXPORTING
*           ENVIRONMENT    = ' '
*           FILENAME       = ' '
            query          = 'OS'
*           WINID          = ' '
       IMPORTING
            return         = os
       EXCEPTIONS
            inv_query      = 1
            no_batch       = 2
            frontend_error = 3
            OTHERS         = 4.
  IF sy-subrc = 0 AND
     ( os CS 'OS2' OR os CS 'DOS' OR os CS 'NT' ).
    delim = delwn.
    command = dirwn.
    shell = shellwn.
  ELSE.
    delim = delux.
    command = dirux.
    shell = shellux.
  ENDIF.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfad.
  GET CURSOR FIELD pfad VALUE pfad.
  filename = pfad.
  PERFORM fileselector.


AT SELECTION-SCREEN.
  IF report[] IS INITIAL.
    IF NOT reports[] IS INITIAL.
      report = 'IEQ'.
      report-low = reports.
      APPEND report.
      MESSAGE i208(00) WITH 'Reportname wurde ebenfalls ermittelt'(009).
*    &
    ELSE.
      MESSAGE e208(00)
              WITH 'Bitte Report angeben oder Pfad auswфhlen'(011).
*    &
    ENDIF.
  ENDIF.


START-OF-SELECTION.
  FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
  eu_key-sprsl = sy-langu.
  IF NOT r3_d   IS INITIAL OR
     NOT r3_l   IS INITIAL OR
     NOT r3_d_l IS INITIAL.
*   DOWNLOAD
    SELECT name  FROM trdir
           INTO  TABLE reports
           WHERE name IN report
           AND   cnam IN cnam
           AND   unam IN UNAM
           AND   subc IN subc
           AND   rstat IN rstat
           AND   cdat IN cdat
           AND   udat IN udat.
    LOOP AT reports.
* pr№fen ob Report in Entwicklungsklasse enthalten ist
      classtype = reports+30.
      IF reports(5) NE 'CL_O2'.
        IF classtype = 'CP'.
          tadir-obj_name = reports.
          SHIFT tadir-obj_name RIGHT DELETING TRAILING space.
          SHIFT tadir-obj_name RIGHT BY 2 PLACES.
          SHIFT tadir-obj_name RIGHT DELETING TRAILING '='.
          SHIFT tadir-obj_name LEFT DELETING LEADING space.
          SELECT SINGLE * FROM  tadir
                 WHERE  pgmid     = 'R3TR'
                 AND    object    = 'CLAS'
                 AND    obj_name  = tadir-obj_name
                 AND    devclass  IN devclass.
        ELSEIF reports(4) = 'SAPL'.
          SELECT SINGLE * FROM  tadir
                 WHERE  pgmid     = 'R3TR'
                 AND    object    = 'FUGR'
                 AND    obj_name  = reports
                 AND    devclass  IN devclass.
        ELSE.
          SELECT SINGLE * FROM  tadir
                 WHERE  pgmid     = 'R3TR'
                 AND    object    = 'PROG'
                 AND    obj_name  = reports
                 AND    devclass  IN devclass.
        ENDIF.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
      ENDIF.
      REFRESH: i_repsrc, i_reptx, i_reptxt, i_inc,
               sta4, ctx4, fun4, mtx4, doc4, tit4, men4, act4, but4,
               pfk4, set4, stx4, biv46c,
               i_d020t, i_adm4,
               i_tmd, i_tfd, i_cls, i_cdf, i_clx, i_clt, i_cmr, i_cmp,
               i_cmd, i_cmx, i_cmt, i_irl, i_mat, i_mac, i_red, i_frd,
               i_tpl, i_sco, i_scd, i_scx, i_sct, i_cmd_t, i_scd_t.
      CLEAR: adm4.
      eu_key-name  = reports.
      READ REPORT reports INTO i_repsrc.
      READ TEXTPOOL reports INTO i_reptx.
      LOOP AT i_reptx.
        MOVE-CORRESPONDING i_reptx TO i_reptxt.
        APPEND i_reptxt.
      ENDLOOP.
      IF NOT r3_l IS INITIAL OR
         NOT r3_d_l IS INITIAL.
        PERFORM show_rep.
      ENDIF.
      IF classtype = 'CP' OR classtype = 'IP'.
        classname = reports(30).
        TRANSLATE classname USING '= '.
        SELECT * FROM tmdir INTO TABLE i_tmd
               WHERE classname = classname.
        SELECT * FROM seoclass   INTO TABLE i_cls
               WHERE clsname = classname.
        SELECT * FROM seoclassdf INTO TABLE i_cdf
               WHERE clsname = classname.
        SELECT * FROM seoclassex INTO TABLE i_clx
               WHERE clsname = classname.
        SELECT * FROM seoclasstx INTO TABLE i_clt
               WHERE clsname = classname.
        SELECT * FROM seometarel INTO TABLE i_cmr
               WHERE clsname = classname.
        SELECT * FROM seocompo   INTO TABLE i_cmp
               WHERE clsname = classname.
        SELECT * FROM seocompodf INTO TABLE i_cmd
               WHERE clsname = classname.
        LOOP AT i_cmd.
          MOVE-CORRESPONDING i_cmd TO i_cmd_t.
          APPEND i_cmd_t.
        ENDLOOP.
        SELECT * FROM seocompoex INTO TABLE i_cmx
               WHERE clsname = classname.
        SELECT * FROM seocompotx INTO TABLE i_cmt
               WHERE clsname = classname.
        SELECT * FROM seoimplrel INTO TABLE i_irl
               WHERE clsname = classname.
        SELECT * FROM seomapatt  INTO TABLE i_mat
               WHERE clsname = classname.
        SELECT * FROM seomapcls  INTO TABLE i_mac
               WHERE clsname = classname.
        SELECT * FROM seoredef   INTO TABLE i_red
               WHERE clsname = classname.
        SELECT * FROM seofriends INTO TABLE i_frd
               WHERE clsname = classname.
        SELECT * FROM seotypepls INTO TABLE i_tpl
               WHERE clsname = classname.
        SELECT * FROM seosubco   INTO TABLE i_sco
               WHERE clsname = classname.
        SELECT * FROM seosubcodf INTO TABLE i_scd
               WHERE clsname = classname.
        LOOP AT i_scd.
          MOVE-CORRESPONDING i_scd TO i_scd_t.
          APPEND i_scd_t.
        ENDLOOP.
        SELECT * FROM seosubcoex INTO TABLE i_scx
               WHERE clsname = classname.
        SELECT * FROM seosubcotx INTO TABLE i_sct
               WHERE clsname = classname.
      ELSE.
        CLEAR classtype.
      ENDIF.
      SELECT * FROM tfdir INTO TABLE i_tfd
             WHERE pname = reports.
      CALL FUNCTION 'RS_CUA_INTERNAL_FETCH'
           EXPORTING
                program         = reports
*               LANGUAGE        =
*               STATE           = 'A'
           IMPORTING
                adm             = adm4
*               LANGU           =
*               AUTHOR          =
*               DATE            =
*               TIME            =
*               CAUTHOR         =
*               CDATE           =
*               CTIME           =
*               GDATE           =
*               GTIME           =
           TABLES
                sta             = sta4
                fun             = fun4
                men             = men4
                mtx             = mtx4
                act             = act4
                but             = but4
                pfk             = pfk4
                set             = set4
                doc             = doc4
                tit             = tit4
                biv             = biv46c
           EXCEPTIONS
                not_found       = 1
                unknown_version = 2
                OTHERS          = 3.
      SELECT ddnr text_line FROM title INTO TABLE tit
             WHERE ddlanguage = eu_key-sprsl AND
                   progname   = eu_key-name.
      SELECT * FROM rsmptexts INTO TABLE stx4
             WHERE progname   = eu_key-name AND
                   sprsl = eu_key-sprsl.
      SELECT prog dynr dtxt FROM d020t INTO TABLE i_d020t
             WHERE prog = reports AND
                   NOT dtxt LIKE 'SEL_SCREEN%'.
      IF NOT classtype IS INITIAL.
        reports = classname.
      ENDIF.
      TRANSLATE reports TO LOWER CASE.
      TRANSLATE reports USING '/.'.
      IF NOT r3_d   IS INITIAL OR
         NOT r3_d_l IS INITIAL.
        CONCATENATE pfad reports suffix '.txt' INTO filename.
        PERFORM download TABLES i_repsrc USING filename
                         'Source'(003).
        IF NOT i_reptxt[] IS INITIAL.
          CONCATENATE pfad reports suffix '_txt.txt' INTO filename.
          PERFORM download TABLES i_reptxt USING filename
                           'Textelements'(004).
        ENDIF.
      ENDIF.
      SELECT include FROM d010inc INTO TABLE i_inc
             WHERE master = eu_key-name.
      DELETE i_inc WHERE table_line(1) = '<'.
      DELETE i_inc WHERE table_line(1) = '>'.
      DELETE i_inc WHERE table_line = 'DB__SSEL'.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_inc[] IS INITIAL.
        CONCATENATE pfad reports suffix '_inc.txt' INTO filename.
        PERFORM download TABLES i_inc USING filename
                         'Include List'(033).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_tmd[] IS INITIAL.
        CONCATENATE pfad reports suffix '_tmd.txt' INTO filename.
        PERFORM download TABLES i_tmd USING filename
                         'Methods List'(048).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cls[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cls.txt' INTO filename.
        PERFORM download TABLES i_cls USING filename
                         'Class Entry'(050).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cdf[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cdf.txt' INTO filename.
        PERFORM download TABLES i_cdf USING filename
                         'Class Definition'(051).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_clx[] IS INITIAL.
        CONCATENATE pfad reports suffix '_clx.txt' INTO filename.
        PERFORM download TABLES i_clx USING filename
                         'Class Remote Info'(052).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_clt[] IS INITIAL.
        CONCATENATE pfad reports suffix '_clt.txt' INTO filename.
        PERFORM download TABLES i_clt USING filename
                         'Class Description'(053).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cmr[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cmr.txt' INTO filename.
        PERFORM download TABLES i_cmr USING filename
                         'Class Meta Relations'(054).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cmp[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cmp.txt' INTO filename.
        PERFORM download TABLES i_cmp USING filename
                         'Class Components'(055).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cmd_t[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cmd.txt' INTO filename.
        PERFORM download TABLES i_cmd_t USING filename
                         'Class Components Definitions'(056).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cmx[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cmx.txt' INTO filename.
        PERFORM download TABLES i_cmx USING filename
                         'Class Components Remote Infos'(057).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_cmt[] IS INITIAL.
        CONCATENATE pfad reports suffix '_cmt.txt' INTO filename.
        PERFORM download TABLES i_cmt USING filename
                         'Class Components Descriptions'(058).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_irl[] IS INITIAL.
        CONCATENATE pfad reports suffix '_irl.txt' INTO filename.
        PERFORM download TABLES i_irl USING filename
                         'Class Components Relation Types'(059).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_mat[] IS INITIAL.
        CONCATENATE pfad reports suffix '_mat.txt' INTO filename.
        PERFORM download TABLES i_mat USING filename
                         'Class Mapping Attributes'(060).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_mac[] IS INITIAL.
        CONCATENATE pfad reports suffix '_mac.txt' INTO filename.
        PERFORM download TABLES i_mac USING filename
                         'Class Mapping Classes'(061).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_red[] IS INITIAL.
        CONCATENATE pfad reports suffix '_red.txt' INTO filename.
        PERFORM download TABLES i_red USING filename
                         'Class Redefinitions'(062).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_frd[] IS INITIAL.
        CONCATENATE pfad reports suffix '_frd.txt' INTO filename.
        PERFORM download TABLES i_frd USING filename
                         'Class Friends'(063).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_tpl[] IS INITIAL.
        CONCATENATE pfad reports suffix '_tpl.txt' INTO filename.
        PERFORM download TABLES i_tpl USING filename
                         'Class Type-Pools'(064).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_sco[] IS INITIAL.
        CONCATENATE pfad reports suffix '_sco.txt' INTO filename.
        PERFORM download TABLES i_sco USING filename
                         'Class Sub Components'(065).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_scd_t[] IS INITIAL.
        CONCATENATE pfad reports suffix '_scd.txt' INTO filename.
        PERFORM download TABLES i_scd_t USING filename
                         'Class Sub Components Definitions'(066).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_scx[] IS INITIAL.
        CONCATENATE pfad reports suffix '_scx.txt' INTO filename.
        PERFORM download TABLES i_scx USING filename
                         'Class Sub Components Remote Infos'(067).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_sct[] IS INITIAL.
        CONCATENATE pfad reports suffix '_sct.txt' INTO filename.
        PERFORM download TABLES i_sct USING filename
                         'Class Sub Components Descriptions'(068).
      ENDIF.
      IF ( NOT r3_d   IS INITIAL OR
           NOT r3_d_l IS INITIAL ) AND
           NOT i_tfd[] IS INITIAL.
        CONCATENATE pfad reports suffix '_tfd.txt' INTO filename.
        PERFORM download TABLES i_tfd USING filename
                         'Function List'(049).
      ENDIF.
      IF NOT i_inc[] IS INITIAL.
        LOOP AT i_inc.
          REFRESH: i_reptx, i_reptxt.
          READ REPORT i_inc INTO i_repsrc.
          READ TEXTPOOL i_inc INTO i_reptx.
          LOOP AT i_reptx.
            MOVE-CORRESPONDING i_reptx TO i_reptxt.
            APPEND i_reptxt.
          ENDLOOP.
          IF NOT r3_l IS INITIAL OR
            NOT r3_d_l IS INITIAL.
            PERFORM show_inc.
          ENDIF.
          TRANSLATE i_inc TO LOWER CASE.
          TRANSLATE i_inc USING '/.'.
          IF NOT r3_d   IS INITIAL OR
             NOT r3_d_l IS INITIAL.
            CONCATENATE pfad i_inc suffix '.txt' INTO filename.
            PERFORM download TABLES i_repsrc USING filename
                             'Include Source'(032).
            WRITE: '->', i_inc.
            IF NOT i_reptxt[] IS INITIAL.
              CONCATENATE pfad i_inc suffix '_txt.txt'
                          INTO filename.
              PERFORM download TABLES i_reptxt USING filename
                               'Textelements'(004).
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF NOT i_d020t[] IS INITIAL.
        LOOP AT i_d020t.
          IMPORT DYNPRO hdr fld src mat ID i_d020t.
          CALL FUNCTION 'RS_SCRP_UPGRADE_DYNPRO'
               TABLES
                    f = fld
                    m = mat
               CHANGING
                    h = hdr.
          IF src[] IS INITIAL.
            DELETE i_d020t.
            CHECK 1 = 0.
          ENDIF.
          CLEAR src.
          READ TABLE src INDEX 1.
          IF src-line CS 'Do not change'.
            DELETE i_d020t.
            CHECK 1 = 0.
          ENDIF.
          CALL FUNCTION 'RS_SCRP_GET_SCREEN_INFOS'
               EXPORTING
                    dynnr                 = hdr-dnum
                    progname              = hdr-prog
                    with_fieldlist        = 'X'
               IMPORTING
                    lines                 = lines
                    columns               = rows
               TABLES
                    fieldlist             = fld
               EXCEPTIONS
                    dynpro_does_not_exist = 01
                    no_field_list         = 02.
          hdr-bzmx = lines.
          hdr-bzbr = rows.
          IF NOT r3_l IS INITIAL OR
             NOT r3_d_l IS INITIAL.
            PERFORM show_dyn.
          ENDIF.
          IF NOT r3_d   IS INITIAL OR
             NOT r3_d_l IS INITIAL.
            PERFORM dynpro_download.
          ENDIF.
        ENDLOOP.
        IF ( NOT r3_d   IS INITIAL OR
             NOT r3_d_l IS INITIAL ) AND
           NOT i_d020t[] IS INITIAL.
          CONCATENATE pfad reports suffix '_dyn.txt' INTO filename.
          PERFORM download TABLES i_d020t USING filename
                           'Dynpro List'(040).
        ENDIF.
      ENDIF.
      IF NOT r3_d   IS INITIAL OR
         NOT r3_d_l IS INITIAL.
        IF NOT sta4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_sta.txt' INTO filename.
          PERFORM download TABLES sta4 USING filename
                           'GUI Status'(013).
        ENDIF.
        IF NOT ctx4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_ctx.txt' INTO filename.
          PERFORM download TABLES ctx4 USING filename
                           'Object Codes'(045).
        ENDIF.
        IF NOT fun4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_fun.txt' INTO filename.
          PERFORM download TABLES fun4 USING filename
                           'Function Texts'(014).
        ENDIF.
        IF NOT men4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_men.txt' INTO filename.
          PERFORM download TABLES men4 USING filename
                           'Menus'(015).
        ENDIF.
        IF NOT tit4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_sti.txt' INTO filename.
          PERFORM download TABLES tit4 USING filename
                           'Title Codes'(042).
        ENDIF.
        IF NOT mtx4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_mtx.txt' INTO filename.
          PERFORM download TABLES mtx4 USING filename
                           'Menu Texts'(016).
        ENDIF.
        IF NOT act4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_act.txt' INTO filename.
          PERFORM download TABLES act4 USING filename
                           'Menu Bars'(047).
        ENDIF.
        IF NOT but4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_but.txt' INTO filename.
          PERFORM download TABLES but4 USING filename
                           'Push Buttons'(018).
        ENDIF.
        IF NOT pfk4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_pfk.txt' INTO filename.
          PERFORM download TABLES pfk4 USING filename
                           'PF Keys'(019).
        ENDIF.
        IF NOT adm4 IS INITIAL.
          APPEND adm4 TO i_adm4.
          CONCATENATE pfad reports suffix '_adm.txt' INTO filename.
          PERFORM download TABLES i_adm4 USING filename
                           'Management Information'(043).
        ENDIF.
        IF NOT set4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_set.txt' INTO filename.
          PERFORM download TABLES set4 USING filename
                           'Function Sets'(020).
        ENDIF.
        IF NOT stx4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_stx.txt' INTO filename.
          PERFORM download TABLES stx4 USING filename
                           'Status Texts'(023).
        ENDIF.
        IF NOT doc4[] IS INITIAL.
          CONCATENATE pfad reports suffix '_doc.txt' INTO filename.
          PERFORM download TABLES doc4 USING filename
                           'Status Short Texts'(024).
        ENDIF.
        IF NOT biv46c[] IS INITIAL.
          CONCATENATE pfad reports suffix '_biv.txt' INTO filename.
          PERFORM download TABLES biv46c USING filename
                           'Invariant Functions'(048).
        ENDIF.
        IF NOT tit[] IS INITIAL.
          CONCATENATE pfad reports suffix '_tit.txt' INTO filename.
          PERFORM download TABLES tit USING filename
                           'Title Bars'(030).
        ENDIF.
      ENDIF.
      ULINE.
    ENDLOOP.
  ELSEIF NOT d_r3   IS INITIAL OR
         NOT d_l    IS INITIAL OR
         NOT d_r3_l IS INITIAL.
*   UPLOAD
    IF NOT alle IS INITIAL.
      PERFORM ls.
    ENDIF.
    IF reports[] IS INITIAL.
      filename = report-low.
      subrc = 99.
      WHILE subrc NE 0.
        PERFORM fileselector.
        IF subrc NE 0.
          EXIT.
        ENDIF.
      ENDWHILE.
    ENDIF.
    LOOP AT reports.
      REFRESH: i_repsrc, i_reptx, i_reptxt, i_inc,
               sta4, ctx4, fun4, mtx4, doc4, tit4, men4, act4, but4,
               pfk4, set4, stx4, biv46c,
               i_d020t, i_adm4,
               i_tmd, i_tfd, i_cls, i_cdf, i_clx, i_clt, i_cmr, i_cmp,
               i_cmd, i_cmx, i_cmt, i_irl, i_mat, i_mac, i_red, i_frd,
               i_tpl, i_sco, i_scd, i_scx, i_sct, i_cmd_t, i_scd_t.
      CLEAR: adm4, kz_renam.
      eu_key-name  = reports.
      TRANSLATE eu_key-name TO UPPER CASE.
      TRANSLATE reports TO LOWER CASE.
      CONCATENATE pfad reports suffix '.txt' INTO filename.
      PERFORM upload TABLES i_repsrc USING filename 'Source'(003) ' '.
      IF subrc = 0.
        CLEAR classtype.
        LOOP AT i_repsrc TO 10.
          TRANSLATE i_repsrc TO UPPER CASE.
          IF i_repsrc CS 'CLASS-POOL '.
            classtype = 'CP'.
            EXIT.
          ENDIF.
          IF i_repsrc CS 'INTERFACE-POOL '.
            classtype = 'IP'.
            EXIT.
          ENDIF.
          IF i_repsrc CS 'REPORT '  OR i_repsrc CS 'MODULPOOL '  OR
             i_repsrc CS 'PROGRAM ' OR
             i_repsrc CS 'SYSTEM-DEFINED '.
            EXIT.
          ENDIF.
        ENDLOOP.
        IF NOT ( i_repsrc CS 'REPORT '  OR i_repsrc CS 'MODULPOOL '  OR
                 i_repsrc CS 'PROGRAM ' OR
                 i_repsrc CS 'SYSTEM-DEFINED ' OR
                 i_repsrc CS 'CLASS-POOL ' OR
                 i_repsrc CS 'INTERFACE-POOL ' ).
          WRITE: / filename,
                   'doesn''t contain valid program source'(012).
          subrc = 99.
        ENDIF.
      ENDIF.
      CHECK subrc = 0.
      CONCATENATE pfad reports '_txt.txt' INTO filename.
      PERFORM upload TABLES i_reptxt USING filename
                     'Textelements'(004) ' '.
      LOOP AT i_reptxt.
        MOVE-CORRESPONDING i_reptxt TO i_reptx.
        APPEND i_reptx.
      ENDLOOP.
      CONCATENATE pfad reports '_inc.txt' INTO filename.
      PERFORM upload TABLES i_inc USING filename
                     'Include List'(033) 'X'.
      CONCATENATE pfad reports '_tmd.txt' INTO filename.
      PERFORM upload TABLES i_tmd USING filename
                     'Methods List'(048) 'X'.
      CONCATENATE pfad reports '_cls.txt' INTO filename.
      PERFORM upload TABLES i_cls USING filename
                     'Class Entry'(050) 'X'.
      CONCATENATE pfad reports '_cdf.txt' INTO filename.
      PERFORM upload TABLES i_cdf USING filename
                     'Class Definition'(051) 'X'.
      CONCATENATE pfad reports '_clx.txt' INTO filename.
      PERFORM upload TABLES i_clx USING filename
                     'Class Remote Info'(052) 'X'.
      CONCATENATE pfad reports '_clt.txt' INTO filename.
      PERFORM upload TABLES i_clt USING filename
                     'Class Description'(053) 'X'.
      CONCATENATE pfad reports '_cmr.txt' INTO filename.
      PERFORM upload TABLES i_cmr USING filename
                     'Class Meta Relations'(054) 'X'.
      CONCATENATE pfad reports '_cmp.txt' INTO filename.
      PERFORM upload TABLES i_cmp USING filename
                     'Class Components'(055) 'X'.
      CONCATENATE pfad reports '_cmd.txt' INTO filename.
      PERFORM upload TABLES i_cmd_t USING filename
                     'Class Components Definitions'(056) 'X'.
      LOOP AT i_cmd_t.
        MOVE-CORRESPONDING i_cmd_t TO i_cmd.
        APPEND i_cmd.
      ENDLOOP.
      CONCATENATE pfad reports '_cmx.txt' INTO filename.
      PERFORM upload TABLES i_cmx USING filename
                     'Class Components Remote Infos'(057) 'X'.
      CONCATENATE pfad reports '_cmt.txt' INTO filename.
      PERFORM upload TABLES i_cmt USING filename
                     'Class Components Descriptions'(058) 'X'.
      CONCATENATE pfad reports '_irl.txt' INTO filename.
      PERFORM upload TABLES i_irl USING filename
                     'Class Components Relation Types'(059) 'X'.
      CONCATENATE pfad reports '_mat.txt' INTO filename.
      PERFORM upload TABLES i_mat USING filename
                     'Class Mapping Attributes'(060) 'X'.
      CONCATENATE pfad reports '_mac.txt' INTO filename.
      PERFORM upload TABLES i_mac USING filename
                     'Class Mapping Classes'(061) 'X'.
      CONCATENATE pfad reports '_red.txt' INTO filename.
      PERFORM upload TABLES i_red USING filename
                     'Class Redefinitions'(062) 'X'.
      CONCATENATE pfad reports '_frd.txt' INTO filename.
      PERFORM upload TABLES i_frd USING filename
                     'Class Friends'(063) 'X'.
      CONCATENATE pfad reports '_tpl.txt' INTO filename.
      PERFORM upload TABLES i_tpl USING filename
                     'Class Type-Pools'(064) 'X'.
      CONCATENATE pfad reports '_sco.txt' INTO filename.
      PERFORM upload TABLES i_sco USING filename
                     'Class Sub Components'(065) 'X'.
      CONCATENATE pfad reports '_scd.txt' INTO filename.
      PERFORM upload TABLES i_scd_t USING filename
                     'Class Sub Components Definitions'(066) 'X'.
      LOOP AT i_scd_t.
        MOVE-CORRESPONDING i_scd_t TO i_scd.
        APPEND i_scd.
      ENDLOOP.
      CONCATENATE pfad reports '_scx.txt' INTO filename.
      PERFORM upload TABLES i_scx USING filename
                     'Class Sub Components Remote Infos'(067) 'X'.
      CONCATENATE pfad reports '_sct.txt' INTO filename.
      PERFORM upload TABLES i_sct USING filename
                     'Class Sub Components Descriptions'(068) 'X'.
      CONCATENATE pfad reports '_tfd.txt' INTO filename.
      PERFORM upload TABLES i_tfd USING filename
                     'Function List'(049) 'X'.
      CONCATENATE pfad reports '_dyn.txt' INTO filename.
      PERFORM upload TABLES i_d020t USING filename
                     'Dynpro List'(040) 'X'.
      CONCATENATE pfad reports '_sta.txt' INTO filename.
      PERFORM upload TABLES sta4 USING filename
                     'GUI Status'(013) 'X'.
      CONCATENATE pfad reports '_ctx.txt' INTO filename.
      PERFORM upload TABLES ctx4 USING filename
                     'Object Codes'(045) 'X'.
      CONCATENATE pfad reports '_fun.txt' INTO filename.
      PERFORM upload TABLES fun4 USING filename
                     'Function Texts'(014) 'X'.
      CONCATENATE pfad reports '_men.txt' INTO filename.
      PERFORM upload TABLES men4 USING filename
                     'Menus'(015) 'X'.
      CONCATENATE pfad reports '_mtx.txt' INTO filename.
      PERFORM upload TABLES mtx4 USING filename
                     'Menu Texts'(016) 'X'.
      CONCATENATE pfad reports '_act.txt' INTO filename.
      PERFORM upload TABLES act4 USING filename
                     'Menu Bars'(047) 'X'.
      CONCATENATE pfad reports '_sti.txt' INTO filename.
      PERFORM upload TABLES tit4 USING filename
                     'Title Codes'(042) 'X'.
      CONCATENATE pfad reports '_but.txt' INTO filename.
      PERFORM upload TABLES but4 USING filename
                     'Push Buttons'(018) 'X'.
      CONCATENATE pfad reports '_pfk.txt' INTO filename.
      PERFORM upload TABLES pfk4 USING filename
                     'PF Keys'(019) 'X'.
      CONCATENATE pfad reports '_set.txt' INTO filename.
      PERFORM upload TABLES set4 USING filename
                     'Function Sets'(020) 'X'.
      CONCATENATE pfad reports '_adm.txt' INTO filename.
      PERFORM upload TABLES i_adm4 USING filename
                     'Management Information'(043) 'X'.
      READ TABLE i_adm4 INTO adm4 INDEX 1.
      CONCATENATE pfad reports '_doc.txt' INTO filename.
      PERFORM upload TABLES doc4 USING filename
                     'Status Texts'(023) 'X'.
      CONCATENATE pfad reports '_tit.txt' INTO filename.
      PERFORM upload TABLES tit USING filename
                     'Title Bars'(030) 'X'.
      CONCATENATE pfad reports '_stx.txt' INTO filename.
      PERFORM upload TABLES stx4 USING filename
                     'Status Texts'(023) 'X'.
      CONCATENATE pfad reports '_biv.txt' INTO filename.
      PERFORM upload TABLES biv46c USING filename
                     'Invariant Functions'(048) 'X'.
      TRANSLATE reports USING './'.
      IF alle IS INITIAL.
        repname = reports.
        reports = report-low.
        IF classtype = 'CP' OR classtype = 'CI'.
          OVERLAY reports(30) WITH '=============================='.
          reports+30 = classtype.
        ENDIF.
        eu_key-name = reports.
      ENDIF.
      TRANSLATE repname TO UPPER CASE.
      IF reports(3) = 'SAP' AND reports(5) = repname(5) AND
         reports NE repname.
        rest1 = repname+4.
        rest2 = reports+4.
      ELSE.
        CLEAR: rest1, rest2.
      ENDIF.
      PERFORM repchange.
      IF NOT d_l IS INITIAL OR
         NOT d_r3_l IS INITIAL.
        PERFORM show_rep.
      ENDIF.
      IF NOT d_r3   IS INITIAL OR
         NOT d_r3_l IS INITIAL.
        IF classtype IS INITIAL.
          INSERT REPORT reports FROM i_repsrc.
        ELSE.
          INSERT REPORT reports FROM i_repsrc
                        EXTENSION TYPE classtype.
        ENDIF.
        subrc = sy-subrc.
        WRITE: / reports, (40) 'Source'(003).
        IF subrc = 0.
          WRITE: 'successfully saved'(007).
        ELSE.
          WRITE: 'not saved,  RC ='(008), subrc.
        ENDIF.
        CHECK subrc = 0.
        IF NOT i_reptxt[] IS INITIAL.
          INSERT TEXTPOOL reports FROM i_reptx LANGUAGE sy-langu.
          subrc = sy-subrc.
          WRITE: / reports, (40) 'Textelements'(004).
          IF subrc = 0.
            WRITE: 'successfully saved'(010).
          ELSE.
            WRITE: 'not saved,  RC ='(008), subrc.
          ENDIF.
        ENDIF.
        PERFORM update TABLES i_tmd USING 'TMDIR'
                       'Methods List'(048).
        PERFORM update TABLES i_cls USING 'SEOCLASS'
                       'Class Entry'(050).
        PERFORM update TABLES i_cdf USING 'SEOCLASSDF'
                       'Class Definition'(051).
        PERFORM update TABLES i_clx USING 'SEOCLASSEX'
                       'Class Remote Info'(052).
        PERFORM update TABLES i_clt USING 'SEOCLASSTX'
                       'Class Description'(053).
        PERFORM update TABLES i_cmr USING 'SEOMETAREL'
                       'Class Meta Relations'(054).
        PERFORM update TABLES i_cmp USING 'SEOCOMPO'
                       'Class Components'(055).
        PERFORM update TABLES i_cmd USING 'SEOCOMPODF'
                       'Class Components Definitions'(056).
        PERFORM update TABLES i_cmx USING 'SEOCOMPOEX'
                       'Class Components Remote Infos'(057).
        PERFORM update TABLES i_cmt USING 'SEOCOMPOTX'
                       'Class Components Descriptions'(058).
        PERFORM update TABLES i_irl USING 'SEOIMPLREL'
                       'Class Components Relation Types'(059).
        PERFORM update TABLES i_mat USING 'SEOMAPATT'
                       'Class Mapping Attributes'(060).
        PERFORM update TABLES i_mac USING 'SEOMAPCLS'
                       'Class Mapping Classes'(061).
        PERFORM update TABLES i_red USING 'SEOREDEF'
                       'Class Redefinitions'(062).
        PERFORM update TABLES i_frd USING 'SEOFRIENDS'
                       'Class Friends'(063).
        PERFORM update TABLES i_tpl USING 'SEOTYPEPLS'
                       'Class Type-Pools'(064).
        PERFORM update TABLES i_sco USING 'SEOSUBCO'
                       'Class Sub Components'(065).
        PERFORM update TABLES i_scd USING 'SEOSUBCODF'
                       'Class Sub Components Definitions'(066).
        PERFORM update TABLES i_scx USING 'SEOSUBCOEX'
                       'Class Sub Components Remote Infos'(067).
        PERFORM update TABLES i_sct USING 'SEOSUBCOTX'
                       'Class Sub Components Descriptions'(068).
        PERFORM update TABLES i_tfd USING 'TFDIR'
                       'Function List'(049).
      ENDIF.
      LOOP AT i_inc.
        TRANSLATE i_inc TO UPPER CASE.
        incname = i_inc.
        classtype = i_inc+30.
        IF NOT rest1 IS INITIAL.
          CALL FUNCTION 'STRING_REPLACE'
               EXPORTING
                    pattern             = rest1
                    substitute          = rest2
*                   MAX_REPLACES        = 0
*              IMPORTING
*                   NUMBER_OF_REPLACES  =
               CHANGING
                    text                = i_inc
               EXCEPTIONS
                    wrong_string_length = 1
                    OTHERS              = 2.
        ENDIF.
        IF NOT d_r3   IS INITIAL OR
           NOT d_r3_l IS INITIAL.
          READ REPORT i_inc INTO i_repsrc.
          IF sy-subrc = 0.
            CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
                 EXPORTING
                      defaultoption  = 'N'
                      textline1 =
                        'Soll das Include №berschrieben werden?'(034)
                      textline2      = i_inc
                      titel          = 'Include existiert bereits!'(039)
*                     START_COLUMN   = 25
*                     START_ROW      = 6
*                     CANCEL_DISPLAY = 'X'
                 IMPORTING
                      answer         = answer
                 EXCEPTIONS
                      OTHERS         = 1.
            CHECK answer = 'J'.
          ENDIF.
        ENDIF.
        REFRESH: i_repsrc, i_reptx, i_reptxt.
        TRANSLATE incname TO LOWER CASE.
        CONCATENATE pfad incname '.txt' INTO filename.
        PERFORM upload TABLES i_repsrc USING filename
                       'Include Source'(032) ' '.
        PERFORM repchange.
        CONCATENATE pfad incname '_txt.txt' INTO filename.
        PERFORM upload TABLES i_reptxt USING filename
                       'Textelements'(004) ' '.
        LOOP AT i_reptxt.
          MOVE-CORRESPONDING i_reptxt TO i_reptx.
          APPEND i_reptx.
        ENDLOOP.
        IF NOT d_l IS INITIAL OR
           NOT d_r3_l IS INITIAL.
          PERFORM show_inc.
        ENDIF.
        IF NOT d_r3   IS INITIAL OR
           NOT d_r3_l IS INITIAL.
          TRANSLATE i_inc USING './'.
          IF classtype IS INITIAL.
            INSERT REPORT i_inc FROM i_repsrc.
          ELSE.
            INSERT REPORT i_inc FROM i_repsrc
                          EXTENSION TYPE classtype.
          ENDIF.
          subrc = sy-subrc.
          WRITE: / i_inc, (40) 'Include Source'(032).
          IF subrc = 0.
            WRITE: 'successfully saved'(007).
          ELSE.
            WRITE: 'not saved,  RC ='(008), subrc.
          ENDIF.
          IF NOT i_reptx[] IS INITIAL.
            INSERT TEXTPOOL i_inc FROM i_reptx LANGUAGE sy-langu.
            subrc = sy-subrc.
            WRITE: / i_inc, (40) 'Textelements'(004).
            IF subrc = 0.
              WRITE:
              'successfully saved'(010).
            ELSE.
              WRITE: 'not saved,  RC ='(008), subrc.
            ENDIF.
          ENDIF.
          d010inc-master  = reports.
          d010inc-include = i_inc.
          INSERT d010inc.
        ENDIF.
      ENDLOOP.
      LOOP AT i_d020t.
        TRANSLATE i_d020t-prog TO UPPER CASE.
        IF NOT d_r3   IS INITIAL OR
           NOT d_r3_l IS INITIAL.
          PERFORM dynpro_upload.
          IF NOT d_l IS INITIAL OR
             NOT d_r3_l IS INITIAL.
            PERFORM show_dyn.
          ENDIF.
          i_d020t-prog = reports.
          EXPORT DYNPRO hdr fld src mat ID i_d020t.
          subrc = sy-subrc.
          WRITE: / i_d020t-prog, i_d020t-dynr, (15) 'Dynpro'(041).
          IF subrc = 0.
            WRITE: 'successfully saved'(010).
          ELSE.
            WRITE: 'not saved,  RC ='(008), subrc.
          ENDIF.
        ENDIF.
      ENDLOOP.
      IF NOT d_r3   IS INITIAL OR
         NOT d_r3_l IS INITIAL.
        IF NOT sta4[] IS INITIAL.
          CALL FUNCTION 'RS_CUA_INTERNAL_WRITE'
               EXPORTING
                    program   = reports
                    language  = sy-langu
                    tr_key    = trkey
                    adm       = adm4
*                   STATE     =
               TABLES
                    sta       = sta4
                    fun       = fun4
                    men       = men4
                    mtx       = mtx4
                    act       = act4
                    but       = but4
                    pfk       = pfk4
                    set       = set4
                    doc       = doc4
                    tit       = tit4
                    biv       = biv46c
               EXCEPTIONS
                    not_found = 1
                    OTHERS    = 2.
          subrc = sy-subrc.
          IF subrc = 0.
            MODIFY rsmptexts FROM TABLE stx4.
            subrc = sy-subrc.
          ENDIF.
          WRITE: / reports, (40) 'GUI Status ...'(031).
          IF subrc = 0.
            WRITE: 'successfully saved'(010).
          ELSE.
            WRITE: 'not saved,  RC ='(008), subrc.
          ENDIF.
        ENDIF.
        IF NOT tit[] IS INITIAL.
          title-ddlanguage = sy-langu.
          title-progname   = reports.
          LOOP AT tit.
            title-ddnr = tit-code.
            title-text_line = tit-text.
            MODIFY title.
          ENDLOOP.
          WRITE: / reports, (40) 'Title Bars'(030).
          IF sy-subrc = 0.
            WRITE: 'successfully saved'(010).
          ELSE.
            WRITE: 'not saved,  RC ='(008), subrc.
          ENDIF.
        ENDIF.
      ENDIF.
      ULINE.
    ENDLOOP.
    IF NOT i_inc[] IS INITIAL.
      MESSAGE i208(00) WITH
              'Includes wurden ggf. umbenannt, bitte pr№fen!'(044).
    ENDIF.
  ENDIF.
  REFRESH reports.
Back to top
View user's profile Send private message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Sun Feb 03, 2008 1:50 am    Post subject: Reply with quote

Code:

*&---------------------------------------------------------------------*
*&      Form  DOWNLOAD
*&---------------------------------------------------------------------*
FORM download TABLES   tabelle
              USING    value(filename)
                       component.
  CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
*           BIN_FILESIZE            = ' '
            filename                = filename
            filetype                = 'ASC'
*      IMPORTING
*           FILELENGTH              =
       TABLES
            data_tab                = tabelle
       EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            OTHERS                  = 5.
  WRITE: / reports, (40) component.
  IF sy-subrc = 0.
    WRITE: 'successfully downloaded'(001).
  ELSE.
    WRITE: 'not downloaded,  RC ='(002), sy-subrc.
  ENDIF.
ENDFORM.                                                    " DOWNLOAD

*&---------------------------------------------------------------------*
*&      Form  FILESELECTOR
*&---------------------------------------------------------------------*
FORM fileselector.
  DATA: repname(80).
  DATA: fdpos(2) TYPE p.

  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
*           DEF_FILENAME     = ' '
            def_path         = pfad
            mask             = ',*.txt,*.txt.'
            mode             = 'O'
*           TITLE            = ' '
       IMPORTING
            filename         = datei
*           RC               =
       EXCEPTIONS
            inv_winsys       = 1
            no_batch         = 2
            selection_cancel = 3
            selection_error  = 4
            OTHERS           = 5.
  subrc = sy-subrc.
  pfad = datei.
  CLEAR: sy-fdpos, sy-subrc.
  fdpos = 1.
  WHILE sy-subrc = 0.
    fdpos = fdpos + sy-fdpos + 1.
    SEARCH pfad FOR delim STARTING AT fdpos.
  ENDWHILE.
  fdpos = fdpos - 1.
  pfad = pfad(fdpos).
  repname = datei.
  CLEAR sy-subrc.
  WHILE sy-subrc = 0.
    SHIFT repname LEFT.
    SHIFT repname LEFT UP TO delim.
  ENDWHILE.
  SHIFT repname RIGHT UP TO '.'.
  SHIFT repname RIGHT.
  SHIFT repname LEFT DELETING LEADING space.
  TRANSLATE repname TO UPPER CASE.
  reports = repname.
  APPEND reports.
ENDFORM.                               " FILESELECTOR

*&---------------------------------------------------------------------*
*&      Form  UPLOAD
*&---------------------------------------------------------------------*
FORM upload TABLES   tabelle
            USING    value(filename)
                     component
                     quiet.
  CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
            filename                = filename
            filetype                = 'ASC'
*      IMPORTING
*           FILELENGTH              =
       TABLES
            data_tab                = tabelle
       EXCEPTIONS
            file_read_error         = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            OTHERS                  = 5.
  subrc = sy-subrc.
  IF quiet IS INITIAL.
    WRITE: / reports, (40) component.
    IF subrc = 0.
      WRITE: 'successfully uploaded'(005).
    ELSE.
      WRITE: 'not uploaded,  RC ='(006), subrc.
    ENDIF.
  ELSEIF subrc = 0.
    WRITE: / reports, (40) component,
             'successfully uploaded'(005).
  ENDIF.
ENDFORM.                                                    " UPLOAD

*&---------------------------------------------------------------------*
*&      Form  update
*&---------------------------------------------------------------------*
FORM update TABLES   tabelle
            USING    dbtab
                     component.
  CHECK NOT tabelle[] IS INITIAL.
  MODIFY (dbtab) FROM TABLE tabelle.
  subrc = sy-subrc.
  WRITE: / reports, (40) component.
  IF subrc = 0.
    WRITE: 'successfully saved'(010).
  ELSE.
    WRITE: 'not saved,  RC ='(008), subrc.
  ENDIF.
ENDFORM.                                                    " update

*&---------------------------------------------------------------------*
*&      Form  LS
*&---------------------------------------------------------------------*
FORM ls.
  TYPES: c80(80).
  DATA: dirtab TYPE STANDARD TABLE OF c80 WITH HEADER LINE.
  DATA: datei TYPE rlgrap-filename.
  DATA: i LIKE sy-tabix.
  DATA: endtime LIKE sy-uzeit.

  CALL FUNCTION 'WS_EXECUTE'
       EXPORTING
*           DOCUMENT       = ' '
            cd             = pfad
            commandline    = command
*           INFORM         = ' '
            program        = shell
*           STAT           = ' '
*           WINID          = ' '
*           OSMAC_SCRIPT   = ' '
*           OSMAC_CREATOR  = ' '
*           WIN16_EXT      = ' '
*           EXEC_RC        = ' '
*      IMPORTING
*           RBUFF          =
       EXCEPTIONS
            frontend_error = 1
            no_batch       = 2
            prog_not_found = 3
            illegal_option = 4
            OTHERS         = 5.
  IF sy-subrc NE 0.
    MESSAGE e001(pc).
*   Fehler beim Ausf№hren des WS_Programms
  ENDIF.
  CONCATENATE pfad 'dir.tmp'  INTO datei.
  GET TIME.
  endtime = sy-uzeit + 3.
  WHILE sy-uzeit < endtime.
    GET TIME.
  ENDWHILE.
  CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
            filename                = datei
            filetype                = 'ASC'
*      IMPORTING
*           FILELENGTH              =
       TABLES
            data_tab                = dirtab
       EXCEPTIONS
            file_read_error         = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            OTHERS                  = 5.
  IF sy-subrc NE 0.
    MESSAGE e001(pc).
*   Fehler beim Ausf№hren des WS_Programms
  ENDIF.
  REFRESH reports.
  i = 1.
  DO.
    SEARCH dirtab FOR '.txt' STARTING AT i.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    READ TABLE dirtab INDEX sy-tabix.
    i = sy-tabix + 1.
    CHECK dirtab NS 'txt_.txt'.
    SHIFT dirtab LEFT UP TO space.
    SHIFT dirtab LEFT DELETING LEADING space.
    SHIFT dirtab LEFT UP TO space.
    SHIFT dirtab LEFT DELETING LEADING space.
    SHIFT dirtab LEFT UP TO space.
    SHIFT dirtab RIGHT UP TO '.'.
    SHIFT dirtab RIGHT.
    SHIFT dirtab LEFT DELETING LEADING space.
    IF NOT dirtab IS INITIAL.
      TRANSLATE dirtab TO LOWER CASE.
      APPEND dirtab TO reports.
    ENDIF.
  ENDDO.
  SORT reports.
  DELETE ADJACENT DUPLICATES FROM reports.
ENDFORM.                                                    " LS

*&---------------------------------------------------------------------*
*&      Form  SHOW_DYN
*&---------------------------------------------------------------------*
FORM show_dyn.
* Ausgabe der Dynpro-Daten
* Kopfdaten f№r Dynpro
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Dynpro Header', AT sy-linsz ''.
  FORMAT COLOR COL_NORMAL.
  WRITE: / 'Programm:',    30 hdr-prog, AT sy-linsz '',
         / 'Dynpro:',      30 hdr-dnum, AT sy-linsz '',
         / 'Folgedynpro:', 30 hdr-fnum, AT sy-linsz ''.
  ULINE.
* Feldliste ausgeben
  FORMAT COLOR COL_TOTAL.
  WRITE:  / 'Feldliste'  COLOR COL_TOTAL, AT sy-linsz ''.
  FORMAT COLOR COL_HEADING.
  WRITE:  / 'Feldname',
         25 'Zeile',
         30 'Spalte',
         37 'TYPE',
         42 'LOOPTyp',
         50 'DDIC',
         55 'FormByte', AT sy-linsz ''.
  CALL FUNCTION 'RS_SCRP_FIELDS_RAW_TO_CHAR'
       TABLES
            fields_int  = fld
            fields_char = fields_char
       EXCEPTIONS
            OTHERS      = 1.
  FORMAT COLOR COL_NORMAL.
  LOOP AT fields_char.
    WRITE: /(24) fields_char-feldname,
              25 fields_char-line,
              30 fields_char-coln,
              37 fields_char-feldformat,
              42 fields_char-looptype,
              50 fields_char-inttyp,
              55 fields_char-fmb1,
              58 fields_char-fmb2.
  ENDLOOP.
  ULINE.
* Ablauflogik anzeigen.
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Ablauflogik', AT sy-linsz ''.
  FORMAT COLOR COL_NORMAL.
  LOOP AT src.
    WRITE: / src-line.
  ENDLOOP.
  ULINE.
  SKIP.
* Matchcode-Daten anzeigen
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Matchcode-Daten', AT sy-linsz ''.
  FORMAT COLOR COL_NORMAL.
  LOOP AT mat.
    WRITE: /(80) mat.
  ENDLOOP.
  IF sy-subrc NE 0.
    WRITE / ' keine Matchcode-Daten vorhanden ' COLOR COL_NEGATIVE.
  ENDIF.
  NEW-PAGE.
ENDFORM.                                                    " SHOW_DYN

*&---------------------------------------------------------------------*
*&      Form  SHOW_REP
*&---------------------------------------------------------------------*
FORM show_rep.
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Programm:', reports, AT sy-linsz ''.
  FORMAT COLOR COL_BACKGROUND.
  LOOP AT i_repsrc.
    WRITE: / i_repsrc.
  ENDLOOP.
  ULINE.
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Textelemente zu Programm:', reports, AT sy-linsz ''.
  FORMAT COLOR COL_HEADING.
  WRITE:  / 'Typ',
          5 'Schl№ssel',
         20 'Lфnge',
         30 'Text', AT sy-linsz ''.
  FORMAT COLOR COL_NORMAL.
  LOOP AT i_reptxt.
    WRITE: / i_reptxt-id,
           5 i_reptxt-key,
       20(4) i_reptxt-length,
      30(80) i_reptxt-entry.
  ENDLOOP.
  NEW-PAGE.
ENDFORM.                                                    " SHOW_REP

*&---------------------------------------------------------------------*
*&      Form  SHOW_INC
*&---------------------------------------------------------------------*
FORM show_inc.
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Include:', i_inc, AT sy-linsz ''.
  FORMAT COLOR COL_BACKGROUND.
  LOOP AT i_repsrc.
    WRITE: / i_repsrc.
  ENDLOOP.
  ULINE.
  FORMAT COLOR COL_TOTAL.
  WRITE: / 'Textelemente zu Include:', i_inc, AT sy-linsz ''.
  FORMAT COLOR COL_HEADING.
  WRITE:  / 'Typ',
          5 'Schl№ssel',
         20 'Lфnge',
         30 'Text', AT sy-linsz ''.
  FORMAT COLOR COL_NORMAL.
  LOOP AT i_reptxt.
    WRITE: / i_reptxt-id,
           5 i_reptxt-key,
       20(4) i_reptxt-length,
      30(80) i_reptxt-entry.
  ENDLOOP.
  NEW-PAGE.
ENDFORM.                                                    " SHOW_INC

*&---------------------------------------------------------------------*
*&      Form  REPCHANGE
*&---------------------------------------------------------------------*
FORM repchange.
  IF NOT rest1 IS INITIAL.
    LOOP AT i_repsrc.
      IF i_repsrc CS 'INCLUDE '.
        CALL FUNCTION 'STRING_REPLACE'
             EXPORTING
                  pattern             = rest1
                  substitute          = rest2
*                 MAX_REPLACES        = 0
*            IMPORTING
*                 NUMBER_OF_REPLACES  =
             CHANGING
                  text                = i_repsrc
             EXCEPTIONS
                  wrong_string_length = 1
                  OTHERS              = 2.
        IF sy-subrc = 0.
          MODIFY i_repsrc.
          kz_renam = 'X'.
        ENDIF.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDFORM.                                                    " REPCHANGE

*&---------------------------------------------------------------------*
*&      Form  DYNPRO_DOWNLOAD
*&---------------------------------------------------------------------*
FORM dynpro_download.
  CALL FUNCTION 'RS_SCRP_HEADER_RAW_TO_CHAR'
       EXPORTING
            header_int  = hdr
       IMPORTING
            header_char = header_char
       EXCEPTIONS
            OTHERS      = 1.

  REFRESH dynp_char.

* Comment
  dynp_char = stars.    APPEND dynp_char.
  dynp_char = comment1. APPEND dynp_char.
  dynp_char = comment2. APPEND dynp_char.
  dynp_char = stars.    APPEND dynp_char.

* Identification
  dynp_char = dynpro_text.      APPEND dynp_char.          "  '%_DYNPRO'
  dynp_char = header_char-prog. APPEND dynp_char.
  dynp_char = header_char-dnum. APPEND dynp_char.
  dynp_char = sy-saprl.         APPEND dynp_char.
  DESCRIBE FIELD i_d020t-prog LENGTH prog_len.
  dynp_char(16) = prog_len.      APPEND dynp_char.

* Header
  dynp_char = header_text.      APPEND dynp_char.     "  '%_HEADER'
  APPEND header_char TO dynp_char.

* Description
  dynp_char = descript_text.    APPEND dynp_char.     "  '%_DESCRIPTION'
  APPEND i_d020t-dtxt TO dynp_char.

* Fieldlist
  dynp_char = fields_text.             "  '%_FIELDS'
  APPEND dynp_char.
  CALL FUNCTION 'RS_SCRP_FIELDS_RAW_TO_CHAR'
       TABLES
            fields_int  = fld
            fields_char = fields_char
       EXCEPTIONS
            OTHERS      = 1.

  LOOP AT fields_char.
    APPEND fields_char TO dynp_char.
  ENDLOOP.

* Flowlogic
  dynp_char = flowlogic_text.          "  '%_FLOWLOGIC'
  APPEND dynp_char.

  LOOP AT src.
    APPEND src TO dynp_char.
  ENDLOOP.
**  refresh flowlogic.                   "vjb 25.06.98


* Dynpro Parameters                      "vjb ab 4.6A (01.07.98)
  dynp_char = params_text.
  APPEND dynp_char.

  LOOP AT mat.
    APPEND mat TO dynp_char.
  ENDLOOP.

* Download
  CONCATENATE pfad reports suffix '_' i_d020t-dynr
              '.txt' INTO filename.
  PERFORM download TABLES dynp_char USING filename 'Dynpro'(041).

ENDFORM.                               " DYNPRO_DOWNLOAD

*&---------------------------------------------------------------------*
*&      Form  DYNPRO_UPLOAD
*&---------------------------------------------------------------------*
FORM dynpro_upload.
  CONCATENATE pfad i_d020t-prog suffix '_' i_d020t-dynr
              '.txt' INTO filename.
  REFRESH dynp_char.
  PERFORM upload TABLES dynp_char USING filename
                       'Dynpro'(041) ' '.

* is it really a dynpro file ?
  READ TABLE dynp_char INDEX 5.
  IF dynp_char <> dynpro_text.         " '%_DYNPRO'
    MESSAGE e250(37).
  ENDIF.

* release test ( < rel. 3)
  READ TABLE dynp_char INDEX 8.

  IF dynp_char(1) < 3.                                    "#EC PORTABLE
    MESSAGE e251(37).
  ENDIF.

* test dynpro name
  READ TABLE dynp_char INDEX 6.
  dynp-prog = dynp_char.
  READ TABLE dynp_char INDEX 7.
  dynp-dnum = dynp_char.
  IF dynp-prog <> i_d020t-prog OR dynp-dnum <> i_d020t-dynr.
    WRITE: / reports, (40) 'Dynpro'(041), i_d020t-dynr,
             'enthфlt anderes Dynpro'(046), dynp-dnum.
  ENDIF.

* Neuer Programmname
  i_d020t-prog = reports.

* fill header_char, fields_char, flowlogic, and dynpro parameters
  REFRESH fields_char.
  REFRESH src.
  status = ' '.
  LOOP AT dynp_char.
    CASE dynp_char.
      WHEN dynpro_text.    status = '1'.    " '%_DYNPRO'
      WHEN header_text.    status = 'H'.    " '%_HEADER'
      WHEN descript_text.  status = 'D'.    " '%_DESCRIPT'
      WHEN fields_text.    status = 'F'.    " '%_FIELDS'
      WHEN flowlogic_text. status = 'E'.    " '%_FLOWLOGIC'
      WHEN params_text.    status = 'P'.    " '%_PARAMS'
      WHEN OTHERS.
        CASE status.
          WHEN '1'.
            status = '2'.
          WHEN '2'.
            status = '3'.
          WHEN '3'.
            release = dynp_char(1).
            status = '4'.
          WHEN '4'.
            prog_len = dynp_char.
            status = 'H'.
          WHEN 'H'.
            DESCRIBE FIELD i_d020t-prog LENGTH prog_len_akt.
            MOVE dynp_char(prog_len) TO header_char(prog_len_akt).
            MOVE dynp_char+prog_len  TO header_char+prog_len_akt.
            header_char-prog = i_d020t-prog.
            header_char-dnum = i_d020t-dynr.
            status = ' '.
          WHEN 'D'.
            i_d020t-dtxt = dynp_char.
          WHEN 'F'.
            fields_char = dynp_char.
            APPEND fields_char.
          WHEN 'E'.
            src = dynp_char.
            APPEND src.
          WHEN 'P'.
            mat    = dynp_char.
            APPEND mat.
        ENDCASE.
    ENDCASE.
  ENDLOOP.

* translate header
  CALL FUNCTION 'RS_SCRP_HEADER_CHAR_TO_RAW'
       EXPORTING
            header_char = header_char
       IMPORTING
            header_int  = hdr
       EXCEPTIONS
            OTHERS      = 1.

* translate fieldlist
  CALL FUNCTION 'RS_SCRP_FIELDS_CHAR_TO_RAW'
       TABLES
            fields_int  = fld
            fields_char = fields_char
       EXCEPTIONS
            OTHERS      = 1.

* release check
  CALL FUNCTION 'RS_DYNPRO_RELEASE_GET'
       EXPORTING
            dynpro_header  = hdr
       IMPORTING
            dynpro_release = dynpro_rel.
  dynp_rel = dynpro_rel.
  IF scrp_rel < dynp_rel.                                 "#EC PORTABLE
    MESSAGE e251(37) RAISING invalid_release.
  ENDIF.

  CALL FUNCTION 'RS_SCRP_DYNPRO_CHECK'
       TABLES
            fieldlist            = fld
            flowlogic            = src
            params               = mat
       CHANGING
            header               = hdr
       EXCEPTIONS
            damaged_but_repaired = 1
            damaged              = 2
            OTHERS               = 3.
  IF sy-subrc NE 0.
    subrc = sy-subrc.
    CASE subrc.
      WHEN 2.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING damaged.
      WHEN 3.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING not_executed.

    ENDCASE.
  ENDIF.
ENDFORM.                               " DYNPRO_UPLOAD



zreptran_46c_txt.txt
 Description:

Download
 Filename:  zreptran_46c_txt.txt
 Filesize:  22.68 KB
 Downloaded:  2156 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP Dictionary -> Migration All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.