cancel
Showing results for 
Search instead for 
Did you mean: 

Send PDF to Shared Folder

Former Member
0 Kudos

Hi

I have a program that sends via email my generated PDF's (using Adobe forms) but now I have to save this PDF's in a shared folder into a Windows Server instead of sending them via email.

How can I do this?

Thanks very much

I'm not an ABAP programmer so if you can help me with somo code, it would be so glad from you

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Moderator message - Cross post locked

ravi_lanjewar
Contributor
0 Kudos

Hi,

First create file on application server and transfer the file using FTP command to shared folder.

You can do this using abap code in you program. For this you can used the function module to execute FTP command.

Search relavent function module name which is starting with 'FTP_*'

Kind Rgds

Ravi

0 Kudos

HI Mate,

I am giving you a sample code a dialog box would open which will ask the user to specify the location

he wants to file to be saved.


data: v_guiobj TYPE REF TO cl_gui_frontend_services,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_bin_filesize TYPE i,
it_lines TYPE STANDARD TABLE OF tline.

*........................GET THE FILE NAME TO STORE....................*

CONCATENATE 'FILE_NAME' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.

CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.

IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.

*........................download the pdf....................*
** if you do not want the dialog box hard code the location of shared folder in V_FULLPATH and pass
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_fullpath
filetype = 'BIN'
TABLES
data_tab = IT_LINES (PASS YOUR INTERNAL TABLE HERE) 
EXCEPTIONS
..
 

Minor tweaks would be required in this code though. Hope this helps...

Cheers...

Mayank