Wednesday, September 21, 2016

Data Types in ABAP

Complete and Incomplete Types

The ABAP standard types are divided into two, they are Complete and Incomplete datatypes (its length must be defined). Let us look at them in detail:

Complete ABAP Standard Types:
  • D - Type for date, Length 8 (fixed), Character Type
  • T - Type for time, Length 6 (fixed), Character Type
  • I - Type for integer, Length 4 (fixed)
  • F - Type for floating point number, length 8 (fixed)
  • STRING - Type for dynamic length character string
  • XSTRING - Type for dynamic length byte sequence (HeXadecimal string)
Incomplete ABAP Standard Types:
  • C - Type for character string, fixed length has to be assigned
  • N - Type for numerical character string, fixed length has to be assigned
  • X - Type for byte sequence, fixed length has to be assigned
  • P - Type for packed number, fixed length has to be assigned (more about packed number, decimal points may also be assigned)
    • e.g. DATA: result TYPE p LENGTH 3 DECIMALS 2.
      • The rule is simple, multiple the length by 2 we will have the total digit count (5 is a total of integer part & decimal places, plus one place for the sign)

No comments:

Post a Comment

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...