‎2018 Dec 11 3:05 AM
Dear Guru,
I need to convert ALV report output(internal table data ) to Base64 conversion. Is it possible using
encode = obj->if_http_utility~encode_base64( z ) .
As this take string for encoding.
Suggestion are much appreciated.
Regards,
Jayant.
‎2018 Dec 11 5:58 AM
Base 64 is just a way of passing bytes through a set of 64 characters. As this method takes a STRING parameter, those characters must be converted into bytes so that SAP is able to calculate the base 64 ; I guess the conversion into bytes is determined automatically by selecting the "charset" of the "Content-Type" HTTP header field (it's a problem if it's absent - maybe SAP will choose UTF-8).
To convert the ALV table into characters is another question; you may use the CSV format for instance (and then convert CSV into base 64).
‎2018 Dec 11 5:58 AM
Base 64 is just a way of passing bytes through a set of 64 characters. As this method takes a STRING parameter, those characters must be converted into bytes so that SAP is able to calculate the base 64 ; I guess the conversion into bytes is determined automatically by selecting the "charset" of the "Content-Type" HTTP header field (it's a problem if it's absent - maybe SAP will choose UTF-8).
To convert the ALV table into characters is another question; you may use the CSV format for instance (and then convert CSV into base 64).
‎2018 Dec 11 12:50 PM