Decimal - Hexedecimal Dönüşümü

Örnek:
    "271025980 "Decimal
    "1027873C  "HEX Big endian
    "3C872710  "HEX Little endian

  datalv_decimal  type int4.
  datalv_decimal_str type string.
  datalv_hex_str type string. SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; }.L0S52 { color: #0000FF; }.L0S55 { color: #800080; }
    lv_decimal_str = lv_decimal .
    call method cl_crm_saf_se_util=>convert_dec2hex
      exporting
        iv_decimal lv_decimal_str
      receiving
        rv_hex     =
lv_hex_str .


form f_big_to_little_endian  changing chn_hex type string.

    "271025980
"Decimal
    "1027873C  "HEX Big endian
    "3C872710  "HEX Little endian
    datalv_length type int4.
    datalv_times type int4.
    datalv_offset type int4.
    datalv_xndx type int4.
    datalv_katar type string.

    CHECK chn_hex is not INITIAL.
    lv_length strlenchn_hex .
    lv_times lv_length / 2"1027873C için 4 kez
    lv_xndx 0.
    do lv_times TIMES.
      lv_offset lv_xndx * 2.
      lv_katar chn_hex+lv_offset(2&& lv_katar .
      lv_xndx lv_xndx + 1.
    ENDDO.

    chn_hex lv_katar.

endform.                    " F_BIG_TO_LITTLE_ENDIAN