Add counter in FTP receiver file adapter

Hello,
I have sen that in a File System (NFS) you can add a counter to the filename, but I don't found this possibility when I put File Transfer Protocol (FTP), I only see to add timestamp or message id.
There is some possibility to add the counter in the FTP like in NFS?
Regards,
Xavier.

Hi,
Unfortunately, the functionality to add a counter is available only with NFS and not with FTP. If you want to achieve this, you will probably have to use variable substitution to dynamically get the counter from a field in the payload. The counter can be incremented in the mappings.
For info on variable substitution: <a href="http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm">Configuring the Receiver File/FTP Adapter</a>
Regards
MAnish

Similar Messages

  • FTP Receiver File adapter  -- CRLF In output File in Windows environment.

    Hi All,
    Idoc to File : Receiver File adapter.
    I use the endseparator 'nl' and the output file is coming correctly with NFS and It is not working when we are doing with with FTP.
    Tested with NFS (Unix environment)
    I used the endseparator 'nl' and the output file is coming with CRLF.
    Tested with FTP (Windows environment)
    When I tested the same the output file is coming with LF.
    I tried by using the module "SAP XI Sample/ConvertCRLFfromToLF" which will convert from LFToCRLF.But it is serving my purpose.
    Can anyone please suggest how I can get the CRLF in the file while putting in the output directory which is in windows environment.
    Thanks
    Seema

    Do not mention endSeparator in content conversion parameters...by default XI puts newline as endSeparator
    It should work for NFS and FTP on Windows

  • 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

  • The same filename from a sender to a receiver file adapter

    Michal has provided us with a brilliant <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14.  I guess a lot of people have been waiting to do this. However, I have a slightly different scenario. In this case, XI is used as a medium to transfer a PDF file from one directory to another directory. There is not transformation or mapping involved.
    The message is send by File Sender Adapter and received by File Receiver Adapter. Message type is created as a simply type hexBinary. The file is supposed to be picked up as a PDF and received as a PDF, retaining the same file name. As such, the file name is neither stored in the source structure nor the target structure.
    Once the PDF file is transfered into target directory, it should be able to be open by using Acrobat directly without further conversion.
    We might add a file name file into the target structure but would that rendered the PDF non-readable upon being received by the File Receiver Adapter?
    Any feedback is highly appreciated.

    Hi
    >>We might add a file name file into the target structure but would that rendered the PDF non-readable upon being received by the File Receiver Adapter?
    No, adding file name would not hamper the properties. You can name *.pdf or something else.
    For that matter any file pdf, word, .msg format etc can be transferred by this approach. We have tried it.
    Earlier to SP14 you cannot give the same name to outgoing file without writing a Adapter module. But things are easy with SP14.
    Cheers,
    satish

  • Sender_interface_name in Variable Substitution in Receiver File Adapter CC

    Hi,
    as per this page : http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
    it says:
    Variable Substitution (Target Directory/File Name Scheme)
    If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
    ●      Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
    The variables can refer to attributes of the message header or elements of the message payload.
    ○       If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace, message_id, message_id_hex
    Can we not access sender_interface_name and sender_interface_namespace are not mentioned in above list of variables.
    Is it not possible to access sender_interface_name or sender_interface_namespace as variable substitute parameters from within Receiver File Adapter Communication channel.
    thanks.

    >Shabarish Vijayakumar wrote:
    >>the sender interface details will always remain a constant
    >>so you can hard code the value, isnt it?
    Yes, i can hardcode, thats not a bad idea, i need to create then 3 different Reciever File Communication Channel objects, as I am dealing with 3 scenarios for which sender system and sender interface is different.
    >Shabarish Vijayakumar wrote:
    >>if you look at the mapping runtime constants, those are also for the receiver since the sender interface will always remain constant for any particular CC.
    >>http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
    yes in this link you provided i can see..
    INTERFACE     Interface
    INTERFACE_NAMESPACE     InterfaceNamespace
    SENDER_SERVICE     SenderService
    RECEIVER_SERVICE ReceiverService
    RECEIVER_NAME     ReceiverName
    RECEIVER_NAMESPACE     ReceiverNamespace
    it seems both INTERFACE (,INTERFACE_NAMESPACE) and RECEIVER_NAME(,RECEIVER_NAMESPACE) are present, may be one is for sender, and another is for receiver.. may be if i use dynamic configuration, possibly my issue would be addressed.. correct me if i am wrong.
    thanks.

  • Receiver File Adapter Not Executing OS Command

    Hello All!
    We are currently running PI 7.1 and wish to use a Receiver File Adapter to FTP a file to a mainframe and override the FTP system defaults.
    Tried using the 'quote site recfm=fb lrecl=80' OS command but discovered that this would not work as the Adapter Engine is NOT on the mainframe.
    Regrouped a bit and made a second attempt which involved writing a Unix script to ftp a file and override rthe system defaults.   The idea was to use the File Adapter to FTP the data to the server, invoke the script and get the file to the mainframe with the proper attributes.    The script when executed on the server works perfectly.   
    However, when the IDoc comes thru PI, the File Adapter ftp's the file ok but the script is never executed.
    Any ideas why this is so or any suggestions?    
    Thank you.

    Hi Ken,
    Script only executes at Network File sharing (NFS) only. It dont work at FTP level.
    So you can better write the file on NFS and then within the script to connect to ftp and do your processing.
    Regards,
    ---Satish

  • Receiver file adapter posts multiples for singel source files

    Hi,
    I am using wild character in my input source ftp adapter but my receiver file adapter is creating multiple duplicate files. I am not sure why this happens as QOS is set to "Exactly Once" with archive processing mode. I tried with delete mode and the same error occurs. We had no problems testing it in our Dev environment but in QA its acting so strangely...Any advise is appreciated..
    -Teresa

    Hi,
    2. Homany files you posted at oubound directory?
    1.             You said duplicate files at receiver side, is the files having time stamp? if so those are not duplicate files.
    Thanks,
    Satish.

  • Receiver File Adapter - FTPEx: 550 Access denied

    Hi Experts,
    In my receiver file adapter scenario I'm getting 550 Access denied in RWB.
    I am a little confused here because I could access the FTP client from my desktop using the same User and Password informed in the Receiver CC. I also could drag and drop a file there.
    Here you have Detail Display in RWB, it seems that at least the user is working fine for PI also:
    Success: Connecting to FTP server "<FTP IP>"
    Success: Write to FTP server "192.168.10.85", directory "\Transportadoras\10326750000101\",   file "Nfe_teste.xml"
    Success: Transfer: "TXT" mode, size 8881 bytes, character encoding UTF-8
    Error: Attempt to process file failed with An error occurred while connecting to the FTP server '192.168.10.85:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor.
    Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: An error occurred while connecting to the FTP server '192.168.10.85:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor.
    Regards,
    Daniela
    Edited by: Daniela Machado on Aug 11, 2010 10:18 PM

    Hi Daneial,
    This is an issue due to any firewall or proxy between your Xi system and the FTP.In this case the direct logon
    works with same user but when XI tries to create file at runtime you get this error due to network issues.
    To resolve this contact your Basis/Network guys  and
    1. Set the permissions to FTP User you are using as 777 rights(full access to read , write and delete)
    2.If you have access to PI server, try to telnet /connect to ftp using command prompt (open ftp .....) the FTP server form there, you should see the same error there , inform this to your network guys.
    3.Clear all the files places already in the ftp (take backup) and test afresh after permissions are set by basis team.
    Regards,
    $rinivas

  • RECEIVER FILE ADAPTER FCC ERROR

    Hi team
    My scenario is a text file has to be picked up by PI, has to processe it and the receiver is Proxy and it has to get updated and sent back to FTP location.
    i am using Sender File Adapter with FCC and Also receiver File Adapter with FCC.
    Both the sender and receiver structures are same; i am using the same FCC parameters for both the sides.
    in Receiver File Adapter i am getting the following errors
    1) Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
    2)Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    please help me out
    thank you
    Edited by: vemugantivn on Aug 16, 2010 12:19 PM

    Hi,
    > 1) Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    >  Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
    > 2)Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    > Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
    It is saying that you are not using the fieldSeparator parqameter.
    have you provided the field separator parameter? if not then give like below
    order_row.fieldSeparator : ,  (give what ever the separater you are using)
    or 
    order_row.fieldSeparator : 10,5,...  (if you are using fixed length)
    Regards
    Ramesh

  • Receiver File Adapter error

    Hi all,
    I am trying to convert the XML to Plain file in receiver file adapter. I am using module - StrictXml2PlainBean
    My target structure is -
    <MT_Name>
        <records>
            <Header>
            </Header>
            <Item>
            </Item>
        </records>
    </MT_Name>
    <Header> and <Item> are at same level.
    When I use --
    1. Header.fieldSeparator = ,
    2. Item.fieldSeparator = ,
    3. recordTypes = Header,Item
    Then I get this error -
    Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: records at XML element MT_Name,records
    When I use --
    1. records.fieldSeparator = ,
    2. singleRecordType = records
    Then I get this error -
    Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: The element nesting level for the structure MT_Name is too deep (reference: 3 levels, found: 4 levels) at XML element MT_Name,records,Header,Item
    To add more details to the scenario, multiple records can be generated but one record will have only one Header, with multiple Items.
    Any help in this regard will be highly appreciated.
    Thanks,
    Abhi

    Hi Abhi,
    Here you go....
    For your target structure as:
    <MT_Name>
    <records>
    <Header>
    </Header>
    <Item>
    </Item>
    </records>
    </MT_Name>
    Where I have assumed that <Header> and <Item> are at same level.
    DO NOT use any Module just simply configure the receiver channel as below:
    In the file Receiver Channel
    Recordset Structure = Header,Item
    Name                                                                    Value
    Header.fieldSeparator                                             ,
    Item.fieldSeparator                                                  ,
    I have tried this and it works.
    Let me know if you are facing any issues.
    Cheers
    Dhwani

  • Dynamic Filename on Receiver File Adapter

    Hi,
    I am running XI 3.0 SP 14.
    The scenario is
    SAP R/3 (IDOC) > XI (Receiver File Adapter)> FTP Server
    There is no mapping on the XI side, we just drop the IDOC XML on to the ftp server.
    I would like to configure a dynamic file name on the Receiver File Adapter where if the 'MSATZ' Field
    within the E1EPD04 segment of the IDOC is populated then I would like to send a separate
    Filename than the one specified on the 'File Name Scheme'.
    Has anybody done this or any suggestion how I should go about this please.
    Thank you.
    Warm  Regards,
    Ranjan

    Hi Guys,
    When I tried to create the User defined function as below, I got the Null value for the "StreamTransformationConstants.DYNAMIC_CONFIGURATION" object.
    My code looks like this,(this is part of the debuging code)
    Start
    public String Create(String a,String b,Container container){
    if (container.getTransformationParameters() == null)
    return "conf.null";
    if (container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION) == null)
    return "Dynamic.null";
    return b;
    --End
    On the output I get the value "Dynamic.null". I do not know why the object value is Null.
    Any suggestion pls.
    Thank you.
    Warm Regards,
    Ranjan

  • Receiver file adapter not functioning

    Hi guys,
    We have developed some interfaces that are exporting some .txt files in ftp locations and therefore they make use of receiver file adapter. Although the receiver file adapter used to function properly some days ago, for some strange reason, it stopped receiving any files. This happens only in XI development system but not in XI production system. In XI development, in Runtime Workbench --> Communication Channel monitoring, I can see this communication channel's status as correctly configured and started, with a green sign on the right, but it is not responding when some files are sent to it, and therefore there are no output files in target directory.
    Any ideas?? It is urgent.
    Best Regards
    Evaggelos

    Udo,
    Hi Amit,
    I went into Message Monitoring for this interface and I can see all the messages for the last 24 hours that should be written into a file that have status "to be delivered".
    When I go into Details -->Audit Log  for a single message:
    2007-06-13 11:49:33 Success Processing child message of multi-message with message ID ff896d50-198a-11dc-cdfa-00145e694b16
    2007-06-13 11:49:33 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    2007-06-13 11:49:33 Success Message successfully put into the queue.
    And in Message Data there is the following information:
    Status To Be Delivered
    Repeatable Yes
    Cancelable Yes
    Error Category  
    Error Code  
    Start 13.06.2007 11:49:33
    End  
    Sender Party  
    Sender Service TPBS_GR
    Receiver Party  
    Receiver Service TPBS_GR
    Interface http://famar.gr:LoyaltyDataMNSToSRS
    MI_LoyaltyDataMNSToGR_IB
    Quality of Service Exactly Once
    Message b2685674-7626-5141-bfa1-13155ad0d25a
    Reference  
    Conversation ID  
    Serialization Context  
    Direction INBOUND
    Message Type Recv
    Profile XI
    Connection File_http://sap.com/xi/XI/System
    Transport HTTP
    End Point http://fmgralxi01:50000/MessagingSystem/receive/AFW/XI
    Authorization  
    Sequential Number 0
    Number of Retries 3
    Failed 0
    Retries 300000
    Valid to  
    Persist Until 13.07.2007 11:49:33
    Schedule Time 13.06.2007 11:49:33

  • Receiver file  adapter creates an innecesarry extra line

    Hi,
    I have an issue with an extra line that add the receiver file adapter with the content conversion.
    The file XML that the file adapter has to convert, is the next;
    <root>
    <cofig>
      <FileName>NameOfTheFile.txt</FileName>
      </cofig>
    <lines>
    <line>
      <data>BBBBBBBBBBBBBBBBBBBBBB</data>
      <data>Aaaaaaaaaaaaaaaaaaaaaa</data>
    </lines>
    </root>
    Because FileName is not necessary, I remove it with:
    cofig.fieldFixedLengths 0
    cofig.fixedLengthTooShortHandling CUT
    but it leaves an empty line that i don't want. that is, the text in the file start in the second line.
    Any help?
    Thank you in advance.

    Can you do a small change in your mesg. structure ?
    change it to....
    <root>
    <lines>
    <line>
    <data>BBBBBBBBBBBBBBBBBBBBBB</data>
    <data>Aaaaaaaaaaaaaaaaaaaaaa</data>
    </lines>
    <i><b><cofig>
    <FileName>NameOfTheFile.txt</FileName>
    </cofig></b></i>
    </root>
    and then use
    cofig.fieldFixedLengths 0
    cofig.fixedLengthTooShortHandling CUT
    followed by
    endSeparator 0
    Ref: Suppressing Field In Receiver File Adapter for more details.

  • How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack

    Dear Friends,
    I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
    So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
    DynamicConfiguration conf = arg0.getDynamicConfiguration();
    StringBuffer sbFileData = new StringBuffer();
    for (int i =0; i < record.size(); i++ {
         . // Create XML for each row and Marshal the object into to the String Buffer
         String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
         conf.put(KEY_FILENAME, strFileName);
         arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
         arg1.getOutputPayload().getOutputStream().flush();
    So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
    Please let me know if I missing something or need to do some thing else.
    Regards,
    Shreyansh Shah

    Hi
    You can easily achieve this using graphical mapping.  Create your target message type like below
    MT_Target
      Details  0 to 1
          Data  0 to 1
    Source sample structure
    <resultset>
    <row>
    <column-name>column-value</ column-name>
    </row>
    Then do the message mapping like below
    map <row> with  MT_Target
    contant ----> Deatils
    column-name ------>Data
    In the signature tab of message mapping, choose the occurrence of your target message type as
    0 to unbounded.
    This will generate multiple files from multiple rows.
    Let me know if you have any doubt.

  • OS Command for receiver file adapter

    Hi Guys,
    I have a requirement that in the target folder before putting the file, I have to rename the exisitng file then put the file. The target folder is in another machine and I have to use FTP option to send file.
    is it possible to use OS command after processing option in the receiver file adapter to do this? please let me know how to handle this.
    Thanks
    Mukesh

    Mukesh,
    You cannot rename the file in the FTP folder. What you can do is write a OS script where it logs in into the FTP site and renames the file. Then use this OS script before message processing so that it renames the file before you write the actual file.
    If you want to rename a file which is on the applicaiton server using NFS then you can directly rename it from the command prompt.
    Regards,
    ---Satish

Maybe you are looking for

  • Option Adapter Engine of SOAP Adapter Sender

    Hi, I have a question, I am creating a Communication Channel Type Sender Adapter Soap and note that the combo box  Adapter Engine only appears Adapter Engine Central option and watch some examples of internet show Integration Server option and the se

  • WebLogic Server 10.3.4 external config files

    Hey, i have a question. I have external configuration files, and i dont know where to place, or better how to add the path where the configurations files located to WebLogic Servers classpath ? I worked with JBOSS and there i added some lines in the

  • Setting up the months based on prompts.

    Hi All, My requirement is that I am selecting the calender year(2009) and calender month(8) in the prompts I should be able to retrieve the previous month and previous to previous month in the per_name_month fashion that is (2009 /07) which I have to

  • Select schema via cursor

    I am working with a database in which all schemas have the same tables. I am trying to write a PL/SQL routine that will loop through each schema, query a table in that schema, and insert that data into a master table (simplified explanation). I can g

  • How can I change the country on my account when I still have 11cents on it?

    How can I change the country on my account when I still have 11cents on my account? I lived in the US for 2 years, now that I'm back in France I wanna change it. Please help me.