2012 Jul 20 12:47 PM
Hi Experts,
I want to upload a Word or PDF file into application Server, i need a function module.
i already used gui_upload,
c13z_file_upload_binary,
file_read_and_convert_sap_data.
But they are not upload because it is a Word file. They are working fine for Excel file with tab delimitor
please help me.
2012 Jul 20 7:24 PM
Hi Sravan,
I am not sure if you are trying to pick up a Word/PDF file from local machine and write it to the app server.
If that is the case you can upload the file into an internal table using GUI_UPLOAD with file type 'BIN'.
(Read the function module documentation for details).
Once you have this data in you internal table, you can write it back to the application server using abap statements OPEN DATASET for OUTPUT in Binary mode.
Look at the documentation for these keywords on details of how to use them.
- Puneet
2012 Jul 20 7:24 PM
Hi Sravan,
I am not sure if you are trying to pick up a Word/PDF file from local machine and write it to the app server.
If that is the case you can upload the file into an internal table using GUI_UPLOAD with file type 'BIN'.
(Read the function module documentation for details).
Once you have this data in you internal table, you can write it back to the application server using abap statements OPEN DATASET for OUTPUT in Binary mode.
Look at the documentation for these keywords on details of how to use them.
- Puneet
2012 Jul 23 6:34 AM
HI Puneet,
Thanks for ur reply,
see i am using this,
CALL FUNCTION 'C13Z_FILE_UPLOAD_BINARY'
EXPORTING
i_file_front_end = p_local "presentation server
i_file_appl = p_path " application server
EXCEPTIONS
fe_file_not_exists = 1
fe_file_read_error = 2
ap_no_authority = 3
ap_file_open_error = 4
ap_file_exists = 5.
But the function module which i am using is a old one, and its not recomended.
And in some versions it is giving error also.
But this function module is perfect for my requirement.
i_file_appl = p_path " application server
I need above statement for GUI_upload. But its not their.
2012 Jul 23 6:24 AM
HI Sravan,
http://scn.sap.com/thread/621139
http://scn.sap.com/thread/1234997
Check the above mentioned Threads , Hope will help you .
Regards,
Saravana.S