03-10-2008 4:32 PM
Hello,
I want to convert a SAP Standard Report to PDF and display it in an ABAP Webdynpro application.
With the function CONVERT_ABAPSPOOLJOB_2_PDF I receive the result of the report as PDF, but this PDF is stored in a field of type STRING. Unfortunatly, this STRING contains already the binary data of the PDF file.
So any function or class for convertion to move the STRING to the XSTRING field changes the content of the STRING, that is already an XSTRING.
The only way to move the data without changes, is to write the STRING to filesystem in binary mode and then open it again and read it in the XSTRING field in binary mode.
But the users of this application should not be access to filesystem granted.
How can I get the content of the STRING field to the XSTRING field without any conversion, because the STRING field is already a XSTRING?
Thanks in advance for any replies
03-11-2008 7:02 AM
Hello,
I found the solution
DATA lv_buffer TYPE xstring.
DATA lv_string TYPE string.
DATA lv_xstring TYPE xstring.
EXPORT my_data = lv_string TO DATA BUFFER lv_buffer.
IMPORT my_data TO lv_xstring FROM DATA BUFFER lv_buffer IN CHAR-TO-HEX MODE.
In this case the C field is move to the X field without any convertion.
06-23-2020 7:49 PM
Hello Dirk,
Thank you for Answer , however my prob was not solved by this conversion.
Solution : Simply translate data to uppercase then we can copy from CHAR format to hex. With this I got desired results.
Like
Data hex type xstring,
Data char type string.
translate char in uppercase.
copy char into xstring.
Thank you Dirk for reply
07-30-2023 5:07 PM
Could someone already do it?
I want to pass the data from a string variable to an xtring without converting it.
07-31-2023 12:57 PM