Popular Posts
Build an OpenVPN server on android device Preparation An android device, in this case, Sony xperia Z is used Root permission required Linux Deploy for deploy i... 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... Change the AppDomain's Base Directory and Environment Directory // Update AppDomain's Base Directory string root_path = "c:\\temp\\"; AppDomain.CurrentDomain.SetData("APPBASE", roo...
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.