Encode Decode String in ABAP

 * To Encode and Decode the string.

Report Program.

REPORT ZAB_ENCODE_DECODE.

PARAMETERSp_string type string.
datalv_encode type string,
      lv_decode type string.

write 'Plain string',p_string COLOR 1.

**********************************************************

CALL METHOD cl_http_utility=>if_http_utility~encode_base64
  EXPORTING
    unencoded p_string
  receiving
    encoded   lv_encode.

WRITE'Encoded string : ',lv_encode color 2.

************************************************************
  CALL METHOD cl_http_utility=>if_http_utility~decode_base64
    EXPORTING
      encoded lv_encode
    receiving
      decoded lv_decode.
WRITE'Decoded string : ',lv_decode COLOR 3.

Input



Output



Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).

Concatenation new syntax( 7.4+ ).