Popular Posts
Activate IIS GIZP compress 1. Set metabase editable for editing. 2. Add a new extension for gzip. 3. Edit the file c:\windows\system32\inetsrv\MetaBase.xml Add file... Limit input length of JTextField package swixml.sample; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; import javax.swing.JFrame; import j... Enable SSL connection for Jsoup import org.jsoup.Connection; import org.jsoup.Jsoup; import javax.net.ssl.*; import java.io.IOException; import java.security.KeyManagement...
Stats
declare
定義資料類型(EMPLOYEE):
TYPES dtype [TYPE type|LIKE dobj] ...
types: begin of EMPLOYEE,          " type definition
         WID(10) type C,
         FIRST_NAME(15) type C,
         LAST_NAME(15) type C,
         AGE type I,
       end of EMPLOYEE.
data EMP1 type EMPLOYEE.           " declare variant
types EMP like EMP1.               " type definition using exist variant
data EMP2 like EMP1.               " declare variant using exist variant
宣告變數(EMPLOYEE):
DATA var [{TYPE type}|{LIKE dobj}] ...
data: begin of EMPLOYEE,           " declare variant with structs
        WID(10) type C,
        FIRST_NAME(15) type C,
        LAST_NAME(15) type C,
        AGE type I,
      end of EMPLOYEE.
data EMP3 like EMPLOYEE.           " declare variant using exist variant
宣告常數:
constants: CNAME(10) value 'Bruce',
           BIRTHDAY type D value '19650201'.

constants: begin of MYADDRESS,
             NAME     type C length 20 value 'Fred Flintstone',
             STREET   type C length 20 value 'Cave Avenue',
             NUMBER   type P           value  11,
             POSTCODE type N length 5  value  98765,
             CITY     type C length 20 value  'Bedrock',
           end of MYADDRESS.
宣告表格:
tables: SPFL.                " load from ABAP/4 Dictionary
select * from SPFL.          " iterator data
  write: SPFL-MANDT,
         SPFL-CARRID,
         SPFL-CONNECTION.
endselect.