Getting the file from IIS FTP Server using ALSB

Hi,
I want to extract a file from FTP server in ALSB.I am using ALSB2.5 and Microsoft IIS FTP Server.
Now i want to know that
1.Do i need to configure a Proxy service or Business Service to poll a file from FTP server?
2.How to read the contents of the file once the File comes in?
Regards,
Indu Garg

You need to configure a Proxy service for the polling.
The contents of the file will be inside the context variable $body.

Similar Messages

  • How to get pdf file from sap presentation server using java connector

    Hi Friends,
    with the below code i am able to get po details in pdf in presentation server.
    DATA : w_url TYPE string
           VALUE 'C:\Documents and Settings\1011\Solutions\web\files\podet.pdf'.
    CALL FUNCTION 'ECP_PDF_DISPLAY'
            EXPORTING
              purchase_order       = i_ponum
           IMPORTING
      PDF_BYTECOUNT        =
             pdf                  = file  " data in Xsting format
    *Converting Xstring to binary_tab
          CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
            EXPORTING
              buffer                = file
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
            TABLES
              binary_tab            = it_bin " data in binary format
    **Downloading into PDF file
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
      BIN_FILESIZE                    =
              filename                        = w_url
              filetype                        = 'BIN'
             TABLES
              data_tab                        = it_bin
    when i am using java connector , to retirve the file from presentation server , the follwoing error i am getting...
    init:
    deps-jar:
    compile-single:
    run-single:
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Error in Control Framework
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(MiddlewareRFC.java:1244)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3842)
            at com.sap.mw.jco.JCO$Client.execute(JCO.java:3287)
            at PdfGen.<init>(PdfGen.java:35)
            at PdfGen.main(PdfGen.java:78)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)
    i debugged too, problem with <b>gui_download......</b>
    I am very glad to all with your suggestions!!
    Regards,
    Madhu..!!

    Hi
    You can try to create an external command (transaction SM69).......sorry I've forgotten,,,,they works on application
    How do you call CL_GUI_FRONTEND_SERVICES=>EXECUTE?
    Max
    Edited by: max bianchi on Oct 13, 2011 10:27 AM

  • Is there any way to get the files from other computer ?

    Hai all,
    I have 2 computers connected. I know the IP address of other computer. Is there any way to get the files from other computer. (for e.g. I want to get the files from specific folder. In Java netwroking is it possible? (Any programs)
    regards,
    Namanc

    Bro Take it easy.
    Think you need to send a Image file named ("abc.gif")
    now develop a server using ServerSocket and connect it in local IP and any PORT
    For example i think ur server is connected in "localhost" and 9000 port.
    Now make ur server educated using some commands.
    For example:
    FileName: <File Name String>
    [Means new file is sending by connected client]
    FileSize: <File size long or int value>
    [ So that ur server can determind about the total length of sender file]
    DataModeOpen
    [Now your client will send its image data, this command means your client software is sending data]
    fjadlkfjaofaijojfwoeiurfodkjflsajlfksa
    l23j4lj23lkjlasjfoq23j4rokjelfkjasldkf
    2o3j4lk2j3ljslakdjf2l3j4 l23kjlk23k4j
    DataModeClose
    [Means file sending finished]
    Close
    [Means your client connection is closed]
    Now develop a client supporting this command.
    For example(Server):
    String getFileName=null;
    long getFileSize=0;
    public handleCommand(String getCmd) {
        if(getCmd.startsWith("FileName")) {
                String[] splitData=getCmd.split(":");
                this.getFileName=   splitData[1];
                outPutStream.writeBytes("+OK");
        } else if(getCmd.startsWith("FileSize")) {
                String[] splitData=getCmd.split(":");
                this.getFileSize=Long.parseLong(splitData[1]);
                outPutStream.writeBytes("+OK");
        } else if(getCmd.startsWith("DataModeOpen")) {
               //data mode open so receive data
              receiveData();
              outPutStream.writeBytes("+OK");
        } else if(getCmd.startsWith("DataModeClose")) {
              //close client socket
             getClientSocket.close();
    }For client:
    DataInputStream dataIn=null;
    BufferedOutputStream bout=null;
    public sendFile(bytes[] getBytes) {
            //if ok found then do other or show error message
        if(sendCmd("FileName:"+getFileName)) {
            if(sendCmd("FileSize:"+getFileSize)) {
                if(sendCmd("DataModeOpen")) {
                   bout.write(getBytes);
                } else {
                   showError(3);
            } else {
                   showError(2);
       } else {
            showError(1);
    }i think it will help u

  • 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
    paul

    Hi Paul,
    Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
    In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
    Check this code.
    REPORT ZSHAIL_SPLITFILE.
    data: it_tab type filetable with header line,
          gd_subrc type i.
    tables: rlgrap.
    data: path type string,
          file_name type string.
    parameters file_nam type rlgrap-filename .
    data: user_act type i.
    at selection-screen on value-request for file_nam.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      EXPORTING
        WINDOW_TITLE            = 'select a file'
       DEFAULT_EXTENSION       = '*.txt
        DEFAULT_FILENAME        = ''
        FILE_FILTER             = '*.txt'
        INITIAL_DIRECTORY       = ''
        MULTISELECTION          = abap_false
       WITH_ENCODING           =
      CHANGING
        file_table              = it_tab[]
        rc                      = gd_subrc
        USER_ACTION             = user_act
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if user_act = '0'.
    loop at it_tab.
    file_nam = it_tab-filename.
    endloop.
    endif.
    path = file_nam.
    CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
      EXPORTING
        full_name           = path
    IMPORTING
       STRIPPED_NAME       = file_name
      FILE_PATH           =
    EXCEPTIONS
      X_ERROR             = 1
      OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    at selection-screen.
    message i001(zmess) with file_name.
    Regards,
    SP.

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • Getting the output from a Perl script using Runtime.exec

    I cannot get the output from a perl script using Java. Can someone PLEASE help?
    I used the following code:
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    InputSream in = p.getInputStream();
    b...
    do
    System.out.println(b);
    while ((b = in.read()) > 0)
    But there is no way that I get the output in the inputstream. If I use the command "cmd script.pl", the output is displayed in the Dos box, but also not in the inputstream.
    I will appreciate any help.

    Try this
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    BufferedReader rd = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String str;
    while((str=rd.readLine())!=null){
    System.out.println(str);
    Manu

  • I have an old iPod Classic with 80 GB (I think) of space. I saved all my songs in an external hard drive, but the iTunes library resided in an old computer (no longer working). Can I get the libray from my iPod and use it in my new computer (Windows)?

    I have an old iPod Classic with 80 GB (I think) of space. I saved all my songs in an external hard drive, but the iTunes library resided in an old computer (no longer working). Can I get the library from my iPod and use it in my new computer (Windows)?

    You might want to check your process for moving your iTunes music against this: http://support.apple.com/kb/HT4527.

  • 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 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

    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

  • Getting the files from a web directory...?

    Sigh I've spent the last couple hours googling, forum searching, API sweeping, and experimenting.. I just can't figure this one out.
    I've got a game which reads levels from a text file. This is all fully functional. I've decided that I want my game to be able to query some website which I will be using for free hosting (Currently an ftp server) with all the levels in a folder called "newLevels", to get a list (Preferably in array format, but any list will do.) of the names of the files inside the folder. For example: At ftp://address/newLevels, there are currently three files. "Claustro.lvl", "DragonFort.lvl", and "Surlicster.lvl". All files within this folder will have the ".lvl" extension. My extensive google-research has helped me to find a class that will copy a file from a server to hard disk. But I will have no way of knowing which files are on the server, unless I have every client write a new level name to a text field. But in this case.. What's the point in having an auto-updater in the first place? Does anybody know of some sort of way to get a list of what is in a web based folder? Sadly, there's no such thing as a URL.list() method, which really sucks.

    Thanks for the suggestion. I guess I'll just stick to FTP, then. I developed an idea that seem to work for two different ftp servers (My personal one, and the one provided by funpic.org) while waiting for a reply.
    I found an algorithm written by someone else that reads in an ftp page, and displays every single character. There was a consistency here: read/write priveledges, date modified, etc etc. They were all seperated by spaces. And then eventually the filename. I told it to count the 'words' (sets of characters seperated by spaces) until it reached 9, at this point, it has reached the filename. It reads until the filename being saved (one character at a time) has a '.lvl' at the end, and then it resets those counting variables, and stores the filename in a vector aptly named 'files'.
    I used another algorithm written by some other person that downloads files from an ftp, and sent it the filenames one at a time.
    It's working for me, but I'm not sure if this would be considered 'disgustingly inefficient' by the superiors of programming.

  • ALSB 3.0:  Unable to retrieve files from Novell FTP Server

    I have written several ALSB proxy services that retrieve data from Unix FTP servers. This works great and I haven't experienced any major issues. However, I now have to write a service that monitors a directory on a Novell FTP server. The same exact code works great pointed against a unix ftp server, but when pointed against the Novell FTP server, the proxy service never finds any files to process even though I have manually connected to that ftp server using the same id/password and have been able to see the files.
    All the proxy is supposed to do is poll for files and copy them to the ALSB server for processing. Very very simplistic and works great against a Unix ftp server.
    I turned on the transport debug option and this is all that shows:
    &lt;Ftp Client created and connected successfully for '+my_server+:21 for user:+myuserid+&gt;
    &lt;+FileWorkPartitioningAgent.execute()&gt;
    &lt;Returning 0 tasks.&gt;
    &lt;-FileWorkPartitioningAgent.execute()&gt;
    We ran a packet trace on the server and we see the following commands being executed:
    User myuserid
    mypassword
    SYST
    TYPE i
    PASV
    list .
    TYPE i
    PASV
    list .
    quit
    The files are in the "landing" directory for the user, so I am certain that it isn't a pathing issue. I'm just running out of ideas.
    Some questions I have are:
    1. has anyone experienced/resolved this issue before?
    2. is there any way to do custom configuration of the ftp client (disable the PASV aka passive mode, enable debugging, etc) used by the FTP transport?
    3. Could the FTP Transport not like the format of the list results from the Novell FTP server?
    If anyone has any thoughts, I'd love to hear them.
    Thanks!

    Hi Iccarus
    I realise its been quite a while since you wrote this thread but, in my desperation, I hoped you might have made some progress on this. I too am having almost identical issues:
    1. Can get/put files via ALSB ftp from/to unix or microsoft ftp server
    2. Can put files via ALSB ftp to the problem ftp server (not sure of its flavour atm)
    3. Can get/put files from the command line from/to the problem ftp server
    4. Cant get files via ALSB ftp from the problem server
    The commands which were executed at the problem server are very similar to those you found:
    successful login
    ls
    ls
    quit
    Any insights would be greatly appreciated

  • Help Fetching files from an FTP server into a DBase or local folder

    Hello Gurus!
    I need help to automate or design/write an app capable of (replace a manual process) reading log files in an ftp server folder, this log files are called CDR (Call Detail Record) and named as follow cdr.txt.20020221010000 meaning that this log file was created on 2002/02/21 at 01:00:00.
    This CDR log files are generated every hour by a Lucent telephone switch using a software/program called EXS ExchangePlus in ASCII format (fixed length delaminated, Char data type). EXS ExchangePlus writes a record in this CDR/log files after the call is completed, i.e. Calling_Number, Called_Number, Date_connect (yyyymmdd), Time_connect (hhmmss), Charged_time (hhmmss, duration of the call), and so on.
    The manual process I am using now is:
    1. Log in the ftp server into the folder where the CDRs log files are, located the latest generated CDRs log files and downloaded them into a local folder/directory. Normally I download the CDR for full day or 24 CDRs log files.
    1a. Optionally sometimes I used a program called VEdit compiled/gather all 24 CDRs into a single file.
    2. Once I have downloaded the CDRs I want to process (normally I process a full day 24 CDRs) I imported then into a Data Base temp table, where then I do the conversion of data types (i.e. Dates and times fields from char type -> to ->Date type) and calculations for billing purposes.
    So if somebody can help with this, I would really appreciated ideas or any kind of information on how to automated this process.
    I�m familiar with Java2 platform (using JDeveloper ) so if somebody has done something like this before using java, this would very helpful. Or Maybe using Visual Basic 6.0 would help too.
    Thanks Gurus, and I look forward to hear from you soon!
    Alf Pathros!

    Thanks for the idea, even though an example would help me more.
    I already found the FTPClient class.
    I also would like to knwo if there is a away Ican append/merged various files CDRs into a single/one to then dump/import it into the database

  • Help ...how to get the file size on a server

    Hi.I use this code to parse a file that is on a server.
    The question is: how can i get the file size (bytes size)?
    Thanks.
    //Open the file for reading:
    URL u = new URL(entry);
    InputStream inputXML = u.openStream();
    //Build document:
    DocumentBuilder builder = factory.newDocumentBuilder();
    doc = builder.parse(inputXML);

    Try this instead:
    URL u = new URL(entry);
    URLConnection conn = u.openConnection();
    // get the file size
    int size = conn.getContentLength();
    // open the input stream from the URLConnection (which is functionally the same as opening it directly from the URL)
    InputStream inputXML = conn.getInputStream();
    Shaun

  • Transfer file from client to server using http

    HI friends,
    I want to transfer files from client to server...I tried that with the help of socket and rmi..........
    But Http is only the best mechanism for my application..........
    Without using servlets, how to transfer files with the help of http.....
    Any help would be appreciated.......

    Google is your friend, and appearently www.jguru.com also:
    http://www.jguru.com/faq/view.jsp?EID=160

  • How to get the files from Time Capsule

    Hi everyone. I have a old model of Time Capsule which is never used before. I just have finished the setup and now the Time Machine is doing backup. May I know that after the backup is done, how can I get the files (e.g. photos, mp3, video...) from the Time Capsule or Time Machine?
    Thanks for you help.

    You can use Time Machine, the Migration Assistant, or the Setup Assistant to restore data from it.
    (125023)

  • Iphone and computer died, need to get the files from hard drive

    Iphone and computer died at the same time, my hard drive on the computer is ok, i did a external connection of my hard drive to my laptop, my iphone was backed up on itunes on the computer which are on the hard drive, how do i extract contacts and other files from the hard drive thanks

    If the old drive is not accessible then, no, you will not be able to access all your files on it. In this case you may need to look at the following:
    Basics of File Recovery
    Files in Trash
    If you simply put files in the Trash you can restore them by opening the Trash (left-click on the Trash icon) and drag the files from the Trash to your Desktop or other desired location. OS X also provides a short-cut to undo the last item moved to the Trash -press COMMAND-Z.
    If you empty the Trash the files are gone. If a program does an immediate delete rather than moving files to the Trash, then the files are gone. Recovery is possible but you must not allow any additional writes to the hard drive - shut it down. When files are deleted only the directory entries, not the files themselves, is modified. The space occupied by the files has been returned to the system as available for storage, but the files are still on the drive. Writing to the drive will then eventually overwrite the space once occupied by the deleted files in which case the files are lost permanently. Also if you save a file over an existing file of the same name, then the old file is overwritten and cannot be recovered.
    General File Recovery
    If you stop using the drive it's possible to recover deleted files that have not been overwritten with recovery software such as Data Rescue II, File Salvage or TechTool Pro. Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.
    The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
    Also visit The XLab FAQs and read the FAQ on Data Recovery.

Maybe you are looking for

  • Decimal places in Pur docs - URGENT

    Hi We have requirement in our project where we need to accomodate 4 decimal places in the PRICE field instead of the 2. For example we load an item from catalogs or external supplier site, where the price is 75.3492 the price gets rounded off to 75.3

  • Mapping of Java object to ABAP

    Hey Guys, i am facing the following problem. in abap i get a table from a function back. i am copying these values to my outboundcontainer. in java i map them to an array of beans, work with them... now i want to store them in my database in the back

  • To consider subcontract stock during mrp run

    Dear all, while mrp run it is not considering subcontractor stock .Is there any setting in spro so that it will consider subcontractor stock into consideration. with regards cp vijaya kumar

  • Why does it still think internet explorer is still open when it isnt?

    Every time I get to 50% downloaded for the flash player, then it pops up with a screen saying to close internet explorer, so i do, yet it doesn absolutey nothing and insists that it is still running. Therefore it will never go past 50% downloaded.

  • Input Form/Reports Refresh time

    Hi all, We have input form/reports which takes about 45 seconds to refresh which is ok for the first time but the frustration from the user community is that every subsequent refresh also takes 45 seconds for even a small change. Is that possible to