Skip to content

matsukawar/int2xstring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

int2xstring

ABAP program for converting INT4 to XSTRING based bit operation calculation.
This is minimal sample code how to imprement bit convertion caluculation on SAP Net Weaver ABAP program.

  • INT4 type is signed integer value and its size are 4 bytes (31 bits with signed bit).
  • XSTRING type is hex string value.

Of course, we can convert INT value to XSTRING directly
so you don't need to write such a bit operation ABAP code when you convert INT to XSTRING.

" Directly convertion.
DATA LW_XVAL TYPE X LENGTH 5.
LW_XVAL = 11259375.
WRITE / |LW_XVAL={ LW_XVAL }|.

But we need bit convertion code when we calculate Big Number such as scientific caluclations.
This program mainly use for dynamically generating binary data in ABAP program or scientific caluclations.

Execution result of this report program.

11259375(INT)
ABCDEF(XSTRING)

Regards.
matsukawar

About

ABAP program for converting INT8 to XSTRING.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages