SAP ABAP4 Learning --- Data Type (4)

zhaozj2021-02-16  84

-------------------------------------------------- ----------------------------------- Specify the initial value to declare the internal variables using the DATA statement, Ground allocate the initial value. For more information on different data type initial values, see Basic Data Types - A predefined table. To change the initial value of the field, use the parameter of the DATA statement. The syntax is as follows: Syntax Data ..... Value . Set the initial value of field , where can be text (see text) constant (see constant) Explicit Sample IS INITIAL initial value specification example: Data: counter Type P value 1, Date Type D value '19920601', Flag Type C Value is initial. After the data, the string flag contains its default initial value Space. -------------------------------------------------- ------------------------------------ Specifies the number of decimal numbers to define the type P field, Please use the parameter. The syntax is as follows: Syntax Data Type P Decimals ..... The maximum number of decimal numbers is 14 (see Digital Data Type). The data object can be assigned to the compressed code type variable, and the data object has a plurality of variables. If the program properties have been set to "fixed-point operations" (see Specify Programs Properties), the number of bits will be entered. Data Weight Type P Decimals 2 Value '1.225'. If the property is set to "fixed point operation", the value of Weight is 1.23

-------------------------------------------------- ------------------------------------ DATA statement field for the field string is one of the programs Internal table. To clear the field of field, use the DATA statement and mark the start and end of the field group with begin of and endof. The syntax is as follows: Syntax Data: Begin of , , .............. End of . These scribes are defined by the field skewers . Example: Data: Begin of Address, Name (20) Type C, Street (20) TYPE C, NUMBER TYPE P, Postcode (5) Type N, City (20) Type C, End Of Address. This example defines a length. Type 73 string croup. You can add address-name, address-street, etc.

转载请注明原文地址:https://www.9cbs.com/read-11943.html

New Post(0)