You are on page 1of 4

Community

(http://www.sap.com/)
(https://community.sap.com)
(/users/login.html?
redirect_to=%2Fquestions%2F7362241%2Fhow-to-
download-pdf-from-application-server.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

Search the SAP Community

Former Member
how to download pdf from application server
May 25, 2010 at 07:03 AM | 274 Views
uestions%2F7362241%2Fhow-to-download-pdf-from-
ata%3D7362241%26s_csrf%3D1607311498900.5784)
pplication-
0
uestions%2F7362241%2Fhow-to-download-pdf-from-
data%3D7362241%26s_csrf%3D1607311498900.5784)
pplication-
(/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
Follow
server.html%3Fs_action%3Dfollow%26s_csrf%3D1607311498900.5784) RSS Feed

hi all,

anybody has code to download pdf from application server to presentation server.

right now i get the pdf le on to the desktop but i get error on opening.

gui_download gives error if i use xstring.

pl advice.

thanks.

sap fan.

Add a Comment (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-


server.html%3Fs_action%3Dcomment%26s_data%3D7362241%26s_csrf%3D1607311498900.5784) |
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3DreportQuestion%26s_data%3D7362241%26s_csrf%3D1607311498900.5784)

Assigned Tags

ABAP Development (/tags/833755570260738661924709785639136) |

Related questions

Download the pdf les from application server (https://answers.sap.com/questions/10006380/download-the-pdf- les-from-application-server.html)


By Former Member ( https://people.sap.com/former.member) May 15, 2013

Application server le (https://answers.sap.com/questions/2165630/application-server- le.html)


By Former Member ( https://people.sap.com/former.member) Mar 26, 2007

3 Answers

Sort by: Votes | Newest | Oldest

Ravi Lanjewar ( https://people.sap.com/ravi.lanjewar)


(/users/559638/ravilanjewar.html)
May 25, 2010 at 07:08 AM

Hi,
questions%2F7362241%2Fhow-to-download-pdf-from-
data%3D7362270%26s_csrf%3D1607311498900.5784)
3FchildToView%3D7362270%23answer-
0
Save le on application server is not possible using gui_download function module.
questions%2F7362241%2Fhow-to-download-pdf-from-
3FchildToView%3D7362270%23answer-
_data%3D7362270%26s_csrf%3D1607311498900.5784)

You used "open dataset for output" to create le on application server.

Search on SDN for open dataset you will get mainy stu for create le on application server.
/
Rgds

Ravi Lanjewar
Add a Comment (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3Dcomment%26s_data%3D7362270%26s_csrf%3D1607311498900.5784) |
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3Dreport%26s_data%3D7362270%26s_csrf%3D1607311498900.5784) |
Share

1 Comment

Former Member
May 25, 2010 at 07:22 AM (/comments/7362359/view.html)
hi ravi,

i already have pdf le in application server. I want to read it and download it to presentation server.i searched the forums but found no thread related to this. i dont have a spool to read from.hope u
understand my question.

i use open dataset in input mode to read the le from application server.

after that use gui_download to write the pdf le to desktop. but i cant open the pdf le created in desktop.it (http://desktop.it) is giving error.

Like (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-server.html%3FchildToView%3D7362359%23comment-
7362359%26s_action%3Dlike_comment%26s_data%3D7362359%26s_csrf%3D1607311498900.5784) 0 |
Share
|
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3DreportComment%26s_data%3D7362359%26s_csrf%3D1607311498900.5784)

Former Member

May 25, 2010 at 07:45 AM

got solution .
questions%2F7362241%2Fhow-to-download-pdf-from-
data%3D7362453%26s_csrf%3D1607311498900.5784)
3FchildToView%3D7362453%23answer-
0 Add a Comment (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
questions%2F7362241%2Fhow-to-download-pdf-from-
3FchildToView%3D7362453%23answer-
_data%3D7362453%26s_csrf%3D1607311498900.5784)
server.html%3Fs_action%3Dcomment%26s_data%3D7362453%26s_csrf%3D1607311498900.5784) |
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3Dreport%26s_data%3D7362453%26s_csrf%3D1607311498900.5784) |
Share

1 Comment

Former Member

Jun 02, 2010 at 10:05 AM (/comments/7389638/view.html)


I have a similar requirement to do. So please let me know the solution and how did you implemented it.

Like (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-server.html%3FchildToView%3D7389638%23comment-
7389638%26s_action%3Dlike_comment%26s_data%3D7389638%26s_csrf%3D1607311498900.5784) 0 |
Share
|

Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-


server.html%3Fs_action%3DreportComment%26s_data%3D7389638%26s_csrf%3D1607311498900.5784)

Former Member

Mar 09, 2011 at 03:16 PM

Hi,
questions%2F7362241%2Fhow-to-download-pdf-from-
data%3D8187190%26s_csrf%3D1607311498900.5784)
3FchildToView%3D8187190%23answer-
0
use the below code to download le from app server to presentation server
questions%2F7362241%2Fhow-to-download-pdf-from-
3FchildToView%3D8187190%23answer-
_data%3D8187190%26s_csrf%3D1607311498900.5784)

PARAMETERS: S_ le TYPE SAPB-SAPPFAD

default '\folder1\abc,pdf'.

PARAMETERS: t_l le TYPE SAPB-SAPPFAD

default 'c:\temp\xyx.pdf (http://xyx.pdf)'.

START-OF-SELECTION.

CALL FUNCTION 'ARCHIVFILE_SERVER_TO_CLIENT'


/
EXPORTING

path = source_ le

TARGETPATH = target_l le

EXCEPTIONS

ERROR_FILE = 1

OTHERS = 2

IF sy-subrc eq 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO


WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.
Add a Comment (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3Dcomment%26s_data%3D8187190%26s_csrf%3D1607311498900.5784) |
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3Dreport%26s_data%3D8187190%26s_csrf%3D1607311498900.5784) |
Share

2 Comments

Eitan Rosenberg ( https://people.sap.com/rosenberg.eitan)  khaja miyamdad

Aug 12, 2015 at 07:15 AM (/comments/11892699/view.html)


Hi,

Please note that Krishna last Logged In was on Mar 9, 2011 4:15 PM......

Regards.

Like (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-server.html%3FchildToView%3D11892699%23comment-
11892699%26s_action%3Dlike_comment%26s_data%3D11892699%26s_csrf%3D1607311498900.5784) 0 |
Share
|
Alert Moderator (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-
server.html%3Fs_action%3DreportComment%26s_data%3D11892699%26s_csrf%3D1607311498900.5784)

Show all

Comment on This Answer (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-application-


server.html%3Fs_action%3Dcomment%26s_data%3D8187190%26s_csrf%3D1607311498900.5784)

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.

Rules of Engagement (https://www.sap.com/community/resources/rules-of-engagement.html)

Know someone who can answer? Share a link to this question.

You must be Logged in (/users/login.html?redirect_to=%2Fquestions%2F7362241%2Fhow-to-download-pdf-from-


application-server.html%3Fs_action%3DanswerQuestion%26s_csrf%3D1607311498900.5784) to submit an answer.

Please provide a distinct answer and use the comment option for clarifying purposes.

/
Submit your Answer

Find us on

(https://www.facebook.com/sapcommunity) (https://twitter.com/SAPCommunity) (https://www.youtube.com/c/SAPCommunities)

(https://www.linkedin.com/company/sap) (https://instagram.com/sap/) (http://www.slideshare.net/SAP) (mailto:?subject='SAP Community')

Privacy (http://sap.com/about/legal/privacy.html) Terms of Use (http://sap.com/corporate/en/legal/terms-of-use.html)

Legal Disclosure (http://sap.com/about/legal/impressum.html) Copyright (http://sap.com/about/legal/copyright.html)

Trademark (http://sap.com/about/legal/trademark.html) Cookie Preferences

Newsletter (https://www.sap.com/cmp/nl/sap-community-voice/index.html) Support (mailto:sapnetwork@sap.com)

You might also like