Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to send a file downloded either to application or presentation server

harishaginati
Explorer
0 Kudos

Hi guys,

I had a requirement...

my program should first download a flat-file to application/presentation server and latter send this file as an attachment via email to recipient..

can you guys help me....

cheers,

Harish

3 REPLIES 3

Former Member
0 Kudos

Hi Harish,

for the download to presentation server

cl_gui_frontend_services=>gui_download.

To download the file to presentation server use

command open dataset

To transfer the file you have to use command TRANSFER

To send the file as attachment you use Function Module

SO_NEW_DOCUMENT_ATT_SEND_API1.

Make sure you commit rsconn01 after calling SO_NEW_DOCUMENT_ATT_SEND_API1 only this will trigger the sending of your mail.

Kind regards Henner

0 Kudos

Hi buddy..,

will this FM SO_NEW_DOCUMENT_ATT_SEND_API1 send any type of file via email

cheers,

Harish

Former Member
0 Kudos

Hello Harish,

You just need to tun the transaction. Here prvide the Presentation server filename & then Appliction server path. e.g.: application server path C:\usr\sap\R3D\SYS\global\substanc.txt etc

But before copying the file on application server consult with Basis Consultatnt wehter you have authorization for writing file on Application server or not? If not first get the authorization.

Reward if helpful answer.

Regards

--

Sasidhar Reddy Matli.