FM to get the file from application server to presenatation server automati

Advertisement

Hi!
In my upload program I am egtting the error log file onmy application server directly. Is there a function module or a way that in my abap code I can mention to bring the file or transfer the file to the presentation server . As my program is been run in the back ground so I cannot directly get the file on the presenattion server, so I need to bring it back on teh presentation server back to see teh eror log.
I would like my program to do the transfer in background itself so that I can see the error log on a daily basis from my local file .
Thanks
when 'X'.                      "X is application server
*         TRANSLATE p_err USING '\/'." correct slash for unix
      open dataset p_err2 for output in text mode encoding default.
      if sy-subrc = 0.
        loop at t_err into s_nts.
          transfer s_nts to p_err2.
          if sy-subrc ne 0.
            message i010(ad) with p_err2 'Download Failed'.
          endif.
        endloop.
        close dataset p_err2.
      else.
            message i010(ad) with p_err 'dataset could not be found'.
        sy-subrc = -1.             "Maintain error condition
      endif.
*        endif.
      when ' '.                      "Blank is presenation server
        translate p_err using '/\'."correct slash Dos file
        call function 'DOWNLOAD'
          EXPORTING
            filename = p_err
            filetype = 'ASC'   "FTYPE set to DAT in DATA seg
          TABLES
            data_tab = t_err.
        if sy-subrc ne 0.
          message i010(ad) with 'File ' p_err 'cannot be located.'.
          sy-subrc = -1.             "Maintain error condition
          exit.
        endif.
    endcase.
  ENDIF.
Thanks

Advertisement

SO , after reading all , I assume that there is no way in which when I run the background job and get a errro file on application server can be retrievd on my presenattion serevr during the background job run. I was thinking that theer might be a functionn module which will convert the application server file into presenttion server file during the program run in background and store it in the location provided.
I was trying to use FM  CALL FUNCTION 'C13Z_APPL_TO_FRONT_END' and  CALL FUNCTION 'ARCHIVFILE_SERVER_TO_SERVER' but using teh first one asks for source file and destination file name during teh program run and as it runs in background it cannot be provided again and again and teh second one dosent seem to work.
Thanks

October 11, 2015

FM to get the file from application server to presenatation server automati

Hi! In my upload program I am egtting the error log file onmy application server directly. Is there a function module or a way that in my abap code I can mention to bring the file or transfer the file to the presentation server . As my program is bee

Functional module to get the File from a given Directory

Hi all, I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char, give me good sugestion regards paulHi Paul, Che

How do I get the files from final cut pro trial to final cut pro

I purchased Final Cut Pro after using the trial version and I don't know how to get the project I was working on into the new purchased version?You should be able to determine which version your trial is by control-clicking it on your desktop and sel

System exception while deleting the file from app server in background job

Hi All, I have a issue while the deleting the file from application server. I am using the statement DELETE DATASET in my program to delete the file from app server. I am able to delete the file from the app server when i run the program from app ser

Error while uploading the file from Allpcation server in LSMW-7th step

Hi Experts, what should be the specific CODE PAGE should be maintained while uploading the file from application server in LSMW-7th Step Thanks in advance, KSRHi I mean that there is any seperate CODE PAGE which comes at the bottom of screen while up

Downloading file from Application Sever

Hi Gurus, I have a requirement in which I have to execute my program once in every 15 minutes which will check if there are any files present in application server. Is so I have to retreive the files to SAP from Application server. Now I have couple

Opening the Excel file from Application server

Hi All, I had uploaded an excel file on the application server for using it in my program . But when i am opening the uploaded file on the Application server it shows some special characters and those are also displayed on my report output while read

Get the File information(data) from Directory AL11.

Hi Friends, I want to get the file data from the given particular directory(which maintained in AL11) in the selection screen. for listing the files from the directory, i used FM 'RZL_READ_DIR_LOCAL'. it displaying only files what ever in the given d

How to delete files from application server posted in last 30 days

I have some files in application server posted through ABAP program with the below format \.\.\.abcd_20110209_111209.csv   (with  date and time). I need to delete those files which was posted in last 30 days through another program. Could you plaese

Problem during retriving file from application Server

Hi all, i am trying to upload a world file (from desktop ) on application server and retrieve it back on local desktop. during retrieval of file from application server i am getting all the data in encoded format . i am using - open DATASET p_fpath f

Upload 1gb file from application server to PSA

Hi, The following is the requirement my client has, 1) there will be a 1gb file on application server 2) pick up the file, and validate if the number of records are equal to number provided in the footer, if they dont match, reject the file 3) then v

Reading XML file from application server and  put into internal table-4.6C

Dear All, Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest. Thanks and regards, AtanuHi Atanu! Simply use the XSLT transforma

Reading tab delimited file from application server

Hi All, I do know that we need to use Open data set to read a file from application server, but my question is when you use  read DATASET v_file into wa_final -  this wa_final is an work area and also i have mentione an internal table. so do we need

Reg : Executing .exe file from application server

Dear Experts,                     i have a requirement to execute an .exe file from application server,i tried with method CL_GUI_FRONTEND_SERVICES=>EXECUTE but it executes .exe file from presentation server only.can anyone kindly clarify to execute

FM to read XML files from Application server in ECC5.0

Hi All, We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files. Now we need to read the XML file c

Pick the  file from FTP Server and place it on the App. Server of R/3

Hi Guys,   I had a requirement where i need to pick the file from the FTP Server and place it on the Application Server in R/3. If anybody has an Idea on acheiving this or if anybody has the piece of Code Snippet to acheive the same, Help me out. Reg

Download text file from application server to client server.

Hi all, I am facing a format issue while downloading text file from application server to the client machine. The issue is that, say I have 6 to 10 lines in my text file in application server. but when i store it on the hard drive, it shoes all the d

Deleting file from application server

can any one tell me how to delete file from application server?Hi,   Use statement   delete dataset 'tmpfile.txt'. \tmp\file.txt is the file path on application server which you want to delete. Regards Sailaja.Read other 4 answers

How is it posible to get the File name, size and type from a File out the H

How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How

Hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ugh.

hi, i purchased a 2 dvd digital set. i cant just download it straight to my ipad. they said i have to down load it to my i tunes, then can transfer to i pad. im not seeing how to click the files from my email, and get them into the i tunes acct... ug