Data Types
Data Types
How to define parameters as a data type?
PARAMETERS P_INPUT (10) TYPE C.
You want to insert an integer field containing value 1 to a character field, how this can be done?
The built-in conversion rules apply automatically and converts the integer value to character value while assigning a integer field to a character field.
What is the use of data type C?
Variables of data type C are used for holding alphanumeric characters from a minimum length of 1 character to a maximum length of 65,535 characters. By default, these are aligned to the left.
Can you print decimals in type N? What is difference between float and packed data type?
No, we cannot print decimals in type N because decimal places are not permitted with N data type.
Float Data Type - It cannot be declared in Parameters.
Packed Number - It can be declared in Parameters.
What is the difference between a substructure and an append structure?
In case of a substructure, the reference originates in the table itself in the form of a statement include.
In case of an append structure, the table itself remains unchanged and the reference originates in the append structure.
How is conversion of data types done between ABAP/4 and DB layer?
How is conversion of data types done between ABAP/4 & DB layer?
Database interface is responsible for the conversion between ABAP/4 data types and the database layer.
How is conversion of data types done between ABAP/4 and external level?
How is conversion of data types done between ABAP/4 & external level?
Conversion between the external layer and the ABAP/4 layer is accomplished in the SAP dialog manager DYNP.
What are the Data types of the external layer?
ACCP, CHAR, CLNT, CUKY, CURR, DATS, DEC, FLTP, INT1, INT2, INT4, LANG, LCHR, LRAW, NUMC, PREC, QUAN, RAW, TIMS, UNIT, VARC.
What are the Data types of the ABAP/4 layer?
ABAP/4 data types are specified below -
- C: Character.
- D: Date, format YYYYMMDD.
- F: Floating-point number in DOUBLE PRECISION (8 bytes).
- I: Integer.
- N: Numerical character string of arbitrary length.
- P: Amount or counter field (packed; implementation depends on hardware platform).
- S: Time stamp YYYYMMDDHHMMSS.
- T: Time of day HHMMSS.
- V: Character string of variable length, length is given in the first two bytes.
- X: Hexadecimal (binary) storage.
Do you know about the different data types of internal tables?
Key, Line, and Table are the three different data types of internal tables.
What is the difference between data type D and data type DATS?
D data type is 8-character length. For example, 00000000
DATS data type is 10-character length. For example, 00.00.0000
What is the difference between 'TYPE' and 'LIKE'?
'Type' used to assign data type directly to the data object while declaring.
'Like' used to assign the data type of another object to the data object while declaring.
'Type' refers the existing data type while 'Like' refers to the existing data object.
Why do we use TYPES statement in ABAP programming?
TYPES statement is used to pass user defined structure in an ABAP program.