Encode and decode URL in ABAP

There are static methods both for encoding and decoding URL in class CL_HTTP_UTILITY. For encoding, ABAP predefined function encode( ) can be used as well.

Encoding URL

For encoding URL, you can use method ESCAPE_URL from mentioned class.

OR with simplified call:

Alternatively, you can also use predefined method encode( ) to accomplish the same result.

Decoding URL

For encoding URL, you can use method UNESCAPE_URL from mentioned class.

OR the same simplier way as above:

Reading return code

Reading return code is quite unusual, but it is same for both methods.

Peter Marcely

ABAP, Python, JavaScript developer