Download data to specified  directory in application server

HI experts,
          i need to download data from internal table to specified application server directory which is already  created. how i can check the directory is already availble in server and i need to specify the name of the file dynamically. after download how i can check the downloaded file in application server.
Edited by: Alvaro Tejada Galindo on Apr 14, 2008 5:27 PM

Hi,
  If u wanna give file name dynamically, you can add it to the selection screen as parameter and let user enter the filename while executing.
To get file path, check FILE transaction.
To check the downloaded file in the server (guess u know the server name and path), Use AL11 transaction.
<REMOVED BY MODERATOR>
regards,
Ramya
Edited by: Alvaro Tejada Galindo on Apr 14, 2008 5:27 PM

Similar Messages

  • Download all files from a specific application server directory to Local pc

    Hi Experts,
    I have a requirement of downloading all the files from an application server directory to a local pc.
    I know how to download a single file from an application server at a time provided the file name is known.
    But my requirement is to download all the files in that particulary directory, because I dont know how many files were created in that directory and what are their names.
    Please kindly provide the solution.
    Thanks,
    Kalikonda.

    Nelson,
    Here is the function module that I have used to get all the application server files.
    appl_dir_name is the path of the directory  i.e. '/outbound/PD1/Applnserverfiles/'
    it_appl_srv_fls is the internal table where all the files gets stored in.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
       EXPORTING
         dir_name                     = appl_dir_name
      FILE_MASK                    = ' '
    IMPORTING
      DIR_NAME                     =
      FILE_COUNTER                 =
      ERROR_COUNTER                =
       TABLES
         dir_list                     = it_appl_srv_fls
    EXCEPTIONS
      invalid_eps_subdir           = 1
      sapgparam_failed             = 2
      build_directory_failed       = 3
      no_authorization             = 4
      read_directory_failed        = 5
      too_many_read_errors         = 6
      empty_directory_list         = 7
      OTHERS                       = 8
      IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    hope this solves your problem.
    Thanks,
    kalikonda.

  • How to create a directory in application server

    Hi all,
    How to create a directory in application server through Progaram??
    eg:\tmp - is already existing
    I want to create \tmp\fi 
    Within \tmp\fi - i should able to store my file,,,
    Kindly help me urgent...

    Hello San,
    Either contact Basis guys at ur end for the same or u can do it dynamically via a piece of ABAP code, i hope it wll help u.
    call function 'GUI_CREATE_DIRECTORY'
         exporting
    dirname = '//<ip_address>/qfilesvr400/<host>/usr/sap/TST/SYS/Folder1'
         exceptions
              failed  = 1
              others  = 2.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.

  • Directory content application server

    Hi,
    Is there any function module present of getting the contents of directory at application server ?
    Thanks,
    Amit R.

    Hi Amit,
    Use the below function module
    F4_DXFILENAME_TOPRECURSION

  • Creating Directory in Application Server

    Hi Friends,
    Can anyone help me on,
    How to create directory in application server.
    Also, I need to create one file in this directory with fixed name, how do we do that?
    Also, tell me how to use transaction FILE in detail...
    I am working on CRM and there is no transaction CB3Z ...
    Kindly help.
    Good answers will be rewarded...
    Cheers!
    Pradeep

    Hi Pradeep
    Refer the Links:
    <b>Creating a directory & subdirectory on Application Server
    API for creating a directory in the application server
    Regards,
    Sree

  • Directory in application server has multiple flat files

    Hi
    How should we know that the Directory in application server has multiple flat files.
    my requirement is, daily my program runs in batch at night. So, i  have to know are there more than 1 flat file existing in the directory.
    regards
    mac

    Try this FM,
      CALL FUNCTION 'SUBST_GET_FILE_LIST'
        EXPORTING
          dirname      = ws_filepath
          filenm       = ws_fname
        TABLES
          file_list    = i_rsfillst
        EXCEPTIONS
          access_error = 1
          OTHERS       = 2.
    Pass the path and
    say ur file name starts with ALPXXXXX
    then pass
    ws_fname =  'ALP*' .
    In the table i_rsfillst you will get all the file in directory.
    Try this through a sample prorgam ,dont try through SE37, it will show ACCESS_ERROR.
    Regards,
    Message was edited by: sreejesh purapadiath
    Message was edited by: sreejesh purapadiath

  • Download Excel file in the Unix directory of Application server

    Hi Friends,
    I have a requirement  of downloading the Excel file in the Unix directory path of the application server,i just need your inputs,it would be great help if you can send any sample coding for downlading the file in the Unix directory?
    Regards
    Dinesh

    You can use the following fm
    RZL_READ_FILE
    or
    use OPEN DATASET FOR INPUT.

  • New Directory in Application server Required for data upload

    Hi,
    I need to load data in SAP application server. i will use CG3X to load the data.
    I need to create a new directory in the application server to load all my flat files. Does any one know how to create a directoty?
    Please provide list of steps and transactions used for creating this.
    Thnks

    Go to t-code FILE.
    Click on Logical file path definition and hit the New Entries button
    Enter your logical path name, say ZXXX
    Go back to FILE
    In the right window, click on the block on the left to highlight the line you just created.
    Now double-click on Assignment of physical paths to logical path
    Now click New Entries.
    Select your syntax group (this is just your O/S)
    Here you can enter your physical path.

  • Listing files of directory on application server

    hi all,
    I want to download a list of files from the application server.
    I tried the functions:
    - SUBST_GET_FILE_LIST
    - EPS_GET_DIRECTORY_LISTING
    - RZL_READ_DIR_LOCAL
    but the result gives me the name of my file truncated.
    My filename is much longer than the functions give me.
    Is there any other function, or can i bypass this problem in a way.
    Thanks in advance.
    Merijn.

    Hello,
    This is a common problem with this FMs. Even SAP acknowledges this:
    In EPS_GET_DIRECTORY_LISTING you have this:
    data: begin of file,
            dirname(75) type c, " name of directory. (possibly truncated.)
            name(75)    type c, " name of entry. (possibly truncated.)
          end of file.
    The FM uses a Kernel Call 'C_DIR_READ_NEXT' to get the list of the files in the directory. The file name is returned in the field file-name.
    call 'C_DIR_READ_NEXT'
              id 'TYPE'   field file-type
              id 'NAME'   field file-name
              id 'LEN'    field file-len
              id 'OWNER'  field file-owner
              id 'MTIME'  field file-mtime
              id 'MODE'   field file-mode
              id 'ERRNO'  field file-errno
              id 'ERRMSG' field file-errmsg.
    The program RSWATCH0(trxn: AL11) also uses the Kernel call but the structure file is different.
    DIrectory name can be 1024 character long & file name is 260 character long
    data: begin of file,
            dirname(1024)    type c,  " name of directory. (possibly
                                           " truncated.)
            name(260)        type c, " name of entry. (possibly
                                           " truncated.)
            type(10)    type c,            " type of entry.
            len(8)      type p,            " length in bytes.
            owner(8)    type c,            " owner of the entry.
            mtime(6)    type p, " last modification date, seconds since 1970
            mode(9)     type c, " like "rwx-r-x--x": protection mode.
            useable(1)  type c,
            subrc(4)    type c,
            errno(3)    type c,
            errmsg(40)  type c,
            mod_date    type d,
            mod_time(8) type c,            " hh:mm:ss
            seen(1)     type c,
            changed(1)  type c,
          end of file.
    So one workaorund would be to copy EPS_GET_DIRECTORY_LISTING to some custom FM & change the length of the structure file to suit your requirement
    BR,
    Suhas
    PS: Use of Kernel Call is for internal use only & is highly not recommended by SAP.

  • Modifying destination Directory of Application server for Open Hub

    Hi All,
    i want to load a csv file on application server using Open Hub.
    when i have created the open hub i have specified the server name, the file name and the directory.
    but the Basis guys told me that i should use another directory, they have created me a Unix Directory but the problem that i can't modify the directory path in my open hub.
    can you tell me please what is the problem?
    another question why i can't modify directly in Production System this parameter of server name, directory for open hub,
    in production i can create the open hub but when i have transported some one from dev to prod i can't modify in prod, i have controlled from transport tool the possibility of modication object and i see that for opne hub is "original modificable"
    Thanks for your help
    Bilal

    i have read in some forum that to " to change the server name or logical file name we can do so in the following table:
    RSBFILE"
    i tried to see the data of this table and i found 2 records for my open hub, 1 for Active version and 1 for Modified version
    i tried here to change the path name of the directory and after saving the system give me the message that the active version and the modified version of my open hub are not equal, when i try to activate again my open hub the system take the old
    directory path.
    is this is the right table to change the directory path on application server of my open hub? or there is another table?
    i don't work with logical filename, i work with file name and directory path name.
    thanks for your help
    Bilal

  • Append data into the file in application server

    Hi Friends,
    I have an issue where i have a job which has three different stepst for same program. If i run the job the program will create a file in the application server and append the other two steps in the same file without overwriting the file or creating a new file.
    My problem is like its creating three different files in application server for that particular job since it has three steps . Its not appending into one particular file .
    I am using the FM 'Z_INTERFACE_FILE_WRITE' where i have used the pi_append in the exportng parameter . ITs working when i specify the file in local system. It is appending correctly when i run the report normally to apppend into local system.
    But when i schedule a job to append the file in application server its creating three different files.
    Kindly help me if anyone is aware of this issue
    Thanks in advance
    Kishore

    Hi,
    Please use open dataset to write and append files.Please check the logic of Z FM which you are using .
    To open and write into a file  use
    OPEN DATASET FNAME FOR OUTPUT.
    To append data into existing file use
    OPEN DATASET FNAME FOR APPENDING.
    To write into file:
    v_file = file path on application server
      OPEN DATASET v_file FOR output.
      IF sy-subrc NE 0.
    write:/ 'error opening file'.
      ELSE.
       TRANSFER data TO v_file.
      ENDIF.
    CLOSE DATASET v_file.
    For appending :
    OPEN DATASET v_file fOR APPENDING.(file is opened for appending data  position is set to the end of the file).
    Thanks and Regards,
    P.Bharadwaj

  • Downloading more than 1 file from Application server

    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 of issues in doing so.
    1. How to find the number of files present in that directory?
    2. How to retreive more than 1 file at a time from the directory.
    Its bit urgent.
    Cheers,
    Naveen
    NOTE: Points will be awarded to every useful answer.

    hi,
       hope this FM can help.
    PARAMETER: p_file           type pfeflnamel DEFAULT '/usr/sap/tmp'.
    data: begin of it_filedir occurs 10.
            include structure salfldir.
    data: end of it_filedir.
    START-OF-SELECTION.
    Get Current Directory Listing for OUT Dir
    call function 'RZL_READ_DIR_LOCAL'
           exporting
                name     = p_file
           tables
                file_tbl = it_filedir.
    List of files are contained within table it_filedir
      loop at it_filedir.
        write: / it_filedir-NAME.
      endloop.
    rgds
    Umakanth

  • Downloading logo in excel sheet from application server

    hi all
    how can i download a logo in excel sheet from the application server(logo is in OAOR tcode) .you can also specify with OOPS concept.
    rewards assured.
    Reagrds
    Swarnali Basu

    hi naresh
    i think there is some miscommunication in case of my question,my requirement is to add a logo in excel sheet from application server,i mean when the user clicks to download the excel sheet the logo should immediately appear in the excel sheet,and it is not a fixed logo it can be anything which appears in applicaton server(on that program).
    as far as excel sheet stanalone is concerned i know to do it and as well as to get the logo  in the application server standalone ,but i cant download the logo in excel sheet from the application server.now does my question make sense ?
    Reagrds
    Swarnali

  • Download ALV report with layout to application server

    Hi Gurus,
    I have a problem as follows:
    I have one ALV Grid report. This report is very time consuming.
    That is why, user wants this to be run in background every night and in the morning when user comes to the office that ALV report should be on user's drive in excel format.
    However, it should run with one specific variant and that variant should be dynamically populated. (I have handled this part)
    It should also apply specific layout that has many filtering conditions.
    As I can not download ALV to excel in background, I decided to download it to the Application server.
    My problem is that when run in background, in spool ALV report shows o/p with proper filter conditions that is 5 out of 20 records.
    But, when I write this report o/p to Application server, it writes all the records in there, i.e., all 20 records. It does not take into account all the filters. [:(]
    I also tried downloading spool to excel, but o/p is not neatly formatted. All columns are fying here and there.
    Any suggestion, how can I write ALV o/p to Application server with layout into consideration?
    P.S. I have searched forum for this type of query, but no apt responses.
    Thanks

    did u downloaded the report with standard option provided in the alv and checked the data? that is populating all 20 records?. if so then use coding for achieving the standard one
    at the end of selection do like this ..
    SET USER-COMMAND ' %PC' .
    and in the user-command use like this..
    case sy-ucomm.
    when '  %PC'.
    give the file name ..
    do processing ..
    endcase.

  • Query running backgroup how to download result to specified directory?

    Hi Expert,
    according to the current business requirement, I have create a query via SQ02 AND SQ01 and it runs smoothly, but now the user want to run this query periodically every 10 mins and want to write the result into spicified dirctory in the desktop.
    I write a ABAP code in the query and use the function module GUI_DOWNLOAD, it works in online execution, but when I schedule this query as background, the system can not download the result into specified directory and the system prompts error:FES--022.
    do you have any good idea?
    thank you in advance!

    xioliu,
    I don't think that is possible as long as it is executed in the background. Options for the background will be 1) to send an e-mail from the program with attachment, or 2) save it into SAP Server and pull that via ftp into whatever the server the user has access to.
    Cheers,
    Akio

Maybe you are looking for

  • Create a pdf where the Bookmark Navigation Panel is always shown on start up

    Hi all, I have Acrobat 8.0 & InDesign 5.0.1. I have created a .pdf with Bookmarks to aid navigation. I would like the Bookmarks Navigation Panel to always show when pdf is opened in Adobe reader, not just on my machine but on everyone who recives the

  • Display gl account field

    Hi Consultant, Can anyone advise me the field below in fs00? i check in F1 but still not clear. 1) what is valuation group under control data tab? 2) what is recon account ready for input under create/bank/interest tab? 3) what is interest calculatio

  • I'm looking for DW MX6

    Hello, Does anyone know where I can buy Dreamweaver MX (version 6)? Thanks

  • Halftones and dpi for screen printing

    I am creating a halftone effect on a black and white picture for screen printing, using photoshop.  I know about where to place my LPI, however, Im not sure where I should put my DPI.   If anyone can help with some advice, I would appreciate it.   I

  • How do you add more Artboards numerically?

    Ok, I know how to go into edit artboards and option drag the artboard to add artboards. But how can I numerically specify that I want, say, 12 artboards instead of 2. (Like adding pages in InDesign)