Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

ABAP News for Release 7.50 - Fundamentals

$
0
0

This one will be short but fundamental.

Only Unicode Systems in Release 7.50

 

ABAP 7.50 is Unicode only! An AS ABAP can only run as Unicode System with system code page UTF-16. All ABAP programs must be Unicode programs where the Unicode syntax checks are effective.You must always set the respective program attribute.

 

Finally a programming guideline that is gone for good.

 

All the weird non-Unicode stuff is deleted from the  documentation.

 

Nothing more to say from my side.

 

New Built-in Data Type INT8

 

The existing built-in types b, s, i in the ABAP language and the respective built-in types INT1, INT2, INT4 in the ABAP Dictionary got a big brother (or is it a sister?):

 

int8 in ABAP language and INT8 in the ABAP Dictionary.

 

They specify 8-byte integers with a value range of  -9223372036854775808 to +922337203854775807.

 

Not much to say about that either. Simply go and use it if you need big integers. The rules are mainly the same as for 4-byte integers, of course with enhanced values for alignment requirement (adress must be divisible by 8), predefined output length on screens (20) and a new calculation type  int8 for arithmetic expressions.

 

Just a little example to remind you that it is always good to use an integer calculation type if you calculate integers, especially for big integers:


DATA arg TYPE int8 VALUE 2.

cl_demo_output=>new(
  )->write( |**  : { arg ** 62 }|
  )->write( |ipow: { ipow( base = arg exp = 62 ) }|
  )->display( ).

While ** calculates with floating point type f and produces a wrong result, ipow calculates with int8 and produces the correct result.

 

PS: Cool way of "writing" isn't it? But only for demo purposes ...


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>