PDF Stored in Table Using ABAP Program - SAP Q&A
PDF Stored in Table Using ABAP Program - SAP Q&A
(http://www.sap.com/)
(https://community.sap.com)
(/users/login.html?
redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-
stored-in-table-using-abap-program.html)
Ask a Question (https://answers.sap.com/questions/ask.html) Write a Blog Post (https://blogs.sap.com/wp-admin/post-new.php) Login (/users
Dear all,
I'd like to download PDF that is stored in table as rawstring using ABAP program. Here's the scenario.
Users upload the PDF using webdynpro application. The PDF is then saved into a custom table with eld of type rawstring. I need to create an ABAP program to retrieve the PDF
and save into local pc. I've no authorization to run or test to debug the webdynpro application.
I'd like to know how do I convert the rawstring back into PDF using ABAP program and eventually download into local pc? I've tried using several FM like
SCMS_XSTRING_TO_BINARY and etc., and download it using GUI_DOWNLOAD or cl_gui_frontend_services=>gui_download but it always dump giving error about the rawstring.
Basically what I want to achieve is using table control to list all the PDF, then users can double click on the le they want to see or save into local pc. Kindly advise on how to
convert rawstring back to PDF. Is it even possible to download the PDF using ABAP program or this function is speci c to webdynpro only?
Thanks in advance.
Assigned Tags
Related questions
2 Answers
Former Member
Hi Liang,
2Fquestions%2F9387342%2Fdownload-pdf-stored-in-
ml%3FchildToView%3D9387516%23answer-
data%3D9387516%26s_csrf%3D1607326639461.743)
0
what error are you getting? I've done this lots of times using SCMS_XSTRING_TO_BINARY and
2Fquestions%2F9387342%2Fdownload-pdf-stored-in-
ml%3FchildToView%3D9387516%23answer-
_data%3D9387516%26s_csrf%3D1607326639461.743)
Cheers,
/
Kimon
Add a Comment (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-
program.html%3Fs_action%3Dcomment%26s_data%3D9387516%26s_csrf%3D1607326639461.743) |
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-
program.html%3Fs_action%3Dreport%26s_data%3D9387516%26s_csrf%3D1607326639461.743) |
Share
5 Comments
Regards,
Liang
Like (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-program.html%3FchildToView%3D9388618%23comment-
9388618%26s_action%3Dlike_comment%26s_data%3D9388618%26s_csrf%3D1607326639461.743) 0 |
Share
|
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-
program.html%3Fs_action%3DreportComment%26s_data%3D9388618%26s_csrf%3D1607326639461.743)
Show all
Hi,
2Fquestions%2F9387342%2Fdownload-pdf-stored-in-
ml%3FchildToView%3D9388569%23answer-
data%3D9388569%26s_csrf%3D1607326639461.743)
0
How are you downloading the binary le on local PC.
2Fquestions%2F9387342%2Fdownload-pdf-stored-in-
ml%3FchildToView%3D9388569%23answer-
_data%3D9388569%26s_csrf%3D1607326639461.743)
Deeps
Add a Comment (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-
program.html%3Fs_action%3Dcomment%26s_data%3D9388569%26s_csrf%3D1607326639461.743) |
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-
program.html%3Fs_action%3Dreport%26s_data%3D9388569%26s_csrf%3D1607326639461.743) |
Share
3 Comments
I think you have to parse the rawstring so that it will be converted from rawstring to string.
I have faced a similar issue when I was uploading a pdf and I wanted the data into a structure.
Is this what you want ?, please con rm, so that I can provide you the code for the same.
Regards,
Aakash Awasthi
Like (/users/login.html?redirect_to=%2Fquestions%2F9387342%2Fdownload-pdf-stored-in-table-using-abap-program.html%3FchildToView%3D9479762%23comment-
9479762%26s_action%3Dlike_comment%26s_data%3D9479762%26s_csrf%3D1607326639461.743) 0 |
Share
|
program.html%3Fs_action%3DreportComment%26s_data%3D9479762%26s_csrf%3D1607326639461.743) /
Show all
Before answering
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please
leave a comment instead, requesting additional details. When answering, please include speci cs, such as step-by-step instructions, context for the solution, and links to
useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
Please provide a distinct answer and use the comment option for clarifying purposes.
Find us on