Filename from payload - FTP receiver adapter

Hello everyone!
I have a scenario wherein I need to get the value from a field coming from an IDOC and then give that value as the "filename" of the file that is saved in the FTP folder.
IDOC > XI > FILE
For example, if /ORDERS05/IDOC/E1EDK02/BELNR = 620000123
then I want the name of the file to be saved in the FTP folder to be 620000123.xml
I understand you may use the 'variable substitution' property in the FTP receiver adapter, but subsequent attempts at trying to configure that property have resulted in errors. Can anyone help me out?
Warm regards,
Glenn

do u have recordset name (root message)
For Ex: If you want to refer to the field which is bold
below is your variable substuition:
payload:root,1,e1,1,e2,2
<?xml version="1.0" encoding="UTF-8" ?>
<root>
  <dummy>
     <e1>
        <e2>Data_1</e2>
        <f/>
       <g attr="abc">text</g>
        <e2>Data_2</e2>
     </e1>
  </dummy>
  <e1>
     <e2>illegal/value</e2>
     <f/>
     <g attr="abc">text</g>
     <e2 attr="fghij">Example Value</e2>
   </e1>
</root>
Similarly
for your strucutre:
<MS_MT>
<order>
      <number>
the variable substuition would be
payload:MS_MT,1,order,1,number,1
you have to give complete XML to arrive to this value.

Similar Messages

  • FTP  receiver adapter does not transfer (STORE) file

    Hello gurus,
    In my scenario I want to transfer files from server X to server Y using FTP.
    To get the files from server-X I use the FTP sender adapter, to put the files on server-Y I user the FTP receiver adapter.
    Getting the file (QoS = EOIO) is not a problem; I see the result is SXM_MONI.
    Putting the file doesn't seem to work; I don't have an error message in SXMB_MONI but the file is not physical stored on server-Y.
    When I monitor server-Y I see that XI connects with the configured user/pwd and even creates the directory when it doesn't exist but the file is not STORED.
    I'm not using the BPE, this is a very simple and basic scenario: what comes in, goes out.
    Can you please advice what might be the cause of the strange behavior?
    Many thanks - Danny

    Hello Michal, thanks for your (very) quick reply.
    this is the result:
    1) adapter monitoring
    <b>Status to be delivered:</b>
    - Message successfully received by messaging system. Profile: XI URL: http://xdsci.cie.etat.lu:53100/MessagingSystem/receive/AFW/XI Credential (User): XIISUSER
    - Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    - Message successfully put into the queue.
    2) sxmb_moni
    - no error
    3) communication channel monitor
    - Message successfully received by messaging system. Profile: XI URL: http://xdsci.cie.etat.lu:53100/MessagingSystem/receive/AFW/XI Credential (User): XIISUSER
    - Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    - Message successfully put into the queue.
    - The message was successfully retrieved from the receive queue.
    - The message status set to DLNG.
    - Delivering to channel: FTP_receiver
    - MP: entering
    - MP: processing local module localejbs/CallSapAdapter
    - File adapter receiver: processing started; QoS required: ExactlyOnce
    - File adapter receiver channel FTP_receiver: start processing: party " ", service "xyz"
    Any idea?

  • Wrong port in FTP receiver adapter - no errors in message monitoring?

    Hello all
    We're on XI 3.0 SP16 and have created / configured a HTTP XML -> XI -> FTP Server scenario. In the receiver comm. channel (ftp) we had specified a wrong port number and always wondered, why we never got errors in message monitoring. Everything seemed to be processed correctly... but no file arrived on the FTP server (receiver) side!
    After correcting the wrong FTP port number in the receiver FTP comm. channel everything went fine.
    We now encountered a similar problem with a RFC receiver adapter. We're using it in another scenario HTTP XML -> XI -> RFC to SAP R/3 (4.7).
    For some reason it died (red status in adapter monitor) and it was no more possible to do RFC calls from XI to SAP R/3 (normal RFC adapter, NO proxies).
    In XI message monitor everything seemed to be ok but no message arrived till SAP R/3. Nothing in any queue...
    After deactivating and reactivation the RFC receiver comm. channel it worked again BUT ALL PREVIOUSLY SENT messages seem to be lost.
    Is it really the way it works? Does XI integration engine at runtime NOT catch whether or not a RFC or FTP receiver adapter died, thus is not able to tell somewhere in message monitor that a message could not be delivered at all?
    I'm really confused here but hopefully I simply don't understand some easy principles to take into account...
    Our SAP R/3 is on rel. 4.70 with Web AS 6.20. The XI 3.0 plugin is not installed. Do we need to go with server proxies there and use QOS = best effort?!?
    Thanks for some suggestions.
    Best regards,
    Renaud

    Hi Michal
    Thanks... works great for normal XML based messages!
    Now, what if I wanted to pass binary files from one ftp server via BPM to another ftp server in order to enable the transport acknowledgment?
    The files polled from ftp server using the ftp sender adapter are all in binary format (ARJ). No xml data in there. How should the message format look like in BPM for the receiving step? Or: how to make sure not to loose the binary content when passing through BPMs?
    I need this sort of scenario because of the tansport acknowledgment and because I need to have some sort of message splitting (send the binary file over to a second ftp server and additionally send some kind of info message to SAP R/3 regarding thin binary file).
    BTW: in the MessagingSystem/monitor/monitor.jsp I do not see sender / receiver information. Is this normal? It's quite of a bad thing to look inside each message in order to find out what message I'm having in front of me...
    Thanks a lot for your support and patience!
    Kind regards,
    Renaud

  • FTP Receiver Adapter.

    Hi All,
    From XI I need to FTP file to outer system using
    FTP Receiver Adapter
    Now due to security reason my client wants to use FTPS
    I checked in FTP Receiver Adapter -- there is an option
    Connection Security -- FTPS (FTP Using SSL/TLS) for Control Connection.
    Can I select this option and use like simple FTP Receiver Adapter?
    Please tell the process/docs for it.
    Regards
    <Moderator note: Subject edited. Please do not use 'Urgent'. See the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further info.>
    Edited by: Mike Pokraka on Jul 25, 2008 8:47 AM

    Hi,
    check some links on FTPS.
    FTPS Sender and FTPS Receiver adapter. Pls help
    SFTP vs. FTPS in SAP PI
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/964f67ec-0701-0010-bd88-f995abf4e1fc
    Regards,
    Phani

  • Use temporary file in FTP receiver adapter

    Hi guys,
    I'm not getting the purpose of "use temporary file" in FTP receiver adapter. Can you describe any situation, where this should be used?
    What is the location of this temporary file?
    Is it deleted after "normal" file is created?
    Thanks a lot,
    Olian

    > I'm not getting the purpose of "use temporary file" in FTP receiver adapter. Can you describe any situation, where this should be used?
    Some times when you create the file on your target dir then if there is another application looking for same file is quite faster to pick the file before it is complety written on target dir then in this situation using temporary file option is very helpful. What it does, it simply creates the file first by using temporary name once all bytes or bits has been transfered then it creates the original name and the temp file get deleted.
    > What is the location of this temporary file?
    Same location, where your original file is suppose to be written.
    > Is it deleted after "normal" file is created?
    Yes.
    Regards,
    Sarvesh

  • Filename for flat file using J2EE FILE FTP Receiver adapter

    Hi there,
    I am struggling to do the following:
    I have a J2EE File receiver that sends a file with a specific name to a FTP destination. I define the target filename in my graphical mapping using certain criteria and a incremental number. In my adapter I use variable substitution to select that value in the payload as the filename. Up to this point everything works fine.
    The problem is that I convert the payload to a flat structure using xslt before writing it out and because of that the adapter cannot find my value as defined in the variable I use for the name.
    Now, obviously if I move the xslt module after the CallAdapter module, the file won't be converted to a flat structure.
    Can anyone give me advice on how I can do the flat conversion <u>and</u> the specific filename from the payload?
    Thanks in advance,
    Johan

    Hi,
    Instead of using variable substitution, use adapter specific identifiers to set the file name in mapping.
    Ref:/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards,
    Jai Shankar

  • Configuring a Seeburger FTP Receiver Adapter

    Hello,
    I am trying to build a scenario where SAP ECC 6 sends an invoice to a customer via EDI.
    We are using ECC 6.0 and PI 7.0 and the Generic Seeburger EDI Adapters. The VAN is a GEIS EDISWITCH VAN (Eircom in Ireland).
    I am able to successfully send an IDoc from ECC 6 and into PI where a Seeburger map converts the message to EDI-XML format. I can use a file adapter to create a file in normal EDI format. But I can't get the Seeburger FTP adapter to work with the VAN.
    I have configured the correct IP, port, username and password but I keep getting the following message when the communication channel tries to send the message:
    <h6>Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.sap.aii.af.ra.cci.XIRecoverableException: >> Description: com.seeburger.jftp.app.exception.FtpExceptionSoftProcessingError: Unexpected reply: 501-Syntax errors in parameter.    usage: %[recipient id]%[APRF]       where either [recipient] or [APRF] can be omitted.           (to change your current default SEND relationship).           %% (places you in your 'HOME' TR).   &['s'|'single'] ('get' command gets single file).   &['m'|'multiple'] ('get' command gets multiple files). >> </h6>
    The FTP session is expecting a PUT command with the recipient id and APRF as parameters but these are not getting passed. I suspect this is because I am not passing the correct variables to the receiver adapter but I don't know what variables it expects and where they should be specified. And I can't find the answers in the documentation.
    Can anyone shed some light on what I need to do?
    Thanks,
    Ben

    Hi Prateek,
    Thanks for your comments. The channel is set to GEIS(GeMarkIII). There is nowhere to specify a directory or filename. The settings I have used are as follows:
    Adapter Type: FTP (http://seeburger.com/xi)
    Receiver
    Transport Protocol: FTP
    Message Protocol: GEIS/GeMarkIII
    Adapter Engine: Integration Server
    Host name: <IP address of VAN server>
    port: 21
    User Id: <Our mailbox number>
    Password: <Correct password>
    Host path/VAN Partner ID: <blank>
    Script file: <blank>
    Transfer type: ASCII
    Connection mode: Passive
    Use keep alive: <Not checked>
    Security Mode: None
    Proxy Mode: none
    Resource ID: <blank>
    Deliver transmission report: <not checked>
    Payload mode: Attachment
    Attachment ID: SeeburgerMain
    Channel status: Active
    Use dynamic attributes: <Checked>
    Use non-empty attributes: <Checked>
    Request displayed report: <Not checked>
    Request dispatched report: <Not checked>
    Report timeout (minutes): 720
    Handle received reports: Refer reports to XI system
    There is nowhere in the communication channel configuration that allows me to specify the receiver ID or the APRF. The documentation say this is read from the EDI data and the relevant fields are populated.
    Any ideas?
    Thanks,
    Ben

  • Unzip file using operating system command in file/ftp receiver adapter

    Hi,
    I'm wonderdering how to unzip a zip-file in the receiver file/ftp adapter. I know it is possible to do it using the 'Operating system command' feature, but somehow the command I use seems to be ignored! (I'm using SP14, unix).
    The command I entered is quite simple: unzip %F (also tried the %f, but i guess it doesn't really matter wich on I use).
    Is it possible that I'm unzipping to another directory than the one i expect? the unzip should be performed to/in the current directory, and assumingly current directory is the one stated in the 'Target Directory', right?
    Hope someone can clearify this issue for me.
    Best regards,
    Daniel

    Hi Daniel,
    It seems to me also, that the files are being unzipped to a different location than what you are expecting. The OS command might getting executed in some default location(i am trying to fnd that out)on the server and not in the target directory of the channel(It seems logical to me)....
    If you have time...pls try this out & see whether this would help...
    Have a shell script written with the following commands in them
    cd <path to target directory>
    unzip $1(filename from the channel)
    and in the OS command in the Channel give....
    <absolute path to the .sh file> %F
    Thanks,
    Renjith.

  • Problems with Seeburger FTP Receiver adapter

    Hello,
    I am working on a scenario sending ORDERS05 Idocs to EDI vendors.
    For this i have configured Seeburger Receiver FTP adapter with 2 modules to convert XML-EDI format. Since this is the test, I have pointed Seeburger to local FTP server with following settings
    Hostname <Hostname of our FTP server>
    Port <Port # of our FTP server>
    Host Path/VAN partner id <some local directory of FTP server>
    Payload mode: Maindocument.
    At runtime i received following exception
    Message could not be forwarded to the JCA adapter. Reason: Fatal exception: javax.resource.ResourceException: >> Description: com.seeburger.jftp.app.exception.FtpExceptionSoftProcessingError: Unexpected reply: 500 'SITE system 1': command not understood>> Details: com.seeburger.jftp.app.exception.FtpExceptionRethrowError: Error in session: {type:FTPConnectionId}{binding:82ea8d3089dc3e898ae2e608d9d8487d}{channel:a52d1aaa8dd63ff59c2f590e78586a77}{toparty:TestEDIParty} CAUSED BY: com.seeburger.jftp.app.exception.FtpExceptionOpenConnectionError: Error while connection to remote host CAUSED BY: com.seeburger.jftp.app.exception.FtpExceptionRethrowError: Error while executing command QUOTE site system 1 CAUSED BY: com.seeburger.jftp.app.exception.FtpExceptionSoftProcessingError: Unexpected reply: 500 'SITE system 1': command not understood>>SendingStatus: NOT_TRANSMITTED>>FaultCategory: COMMUNICATION_ERROR>>Retryable: true>>Fatal: true
    Few questions related to this
    1] can we use Seeburger adapter to generate EDI files on local FTP server
    2] If not Seeburger can we use normal File adapter to do the same. I tried the same by configuring BIC module in File adapter so that it would convert XML to EDI format and was hoping file to be generated on FTP server. It generated one line XML file with following text "<info>Converted message locates in a attachment</info>". Any idea how to retreive attachments in File receiver adapter (as far as i know no attachments are supported in File receiver adapter).
    Any idea how to generate EDI files with Seeburger FTP on test server?
    Thanks in advance.
    Regards
    Rajeev

    Hi Rajeev,
    > 1] can we use Seeburger adapter to generate EDI files on local FTP server
    Yes we can use.
    > Any idea how to generate EDI files with Seeburger FTP on test server?
    It is like a normal process, how to generate the EDI files in normal means without FTP. Check this link
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b17369-9522-2c10-84a6-d75d8a8ace22
    BIC
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00b66651-eeea-2b10-e5a6-8459ec30d948
    Regards
    Ramesh

  • File import with OS command on FTP receiver adapter

    Hi gurus,
    I would like to write a script ("Run OS command before Message Processing")for importing a file from a FTP based on a condition, like if file_a.txt does not exist on folder RECEIVE/TXT than import file_a.txt from location IMPORT/TXT to RECEIVE/TXT.
    please provide me with some information regarding this issue.
    My OS is windows NT.
    Thanks

    If I don't understood wrong, the script can be something like follow:
    set filename=text.txt
    cd /directory1/
       IF EXIST %filename% (
            # FTP 2
            ftp <serverdest_1>
            mput %filename%
        ) ELSE (
            cd /directory2/
            # FTP 2
            FTP <serverdest_2>
            MPUT %filename%

  • FTP Receiver Adapter parameters

    Hello everyone!
    I have configured a scenario wherein XI sends a <b>PO.xml</b> file to a folder in an FTP server through the File Adapter (Receiver).
    Right now, I'm getting an error:
    <i><b>Error Category: XI_J2EE_ADAPTER_FILE
    Error Code: PROCESSING_ERROR</b></i>
    in the adapter engine.
    Would anyone know what might be causing this?
    Could you guys also confirm parameters in the receiver adapter configuration for me?
    Here they are:
    1. <i>Target Directory:</i>
    Would this be an example of a correct entry: "<b>c:\POxmls</b>" ? Should the slashes be "\" or "/"
    2. <i>Filename scheme:</i>
    "<b>POXML.xml</b>"
    3. <i>Server:</i>
    <b>203.121.78.163</b>
    4. <i>Data Connection:</i>
    <b>Passive</b>
    5. <i>Connect Mode:</i>
    <b>Permanently</b>
    6. <i>Transfer Mode:</i>
    <b>Binary</b>
    7. <i>Empty-Message Handling:</i>
    <b>Write Empty File</b> should this be "Ignore" instead?
    8. <i>File Type</i>
    <b>Text</b> should this be "Binary" instead?
    Anything else I missed out?
    Hope you guys can help me on this!
    Regards,
    Glenn

    HI,
    1)<i>Would this be an example of a correct entry: "c:\POxmls" ? Should the slashes be "\" or "/"</i>
    It should be '<b>//</b> xxxxx<b>/</b>xxxxx'
    7)Ignore
    8)Text or Binary
    Rest all Ok.
    Regards,
    Srinivas

  • Problem on FTP receiver adapter

    Hi, All,
    I have two scenarios, both from XI SAP proxy to FTP receiver. And two scenarios are running almost at the same time. I need to send thousands of messages through these scenarios. Now I got problems when I sent out around 300 messages.  The messages just stuck there and don't get through to FTP receiver communication channels. I configured these two FTP receiver communication channels in one Business System. I don't if that causes the problem. Please advise. Thanks a lot.
    Jack

    Hi! Jack,
    According to my Understanding Check once again the below steps..
    1. Check both Queues regarding SMQ1 and SMQ2.
    2. Another thing is got to Communication Channel monitoring and select your Channel and check AUDIT
       LOG and ADD TIME STAMP such that u can get 2 things.
             a) first of all one information that up to at what time XI got picekd the file and
             b) Also u can observe another point that whether the File got picked from Source and holding in XI or else stil the XI doesn't got picked.
    3.  The most important thing is  You asked how to clear all the queues  right ? U can delete queues in two ways.
           a)  U can go to SMQ1 and SMQ2 and delete the queues there it self
           b)  THere is another way to monitor the XI MESSAGES in detail view by search category in
                ASYNCH and SYNCH mode and also based on ERRORS..
    Note:: In order to monitor you need to check the monitoring on SYSTEM.JSP level. Go through the below linik.
    http://HOSTNAME:PORT/MessagingSystem/monitor/systemStatus.jsp
    THere u can get each and every messages and u can clear the BULK of messages in queue.
    Regards:
    Amar Srinivas Eli

  • Problem whit FTP receiver adapter

    Hello..
    i have a very strange problem.
    I created 2 similar interface Idoc-XI-File (via FTP) whit file content conversion.
    I configured in both cases the comunication channel but only in one case work correctly.
    The second channel create the file but just whit the first field.
    I check all monitor. the configuration is correct (field name and lenght). the messages in adapter monitor is:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_SPEDI_DESADVUT xmlns:ns0="http://sabaf.it/edi">
    - <ROW>
    - <POSITION>
      <TIPO_RECORD>CA</TIPO_RECORD>
      <NUMERO_BOLLA>1111111111</NUMERO_BOLLA>
      <DATA_BOLLA>20080611</DATA_BOLLA>
      <CODICE_AA>M0</CODICE_AA>
      <CODICE_AB>MA</CODICE_AB>
      <CODICE_AC>DT</CODICE_AC>
      <CODICE_AD>SA</CODICE_AD> .....
    but the result file is:
    CACA
    Configuration of content conversion in adapter is:
    POSITION.fieldNames   TIPO_RECORD,NUMERO_BOLLA,DATA_BOLLA,CODICE_AA,CODICE_AB,CODICE_AC,CODICE_AD
    POSITION.fieldFixedLengths      2,10,8,2,2,2,2
    any suggestion?

    Hi.
    If you disable content conversion in ftp receiver...the output is ok? does it contains all required/expected fields? try to disable the file content conversion using the same example data that does not work when FCC is enabled.
    Regards,
    Matias.

  • FTPS Sender and FTPS Receiver adapter. Pls help

    Hi All,
    I need to make file to file scenario with secure connection
    I am using FTP Sender and Receiver Adapter with Connectivity
    as FTPS.
    Please let me know the steps I need to do for this
    1. Integration Directory
    2. If I need to generate certificates what steps I need to do:
        a. How to generate certificates
        b. Where to install these certificates like File Servers, XI
            Server etc.
    3. How to use these certificates in File Server, Integration
       Directory etc.
    Please send me a document to do all steps.
    In advance thanks and Full Points will be awarded.
    Regards

    Hi,
    Deploy SAP Java Cryptographic Toolkit.&
    Add the CA certificate to the key storage as below.
    Keystore: service_ssl
    X.509 Certificate & Private Key: ssl-credentials
    This means that you need to import the CA hierarchy of your FTPs server certificate into the list of trusted CA's in XI ( either on J2EE side in the keystore service or in ABAP side via transaction STRUST , depending on where your client is ).
    If connection security parameter in communication channel for Sender FTP Adapter is set to "FTPs( FTP Using SSL/TLS) with Control Connection" only, file gets successfully created with data at the FTP server but as soon as we switch the connection security parameter to "FTPs( FTP Using SSL/TLS) with Control and Data Connection".The initial handshaking happens successfully and file gets created at the FTP Server but its empty, connection fails when attempt is made to write data into file and we end up with said error thereby closing the connection.
    SAP Note 821267
    Refer below link
    SAP Network Blog: SFTP vs. FTPS in SAP PI
    /people/krishna.moorthyp/blog/2007/07/31/sftp-vs-ftps-in-sap-pi
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/400580c1-8d16-2a10-3eb3-ec1026dae0d5

  • FTP receiver adapter - end of line ,marker

    Hi,
    i'm facing a really strange problem. I'm putting a file on  a FTP server from one of our customers. i'm using text conversion with CR* LF** as end of line marker.
    In D and Q where i'm putting the file on our own FTP server everything is ok.
    But in P where i'm putting the file on the customers FTP server they are complaining that their application can not read the file. They sent me a file back (zipped to avoid any translation) and i recognized that this file has CR CR LF as line separator.
    The setup in D,Q and P is exatly the same apart from the ftp server address, userid and passwort.
    How can it come that i'm getting an additional CR and is there any workaround for that?
    CR = carriage return = '0x0d'
    LF = linefeed = '0x0a'

    Hi,
    thx for the answer. I've tested that but i cant see the a difference if i use '0x0d' versus '0x0D'. Both are working on our own FTP server (linux) the same.
    As the productional FTP server is one of out customres and i dont have control over it i guess its a (weired) setup on their configuration.
    I swithched the transfer mode from text to binary to avoid the additional CR (still i dont understand how the ftp server is configured if he is doing that),
    Nevertheless, i'm no havong a file terminated with CR LF.

Maybe you are looking for