Application Development and Automation 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: 
Read only

Function Module for Application Server

Former Member
0 Likes
1,727

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.

1 ACCEPTED SOLUTION
Read only

Puneet_Gupta
Contributor
0 Likes
1,153

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

3 REPLIES 3
Read only

Puneet_Gupta
Contributor
0 Likes
1,154

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

Read only

0 Likes
1,153

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.

   

Read only

Former Member
0 Likes
1,153

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