Writing to 2 different directory using file receiver channel

I have a scenario where i am picking multiple files from one server and writing it on another. While writing the files, i want to write them to different folders using one communication channels based on the filename. is it possible? if yes how?

You have to go for dynamic configuration UDF in the mapping.
Refer to the below document
http://wiki.scn.sap.com/wiki/display/XI/Dynamic+file+name+and+directory+in+Receiver+File+Adapter+-+summary+of+possibilities
Also http://****************/Tips/XI/ASMA/Index.htm
You just need to add filters/fix value lookup and pass it to UDF to determine the target directory
Message was edited by: Hareesh Gampa

Similar Messages

  • Encrypt Data using File Receiver Adapter

    Dear All,
    How to encrypt file content using file receiver adapter?
    Any suggestions would be of great help.
    Thanks and Regards
    Bhasker

    Hi,
    U can also develop custom adapter module code. For more reference plz have a look:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ac06cf-6ee2-2c10-df98-e17430ca5949?quicklink=index&overridelayout=true
    Re: Encyprtion in XI.
    Thanks
    Amit

  • Error in file receiver channel "Unknown payload format 0 in the message"

    hello
    there is an errror in my receiver file channel with the status "Unknown payload format "
    my channel is file receiver channel.
    we implemented one sap note 1295430 and after that channnel is giving the error.
    Please forward your views.
    thanks.

    Hi there,
    First of all, what TBDL means - It means that the message was successfully delivered from Integration Server and that the messages are handed over to the Messaging System.
    TBDL occurs when the message is put into the receiving queue of the Messaging System.
    What can be done?
    Go to Messaging System receive servlet:
    http://<Host>:<PORT>/MessagingSystem/receive/<CONNECTION>/<PROTOCOL>
    If this was executed successfully, then the MS returns HTTP 200 to the Integration Server and the status TBDL moves to DELIVERING (check whether you have authorization to go to the above link).
    --> Log-in to SAP using - XIAPPLUSER & XIAFUSER, and check if they are blocked
    --> Check the messages:
    AF
    com.sap.aii.adapterframework.serviceuser.language
    com.sap.aii.adapterframework.serviceuser.name = XIAFUSER
    com.sap.aii.adapterframework.serviceuser.pwd
    AS
    com.sap.aii.applicationsystem.serviceuser.language
    com.sap.aii.applicationsystem.serviceuser.name = XIAPPLUSER
    com.sap.aii.applicationsystem.serviceuser.pwd
    Also, worth reading - /people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically
    Let us know if you have more questions.
    regards,
    Neetesh

  • Error in File Receiver Channel

    Dear All,
    I am Getting below error in File Receiver Channel.
    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: FTPEx: User ABC cannot log in.
    Regards,
    Manikandan

    Hi Manikandan,
    Check the username and the password for the FTP server. If the username or the password is wrong then you would be able to post the message.
    Also, there might be a timout issue, In the timeout parameter enter some value.
    Ref: FTP Server connection Problem
    Check and update us.
    Thanks,

  • Using file receiver adapter with a different user

    Hello.
    I have a simple question (at least I think it is)
    Can I use a file receiver adapter (where the transport protocol is NFS - not FTP)
    so that a different user will access the directory (not the usual SAPServiceSID)?
    I don't see any place for using username and password, and using the FTP protocol is not possible
    because of security reasons.
    Any help Appreciated.

    Hello.
    Thanks for the quick answers.
    I'm sorry for not being clear enough before.
    I have a microsoft network share on a different server then the PI.
    When I use the path:
    server\share
    I manage to successfully put a file via the file receiver adapter, with NFS as the transport protocol.
    However in order to do this, the owner of the share had to give credentials to the user: SAPServiceSID of my PI system
    which is an active directory user.
    The owner wants me to use a local user instead.
    Can this be done with a local user?

  • Multiple files in different directory using single FILE adaptor

    Hi Guys,
    How can we handle multiple files having different format(PDF,TXT,EXCEL) and in different directory with the single FILE adaptor.
    I know by using "." we ca get mutilple files, but here tthe files are of different format and in different directory.
    Could you please explain as to how we can handle this scenarios?
    Thanks
    Sahil

    Hi,
    The short answer is - "No".
    The Long Question - "Why do you want to use a SINGLE channel".
    If your idea is to reuse the interface then dont worry... Except for the Senderchannel and Sender agreement all your other objects can be reused ...provided your sender apter converts the different files into the same XML format..
    For TXT you can use the simple file adpater..
    For excel see if you can use save the file as .CSV format...then you can use it directlky by the simple FIle adapter..
    For PDF use conversion agent... Here a blog to get u started on that ->
    /people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
    regards
    Arvind R

  • How to handle Directory in File receiver adapter

    Hi
    I have a Mail (attachment) to File scenario in PI 7.11, where I need to send the message to one directory, if a certain condition is meet and an other direktory if that condition i not meet.
    More specifically, then my initial java mapping picks up 2 files and if the files cover the same period, then they should be merged and then sent to the following message mapping in the Operation mapping and after that sent to "Folder1". I have specified this Folder one in the receiver file communication channel.
    If the two files are not covering the same period, then the message should be sent to "Folder2" (which works as a trash folder). This Folder2 is specified in the javamapping by using dynamic configuration.
    In the receiver file communication channel I have ticked the "Directory" under Adapter-Specific Message Attributes.
    However, it all works fine, when the two files are NOT covering the same period, cause then the "Directory" variable is set under dynamic configuration by the java mapping, but when the two files DO cover the same period, then the file adapter errors cause I have ticked the "Directory" under ASMA but not assigned the variable under dynamic configuration.
    Of cause, one solution would be to assign the value for Folder1" in the java mapping, e.g. via a value mapping lookup, but I would like to avoid this.
    Is there a smart way to solve this challenge?
    Some code extracts:
    if (samePeriod(sb6157,sb6158))
                        StringBuffer sboutput = mergeFiles(sb6157, sb6158);
                        os.write(sboutput.toString().getBytes());
                   else
                        updateDynamicConfiguration("http://sap.com/xi/XI/System/File","Directory","
    test$
    MILUN
    trash");
                        copyStream(is,os);
    private boolean samePeriod(StringBuffer sb6157, StringBuffer sb6158)
              int startText6157 = sb6157.indexOf("<PROCESSING_PERIOD_START>");
              int endText6157 = sb6157.indexOf("</PROCESSING_PERIOD_START>");
              String date6157 = (sb6157.substring(startText6157 +25, endText6157));
              int startText6158 = sb6158.indexOf("<PROCESSING_PERIOD_START>");
              int endText6158 = sb6158.indexOf("</PROCESSING_PERIOD_START>");
              String date6158 = (sb6158.substring(startText6158 +25, endText6158));
              return (date6157.equalsIgnoreCase(date6158));
    Mikael

    Hi,
    Why dont you use dynamic configuration for both Directory 1 & Directory 2???
    I had  a similar scenario where we have to define a directory name based on source file names. The sample code is as follows. You can modify this as per your requirement. Let me know if you have any issues.
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    and
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    conf.put(key, arg)
    String fileName = conf.get(key);
    if(filename.equals("file1.txt")){
         conf.put(key1, Directory1)
    else
         conf.put(key1, Directory2)
    return "";
    Warm Regards,
    Gouri

  • List contents of Directory using File Object.

    Hi. I am new to Java.
    Right now I want to list the contents of a specific directory. One approach is to use FILE array. But I just cannot get it right. Am i missing out something?

    Thanks.
    My idea was to retrieve the contents of directory and then when the form loads; the contents of directory (only directorys, not files; hence i think i can use isDirectory to check) will be loaded into a listbox (DefaultListModal i supposed)
    I ran it without any errors. The Listbox is loaded; but then the listbox reads
    Java.lang.String;@1a7508a
    What went wrong?

  • Com.sap.sql.DuplicateKeyException in file receiver channel

    Hi experts,
    I am currently testing the following scenario:
    xml file -> file sender ->file receiver -> csv file
    No mapping is used. Both channels are on the same PI 7.1 system.
    The transformation seems to work so far. The only problem I have is that my receiver channel does not post the message to the directory because of this error:
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id f167e134-145e-4b2c-2d47-e431b8b34fd8(INBOUND) already exists in duplicate check table: com.sap.sql.DuplicateKeyException: [200]: Duplicate key.
    Is it not possible to use file sender and file receiver in the same scenario? Thanks for any help.
    Best regards.
    Oliver.

    Hi André,
    I am using the test option so the message can be processed multiple times. Anyway, I also tried using deletion but I still get the same error. I also tried a completely new file but still no change. When I check the comm channel I see that there is always created a new message id and when I search the rwb it posts two entries. One from the sender step and one from the receiver step. Seems to be alright to me.
    Regards.
    Oliver.

  • Adapter Module Filename in File Receiver Channel

    Hi All,
    is it possible to set the Filename in File Receiver Adapter from Adapter Module?
    I know that it is possible to read the data      
    Channel ch = new Channel(moduleContext.getChannelID());
    path = ch.getValueAsString("file.targetDir");
    I Need to set the filename in Adapter Module, using of Payload is not possible because Payload is not xml.
    Dynamic Parameters in Message Header is not possible because it is an multi mapping process an i need dynamic Filename for each Part
    payload after mapping is like
    MainDocument
    SubMainDocument
    MainDocument
    SubMainDocument
    i need special Name for each SubMainDocument in FileReceiverAdapter
    regards
    ralf

    Hello Stefan,
    interface mapping is an mapping  like this:
    outbound_interface => Inbound_Interface1
                                 => Inbound_Interface2
                                => Inbound_Interface3
    in sxmb_moni this looks like this
    Soap_Header
    Soap_Body
    Payloads
         =>MainDocument ( application/xml )
        => SubMainDocument ( text/xml )
         =>MainDocument ( application/xml )
        => SubMainDocument ( text/xml )
    First SubMainElement is routing to FileReceiverAdapeter A   where Filename has to be like "NameA%nr%"
    second SubMainElement is routing to FileReceiverAdapeter B   where Filename has to be like "NameB%nr%" 
    %nr% is som value from the Payload.
    Payload is not xml  because using of Conversion Argent!!
    I Think there is only one Dynamic in Header for all subelements, i have test it!
    ralf

  • BCM/SWIFT payment,  parameter file Receiver channel

    Iu2019m using the  u201CSWIFT_payload_parFile_Splitu201D Operation Mapping for the FILEACT payment transaction.
    The result should be
    1) payload file
    2) parameter file (*.par)
    This seems to work just fine. My problems starts with  the receiver channel for the *.par file.
    I need to know more about how to setup the modules and parameters in the "*.par" receiver channel.
    Is there a configuration guide for this?
    Thanks.
    Frank

    Hi Frank,
    I am facing similar issue. I am able to generate the parameter file but the overrides section contains only one parameter "Request Type" whereas there are other parameters that are mandatory. How do I get these filled?
    Regards,
    Deepthi

  • Re-using JMS Receiver Channel

    Hi,
    I have scenarios with SAP -> PI -> 2 Different External Parties.
    External Parties use JMS.
    There are some flows which are common for both the parties, like sending Acknowledgement from SAP to JMS.
    Now can I just configure one common Receiver Communication Channel and Send message (Acknowledgement) to any of the two Parties? So I will have two Receiver Agreements using the same Receiver JMS channel.
    Like by using some concept can I populate JMS channel parameters like IP Address or Server Name , JMS Queue
    Thank you,
    Pankaj.

    Hi,
    You need as many receiver channels as you have JMS queues. When you have 60 JMS queues, then you need 60
    channels.
    I have only 6 queues; one each for one Party.
    When you send all messages to same JMS queues and receiver can identify the message type anyhow, then you need
    only one channel for this queue.
    Ok.
    But even when you have only one JMS queue, you might need seperate channels anyway, for example when you use
    FCC for each interface individually.
    So basically if the setting is different then I need to have that number of channels. the way messages are sent is the same in all the cases. Even when we are using Dynamic Configuration it is the same for all the messages to be send to the External Party.
    Thank you,
    Pankaj.

  • File Receiver channel, Append issue on Linux FTP server

    Hi,
    I have a File_ReceiverChannel_FTP_Order that is using the “File Content Conversion” message protocol.
    I have setup the adapter to use File Construction Mode “Append”
    When I run this on a windows FTP server, it is working as designed.
    But when I’m trying to use our Linux FTP server the append function does not work.
    My adapter does not append but it is overwriting the content of the file!
    Does any one know what to do about this?

    Hi
    i think you need to change the  protocol as the linux system  understand the NFS .
    Thanks
    sudhir sharma

  • Target Directory in File Receiver Adapter

    Experts,
    I am trying for a scenario (File to File) and I am not sure if the target directory is a directory in XI server or my local machine. I used HTML client to send the message to the adapter. Also if any of you could give clear idea about source and target direcory without pointing to any weblog, I would greatly appreciate it. As I have tried every weblog available with a word File in it.
    Thanks
    Thilothama

    Thilothama,
    I've seen your previous posts and you never assigned any points. People in the forum spend their valuable time answering questions.
    I request u to reward the people who have replied to your posts. IF u consider that the replies have helped u , u can assign,
    2 points -- helpful
    6 points -- very helpful
    10 points -- problem solved..
    If u are not able to see the assign point s button refer to this thread...
    Unable to award points
    regards
    Shravan

  • Creating pdg using File Receiver

    Hi,
    I have to create a pdf as output using the File adapter.
    Please help.
    Regards,
    Vignesh

    hi,
    there is also a nice way to create it using an adapter module (with free apache libraries)
    XI: Generate PDF file out of file adapter
    very simple, FREE and works
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • ALV Grid Control -  Modifiy data in total and subtotal lines

    Hello all, I´am creating a report using ALV Grid Control. This report calculates (using delivered and returned materials) for each vendor/material-combination the return quote. Using the totals and subtotals function for different characteristics I w

  • Applet works in Netscape but not IE

    Very basic Hello World applet. IT doesn't work in IE 6. Not sure why. html source: <html> <body> <applet code="test.class" Width=640 Height=480></applet> </body> </html> Anyone know why?

  • Why are the Mac Pro's dropping their server connection over a PC network.

    This seems to be a common thread on the discussion, but I can't find a resolution. I have a mix of G5s and Mac Pro's all running 10.4.10. All the machines are set to manual 100BaseT Duplex. The Mac Pro's constantly drop their network connections or s

  • Workflow for SRM (contracts and purchase)

    Hi Gurus..could you send me this documentation of Workflow (configuration guide). I have to activate the N-Steps approval fo contracts and purchase order for SRM 5.0. thanks, Gustavo Nogueira

  • Component Version "SAP ERP 6.0" instead of "EHP 4 for SAP ERP 6.0 /7.0"

    Hi All, We went to ERP Enhancement Package 4 in ours SAP Systems. We performed the upgrade (with the SAPehpi tool) in DEV and TEST, the weird part is that in DEV the System Data - Component Version shows "SAP ECC 6.0" and in TEST shows "EHP 4 for SAP