Encode Decode String in ABAP
* To Encode and Decode the string.
Report Program.
REPORT ZAB_ENCODE_DECODE.
PARAMETERS: p_string type string.
data: lv_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
Post a Comment