REPORT Y9020022 LINE-SIZE 130. "Release 3.1G, 4.5A ************************************************************************ * Copyright (c) 1999 by CT-Team, 33415 Verl, http://www.ct-software.com * * You can use or modify this report for your own work as long * as you don't try to sell or republish it. * In no event will the author be liable for indirect, special, * Incidental, or consequental damages (if any) arising out of * the use of this report. * ************************************************************************ BREAK-POINT. *//////////////////////////////////////////////////////////////////////* MOVE: 'TESTREPORT fuer "ASSIGN TFELD+o(l) TO " ' TO SY-TITLE. *//////////////////////////////////////////////////////////////////////* *************** Declaration of variables ********************** FIELD-SYMBOLS . *....................................................................... DATA: TFELD4(6) TYPE T VALUE '235046'. "T = always 6 Bytes DATA: TFELD6(6) TYPE T VALUE '201159'. DATA: TFELD12 TYPE T VALUE '060401'. "T = always 6 Bytes * *iiiiiiiiiiiiiii *i Data fiels of the T type (TIME) have a predetermined length of *i 6 bytes: HHMMSS *iiiiiiiiiiiiiii * DATA: OFFX TYPE I VALUE 0. DATA: LENX TYPE I VALUE 2. *//////////////////////////////////////////////////////////////////////* ************* - Main Section ******************* *//////////////////////////////////////////////////////////////////////* * BREAK-POINT. ASSIGN TFELD4+1(5) TO . "<-- Assign of variable to ****************** bitte ausprobieren ********************************** * ASSIGN TFELD4+12(6) TO . "<--The field TFELD12 ! will be assigned * * ASSIGN TFELD4+8(2) TO . "<-- No syntax error (middle assign) !!! * ************************************************************************ WRITE: / 'ASSIGN command with TFELD4 (Offset and length constant)' COLOR 6. PERFORM DISPLAY-TFELD USING TFELD4 'TFELD4'. ULINE. SKIP 2. *----------------------------------------------------------------------- BREAK-POINT. ASSIGN TFELD6+2(4) TO . "<-- Assign of variable to *....................................................................... WRITE: / 'ASSIGN command with TFELD6 (Constant offset and length)' COLOR 6. PERFORM DISPLAY-TFELD USING TFELD6 'TFELD6'. ULINE. SKIP 2. *----------------------------------------------------------------------- BREAK-POINT. ASSIGN TFELD12+4(2) TO . "<-- Assign of variable to *....................................................................... WRITE: / 'ASSIGN command with TFELD12 (Constant offset and length)' COLOR 6. PERFORM DISPLAY-TFELD USING TFELD12 'TFELD12'. ULINE. SKIP 2. *----------------------------------------------------------------------- *...................................................................... BREAK-POINT. WRITE: / 'ASSIGN command (Offset and length as fields) mit TFELD6' COLOR 6. DO 3 TIMES. WRITE: /5 'DO loop count :' COLOR 5, SY-INDEX. ASSIGN TFELD6+OFFX(LENX) TO . PERFORM DISPLAY-TFELD USING TFELD6 'TFELD6'. SKIP 4. ADD 2 TO OFFX. ENDDO. *....................................................................... * *//////////////////////////////////////////////////////////////////////* ************* Subroutines ******************* *//////////////////////////////////////////////////////////////////////* * ************************************************************************ * Display of date fields and field symbols * ************************************************************************ FORM DISPLAY-TFELD USING TFELD FNAME. * WRITE: /10 'Content of', FNAME, ':', TFELD. PERFORM FELDEIGENSCHAFTEN USING TFELD. * WRITE: /10 'Content of :', . PERFORM FELDEIGENSCHAFTEN USING . *----------------------------------------------------------------------- MOVE '15' TO . "<-- The field symbol will be used *----------------------------------------------------------------------- WRITE: /10 'MOVE ''15'' TO '. ULINE. *....................................................................... WRITE: /10 'Content of', FNAME, 35 ':', TFELD. WRITE: /10 'Content of ', 35 ':', . *....................................................................... ENDFORM. ************************************************************************ * Determination of field properties (only for information) * ************************************************************************ FORM FELDEIGENSCHAFTEN USING ALLG. * DATA: FLAENGE(2) TYPE N. DATA: FTYP(1) TYPE C. DATA: FOUT(2) TYPE N. DATA: FDEZ(2) TYPE N. *....................................................................... ULINE. DESCRIBE FIELD ALLG LENGTH FLAENGE. WRITE: /10 'Field length :', FLAENGE. * DESCRIBE FIELD ALLG TYPE FTYP. WRITE: /10 'Field type :', FTYP. * DESCRIBE FIELD ALLG OUTPUT-LENGTH FOUT. WRITE: /10 'Output length :', FOUT. * DESCRIBE FIELD ALLG DECIMALS FDEZ. WRITE: /10 'Decimals :', FDEZ. SKIP 1. *....................................................................... ENDFORM. ************************************************************************ ************************************************************************ ******************* END OF PROGRAM *************************************