on 01-22-2008 12:07 PM
Hi All,
I have a requirement in my project, where I have to convert XSTRING data into PDF or WORD file. Is there any FM available for this?
Thanks in Advance,
Manu
if u want to download pdf which is in xstring format to u r local system
u can try the following code.
data: data_tab type table of x255.
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = XString data
tables
binary_tab = data_tab.
cl_gui_frontend_services=>gui_download(
exporting
filename = filename
filetype = 'BIN'
changing
data_tab = data_tab ).
cl_gui_frontend_services=>execute(
exporting
document = filename ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janakiram,
Thanks for your solution, but I have to show the PDF document to the user,later they can save it.
I have solved the problem.
I used following method:
CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE(
I_FILENAME = FileName
I_CONTENT = XSTRING
I_MIME_TYPE = 'application/pdf'
I_IN_NEW_WINDOW = abap_true
).
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.