Anfang des Inhaltsbereichs

Diese Grafik wird im zugehörigen Text erklärt Zuweisungen zwischen Strukturen IV Dokument im Navigationsbaum lokalisieren

*-------------------------------------------------------------
* MOVE: structure <-> structure                              
*-------------------------------------------------------------

report ZCH_UNIEXP_4.

* Before Unicode enabling:

* data: begin of STRUC1,
*         F0(1)  type x,
*         F1(10) type c,
*         F2(20) type c,
*         F3     type i,
*         F4     type p,
*       end of STRUC1,

*       begin of STRUC2,
*         C0(1)  type c,
*         C1(10) type c,
*         C2(20) type c,
*         C3     type i,
*         C4     type f,
*       end of STRUC2,

*       begin of STRUC3,
*         G0(1)  type c,

*         G1(10) type c,
*         G2(20) type c,
*       end of STRUC3.

* STRUC1+1(35) = STRUC2+1(35). <---- Unicode error !!

* STRUC3       = STRUC2.

* INCLUDE STRUCTURE does not work here:

* types: begin of PART1,
*          F1(10)  type c,
*          F2(20)  type c,
*          F3      type i,
*        end of PART1,

*        begin of PART2,
*          C1(10)  type c,
*          C2(20)  type c,
*          C3      type i,
*        end of PART2.

* data:  begin of STRUC1,
*          F0(1)   type x.
*          include type PART1 as PART.
* data:    F4      type p,
*        end of struc1.

* data:  begin of STRUC2,
*          C0(1)   type c.
*          include type PART2 as PART.
* data:    C4      type f,
*        end of STRUC2,

*        begin of STRUC3,    
*          G0(1)  type c,
*          G1(10) type c,
*          G2(20) type c,
*        end of STRUC3.
* STRUC1-PART = STRUC2-PART.

* STRUC3      = STRUC2.   <---- new Unicode error !!

* Due to the insertion of include PART2 in STRUC2, there is a
* new alignment gap between STRUC2-C0 and STRUC2-C1

* After Unicode enabling:

* Please use MOVE-CORRESPONDING if the fieldnames do match,
* otherwise move single fields

data: begin of STRUC1,    
        F0(1)  type x,
        F1(10) type c,
        F2(20) type c,
        F3     type i,
        F4     type p,
      end of STRUC1,

      begin of STRUC2,
         C0(1)  type c,
         C1(10) type c,
         C2(20) type c,
         C3     type i,
         C4     type f,
      end of STRUC2,

      begin of STRUC3,
         G0(1)  type c,
         G1(10) type c,
         G2(20) type c,
      end of STRUC3.

STRUC1-F1 = STRUC2-C1.
STRUC1-F2 = STRUC2-C2.
STRUC1-F3 = STRUC2-C3.

STRUC3    = STRUC2.

Ende des Inhaltsbereichs