Sender File Adapter - remote FTP server program execution

Hi all,
I have a scenario
X12 -> XI -> File
where sender File adapter is used. The input file is X12 txt document which needs to be converted into X12 xml format. I have created astylus studio XSLT mapping which uses Convertor to convert this txt file to X12 XML.
I don't know how to configure sender file adpater to run this mapping on the source file before picking it up. have created a windows batch file on the FTP server which runs tis XSLT mapping on the txt file and replaces it with X12 format xml. This batch file uses command line parameters of stylus studio to run XSLT mapping on input txt file and generates an xml.
I am not sure how to run this mapping on the input file before processing starts in PI file adapater.
I tried running command line parameters of Sender file adapter but that didn't worked.
Please help.
Thanks
-Kulwant

Hi, Kulwant:
Looks like you would like to execute your mapping program before file adapter pick it up.
Right ? for one interface, it seems out of the XI scope, however if this is your requirement, you can separate into two interfaces:
The first interface is file to file scenario, it is used to execute your mapping program:
The file sender just pick up the txt file, send to integration engine.
Your Message Mapping program need to specify your XSLT mapping, after the mapping, the message is XML format,
then you will use file receiver to send it to certain directory.
Now the XML format file is your input of your second interface.
Regards.
Liang

Similar Messages

  • Regarding receiver FILE adapter,  REMOTE FTP server

    Hi All,
    The scenario was to get XML file from a local FTP server and to place that XML file in REMOTE FTP server, which we dont have any control over that REMOTE FTP,
    While executing the scenario it is successfully picked the file and processed and it was success in SXMB_MONI, but when we see the Communication Chaneel of the receiver adapter it is generating the following error..
    Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
    clarifications needed ASAP
    regards,
    Kishore.

    Hi,
    Verify the Host details of the Remote FTP.
    Try to ping the Remote host as below
    Goto > start>Run --->type cmd and give the command as below
    c:\>ping <host details or IP address> press enter and see if you get the successful communication response.
    If its not it indicates that the connection is not setup.
    Ask you FTP administrators to look into connectivity issue for it.
    Thanks
    Swarup

  • Rename and move files on remote FTP server

    Hello,
    We have a scenario where XI transfers a file to a remote FTP server at partner end using File Receiver Communication channel.
    These files are huge,so there is a risk of picking up incomplete files at their end when XI is still writing the file on their server.
    Hence,we have decided to follow the approach which is already mentioned a number of times on SDN that XI would place a file with different name and in a different folder on partner's FTP server.
    This would then be renamed and moved to the required folder on the same server.
    This could easily be managed using a script at partner end but there are some problems when they are not able to do this.
    Is there a possibility to achieve this using 'Run OS command after Message Processing' in XI when Source and target folders both are on partner's FTP server?
    If yes,can anybody please provide code for such a script and corresponding setting for this parameter in XI Communication channel?
    Thanks a lot in advance.
    Best Regards,
    Shweta

    Hello,
    Thanks for the reply.
    But this has to be done in FTP session because the source and target directory both are on remote FTP server.
    Instead,in SAP documentation,I found a parameter :
    ftp.putSafe=YES|NO
    Use this specification to define whether a transferred file is first created with a temporary name and only renamed once the transfer is complete (YES), or whether it is created with its final name at the start of the transfer (NO). The latter case can lead to problems if an application on the FTP server accesses the file before the transfer is complete. If you specify YES, this problem is avoided because the file only becomes visible with the search name when the transfer is complete.
    The default value is NO.
    Doesn't it serve the same purpose?Do we still need to write scripts?
    I have tried to include this in Additional Parameters in Advanced Mode as:
    ftp.putSafe  YES
    but I can't check in test system whether it is really working or not.I would like to confirm if it helps.
    First of all,I would like to know if this setting works for XI3.0 SP17.
    Can anyone please help.
    Thanks.
    Regards,
    Shweta

  • Receiver File Adapter - Dynamic FTP Server Address

    Hi,  I would like to pass the FTP Server address to the Receiver File Adapter as an parameter.  Is this possible and if so what Name Space / Parametr Names add to the Product to define these values.
    Thanks
    Andre

    Hi Andre,
    If you have your server as a part of your payload, thendynamic file server generation concept can be done is as follows. 
    In your server name field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Regards,
    Bhavesh

  • Sender File Adapter (FTP Protocol)

    Hi Every Body,
    I have a problem in using Sender File Adapter of (FTP Protocol Type)
    I have given all required settings to get connected to the FTP Server.
    When i give ( Source Directory and Exact File Name ex : MDMERP.xml)
    File gets picked up.
    But When i give (Source Directory and Exact File Name ex : *.xml)
    it gives below exception
    Error occurred while connecting to the FTP server "mdmerp6:21": java.net.ConnectException: Connection refused: connect
    Strange any guess !! :(((
    Regards
    Srinivas

    Hi,
    If that is connection error then it should have not allowed to pick up when i have given the specifif file name ,
    .xml is too not working
    my problem all starts if i use other than file name declarartion it throws error
    of below kind
    Error occurred while connecting to the FTP server "mdxxxp6:21": java.net.ConnectException: Connection refused: connect
    Can i use " Advanced Selection of Source File" and make it run\
    With regards
    Srini

  • Sender File Adapter  not able to get file via FTP from an external system

    Hi,
    I have a Sender File Adapter using FTP which polls a server every 10 seconds looking for a file ".xml".  The adapter will connect and pick up the waiting file, but sometimes the adapter not able to get file via FTP from an external system. The file is on the server, but despite the polling, the adapter does not pick up it. There is no return error.
    The connect mode is Permanently and the transfer mode is Binary.
    Can you help me?
    Thanks.
    T.

    Hi Teresa,
    does this case appears with a file size higher the others?
    Personally, I do not recommend to have a polling under 1min.
    10s could be too just, if the file is not small and/or if the file server is far (several kilometers) to where the Adapter Engine is, and/or this file server is beside a firewall. Do not forget also that, with previous points, you could have like a conflict, betwen the 1st polling and the 2nd polling, if in less 10s PI adapter has not enough time: to connect to the FTP server (several Km), find the file (perhaps among 100 other files in the directory), go back to the file to Adapter Engine server (several Km again), convert your file to XML message (with a complex Content Conversion), then check the XML structure, and when all that is done, return back to FTP server (several Km), to archive the source file... Well It's my understanding of a FTP exchange with FILE adapter...
    If you really need a 10s polling, that's mean your have a pseudo real time interface. In that case, in my mind file should not be used! but we should use a Web service, JDBC JMS (any exchange without a physical object like a file). For me, it's a non-sens to have a file in that case.
    regards.
    mickael

  • How to archive files in another ftp server?

    Hi,gurus:
       My scenario is file to file and my sender adapter is ftp adapter.
       Now I want to archive the send file in another ftp server,how can I  implement it?
       There is a parameter "Archive files on FTP server" when I choose the processing mode "archive".What's  it's use?Thanks in advance.

    Hi,Santhosh:
      Thanks for your reply.
      I have checked your blog before,and it is very useful for me.
      I still have a problem about command line.
      In an sap note,I found the principle of the execution of the command line is like below code:
    import java.util.*;
    import java.io.*;
    public class test {
    public static void main(String args[]) {
    try {
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("C:/data/test.bat <param1> <param2>");
    } catch (Exception e) {
    e.printStackTrace();
    But you know this method has restriction.If my bat file has many commands,it only execute a part of commands(sometimes 8,sometimes 9 ).
    My bat file is like below:
    echo open 192.168.67.149 >c:
    data
    copyResult.txt
    echo <username> >>c:
    data
    copyResult.txt
    echo <password> >>c:
    data
    copyResult.txt
    echo cd /receive>>c:
    data
    copyResult.txt
    echo get %2>>c:
    data
    copyResult.txt
    echo cd /ok>>c:
    data
    copyResult.txt
    echo put %2>>c:
    data
    copyResult.txt
    echo cd /archive>>c:
    data
    copyResult.txt
    echo delete send.txt>>c:
    data
    copyResult.txt
    echo quit >>c:
    data
    copyResult.txt
    ftp -s:c:
    data
    copyResult.txt
    del %2
    I wanna merge all the "echo" in one command,so it may execute successfully,but I don't know the method.Any ideas?

  • Send a mail if no file in Sender File Adapter

    Hello guys,
    I have one doubt. I have a sender File adapter with FTP transfer protocol. I want to pull the file every 24 hours. If the file does not exist, there is any way to have an error and send a mail to the client?
    Is a requierement to do one interface, they want that XI sends a mail if no file is encounteref in the server when XI goes to pull the file. Is this possible?
    Many thanks in advance.
    Regards,
    Xavi.

    Hi,
    Refer to following link
    Read Excel instead of XML through FileAdapter
    This has good example of developing module. Only code is available. For further help you can look in Help.sap for crating module they also provide sample code.
    No need to call alert from module . go upto 24 hars if no file is received set your own structure.
    Give condition in receiver detrmination to send mail if file is not picked.
    revert back for any clearity.
    Thanks
    Sunil Singh

  • Problem in sender file adapter

    Hi all,
      I have a sender file adapter using ftp with processing mode delete. But my input file is not getting deleted. In RWB, the adapter satus is green with msg processed sucessfully. I tried with a file name that is not available in the ftp folder, but still the adapter status is green with msg processed succesfully.
    Help me debug this error.
    Regards,
    Jai Shankar.

    Are you using Content conversion ?
    If adapter monitoring is green, and shows processed successfully, then if you have any errors , you can see in the RWB->Message Monitoring->Audit Log (Message display Tool).
    If there is no error, then try to do the cache refresh as I told. Ask Admin help for that. Restarting a Adapter engine may help you here/
    Regards,
    moorthy

  • File Archive in FTP Server

    I'm using odiscpget to extract file from remote FTP server and i have a requirement to archive the file after successful extraction into archive directory in the same server.
    Do i have an utility to perform a file move in remote server from ODI?
    Thanks in Advance

    odiscpput will look for a file in local directory to move to remote server isn't it?Yes .. it is.
    If you want to do file operation on the remote server only then you need to write your own code for it.

  • Sender file adapter is not picking the file from windows server

    Hi Experts,
    We have a sender file adapter running on Unix server. Now we have changed the source directory path from Unix to Windows in file access parameters.  It is not picking the files from windows directory and not showing any error.
    In this scenario, input file for sender adapter is *.xml and no content conversion.
    Could any one please let me know is there anything needs to changed in file adapter.
    Thanks in advance,
    Sridhar. M

    Sridhar,
    What do you have in the directory path?
    If it is a shared drive in unix then the directory in windows should also be a shared drive from XI system. Else if it is FTP check the address.
    Regards,
    ---Satish

  • SENDER FILE ADAPTER (FTP) ERROR

    Hi,
    Iam getting the following error in sender file adapter:
    Could not process due to error: com.sap.aii.adapter.file.ftp.FTPEx: 550 *** ERROR *** NO BATCHES FOR TRANSMISSION
    Could anyone help me in this.
    Thanks &Regards,
    Kiran

    Hi Kiran,
    This problem is not related to PI but rather related to FTP server settings.
    Try changing the name of the file in your adapter settings to a string without any dots and ".
    Try this and let me know if its successful.
    Regards,
    Divya

  • Failover solution for Sender File Adapter (FTP)

    Hi guys,
    I have a scenario FTP->Idoc. Is it possible within PI to create a functionality, that if a connection to one FTP fails, it will switch to another FTP?
    Thank you,
    Peter

    Hi,
    You may maintain two seperate Sender adapters with seperate FTP server and fix the polling interval to sequence the calling of file.
    But if the file is available on both the FTP servers then there will be two calls always.
    So you need to maintain the file in any one of the FTP server.
    But this is just the manipulation, not the precise solution. You may go for BPM also
    In communication channel there is no such feasibility. Probably you may need to go for customized adapter modules.
    Thanks
    swarup
    Edited by: Swarup Sawant on Sep 2, 2008 11:42 AM

  • Using wildcards (*) in sender file adapter - FTP type

    Hi guys!
    Dooes it work using wildcards in sender file adapter (FTP type(!) (filesystem obviously work))? I tried it and it failed. it works only for exact name..
    I read some articles about FTP and the result is, that ftp work always only with 1 file, so I'm wondering, if this is possible.
    Thanks for info!
    Olian

    Thanks for all replies..
    I know of course, that * can be used, I use it in many scenarios too. But on a FileSystem. It is not working if the sender type is FTP.
    *, ., *.dat, ...  nothing like that works..  Just exact file name.
    I am able to pick up file, if I specify it's exact name, so there should be no problem with permissions..
    Please, I'd appreciate one reply with comfirmation: yes, we are using asterisk (*) , we access source files via FTP and they are processed.
    Is there anybody with this experience, that it works?
    Thank you!
    Olian

  • Issue while fetching the file through *.extension by FTP sender file adapte

    Hello Experts,
    I am facing a issue while fetching the data through sender File adapter with  ' *.file extension' .I am illustarting the scenario as below .
    It is a simple scenarion of File to File inboumd scenarion.Here file is getting picked up from a third party system
    through FTP sender chanel and stored in a temp folder of PI through NFS rceiver file adapter .
        The problem is however I am getting, while picking the file with file name as "*.exo"(where exo is the file extension).
    But while fetching the file with particular name like"abcd_10032011*.exo"(file naming has been done by combination of abcd(always same)_currentdate(change according to current date)),file picked successfully .
    So here ,in the prior case file not getting picked up,but in later case it dose .
    Can anyone please let me know what might be the issue?

    Hi Sunit,
    Connect from your PI System to 3rd Party System (where are placed the Source Files)
    FTP <PartySystemHostName>
    eg. FTP 10.2.3.456 (then insert Username & Password to Login)
    Go to source directory
    cd \<SourceDirectory>
    eg. cd \donaldduck\directory\
    Execute a File List command
    ls -la *.<extension>
    eg. ls -la *.exo
    In this way you should be able to view all files with this extension (*.exo), the same action that Sap XI perform to pickup the file.
    Then, try to copy that file to your Local PI System (to check if there're some permissions issue):
    mget <filename>.exo
    eg. mpget File1_01012011.exo

Maybe you are looking for

  • Setting refresh rate with DisplayMode

    I'm having a problems setting the refresh rate of the DisplayMode, originally I used this method to create a display mode: DisplayMode(320, 240, 16, DisplayMode.REFRESH_RATE_UNKNOWN);This worked fine and ran my game at the above resolution, however I

  • BW - HR Topics

    Hi, i am bw consultant and have been working was extracting data from mm and sd..now our company is implementing HR module..for that reason i wanted to learn SAP HR module. could anyone let me know  HR topics that are related  to bw hr extraction?

  • Is it good way of using this?

    Hi Experts,                  Is it using inside loop ,  select single - statement,  is it good way of using this during performance? Pls suggest me

  • IBook G4 - Problems Starting after installing RAM

    I installed a 512 MB RAM chip last night, triple-checked it for correct specifications. I've installed, uninstalled, and re-installed it several times, each time getting the same problem. I turn my iBook on, the start-up screen does its thing, and th

  • [Fla] Mostrar imagen cuando no tienen plugin de Flash

    Hola! ¿Cómo puedo hacer para mostrar una imagen en lugar del swf cuando la persona no tiene el plgugin de Flash instalado???? Teniendo en cuenta que uso el script flashobject.js para activar el flash en IE. Muchas gracias, XL