Save file in multiple directories using receiver file adapter?

Hi,
Is it posible to save file in multiple directories using receiver file adapter?
Regards,
Ashish

Well, there is a round about way to do that -
The idea is to use multi mapping. 1:n mapping
1) Map ur message to 2 different record set nodes. Since you want to use the same file both the mapping will look exactly the same. make sure that the filepath and filename are a part of the output payload message
2) In the file adapter config. make sure the the file name and file path are from these payload fields. You can use a context object to refer these fields. Voila...the files are created in the 2 direcoties you mentioned.
of course the simplest way is to route the same message to 2 business systems/services and write them out using 2 ccs.,
Arvind R

Similar Messages

  • Send multiple files in different directories using Receiver File Adapter

    Hi Experts,
    I have one File to File without ESR scenario where I have to pick multiple files from different directories and to save them in different directories on receiver side.
    Can anyne help me to send multiple files in different directories using receiver file adapter.
    Is it possible??
    Any help will be appreciated.
    Regards,
    Danish

    hi ,
    that is possiable without esr,
    we need to create one sender communication channel , in that  we nend to use "adavnced selection for source file " for sending multiple files from multiple directories.
    we need to create 'n' receiver communication channels and 'n' receiver agreements based on communication channels .
    in receiver determination, provide multiple receivers
    In interface determination , provide * symbol for receiver communication components
    thanks,

  • Accessing multiple directories using single file adapter

    Hi All,
              I have data coming from two banks. I need to put them in SAP file server. Now i have two sender adapters for each bank, now is there a way i can use same receiver adapter but create diff directories to store them.
    XIer

    Hi,
    In file sender communication channel there is a check box for Advanced Selection for Source file. Check that and you dont put anything in exclusion which means it takes all the files from multiple direcotires. Please check this weblog where he has excluded some files in the directory. But you dont need to exclude anything.
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    Regards,
    ---Satish

  • How to pick files from multiple directories via Sender File Adapter?

    Hi guys,
    I have a scenario File to IDOC. The Sender File Adapter has to take all files: .xml from Source directory E://Current/.
    Actually directories are like
    E:/Plant1/Current/
    E:/Plant1/History/
    E:/Plant2/Current/
    E:/Plant2/History/.
    Can I have one Sender File Adapter to pick all *.xml files
    from
    E:/Plant1/Current/ and
    E:/Plant2/Current/  and how can I write it in Source Directory of Communication Channel?
    Or do I have to have a Sender File Adapter for each Plant?
    Any suggestion please?
    Kind regards,
    Danijela Zivanovic

    Hey
    You might wanna have a look at "Additional selection for source file" parameter in sender file adapter.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/singleSenderFileCC4MultipleDirectories
    XI/PI: how to exclude files in a sender File adapter?
    Even though this method works but there are some constraints,please check help.sap.com for constraints.
    Thanx
    Aamir

  • Delete multiple files from multiple locations using config file

    Hello All,
    I am fairly new to .net and I have to make a windows application to delete files older than 90 days from multi ple locations. these multiple locations cant be hard coded and have to be configurable, also the number of days to delete the files have to be
    configurable.
    I think the answer to this would be an app.config file. but dont know how to use the same.
    can anyone tell me about this and if possible help me out with a code snippet.?

    Add settings like picture below.  Add the string by press the double dot icon.
    The use the code below
    static void Main(string[] args)
    int deleteDays = Properties.Settings.Default.DeleteDays;
    StringCollection folders = Properties.Settings.Default.Folders;
    foreach (string folder in folders)
    DirectoryInfo info = new DirectoryInfo(folder);
    FileSystemInfo[] deleleteFiles = info.EnumerateFiles()
    .Where(x => x.LastWriteTime < DateTime.Today.AddDays(deleteDays))
    .ToArray() ;
    foreach(FileSystemInfo file in deleleteFiles)
    File.Delete(file.FullName);
    jdweng

  • How to read multiple files at multiple locations using properties file

    hi all ,
    in my code i take configuration input from a properties file ,it was really easy but what if there are multiple files ? how can i take configuration input (file path etc) from properties file in that case ? any suggestion ?

    thanks :) ..i am doing like this :
    String fName[]=new String[10];
              String choice[]=new String[10];
              String Delim[]=new String[10];
              ResourceBundle a = ResourceBundle.getBundle("input");
              String n=a.getString("NOF");
              try
                   for(int i=0;i<Integer.parseInt(n);i++)
                        fName=a.getString("PATH"+(i+1));
                        choice[i]=a.getString("HEADER"+(i+1));
                        Delim[i]=a.getString("DELIMITER"+(i+1));
                        putData(fName[i],choice[i],Delim[i]);//to put data in database
              catch (NumberFormatException e)
                   System.out.println("Number of files are invalid");
    hope this method would be fine ....again thanks for the advice :) :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • File Adapter: picking files from multiple directories

    Hi all,
    In a sender file communication channel with Transport
    Protocol FTP, There are 2 parameters for Picking up the file
    called Source Directory and Filename. If I want to pick the
    files from 2 or more directories, What needs to be done.
    Or is it possible to do so ?
    Without making duplicate interfaces what else can be done ?
    Regards,
    Vijay

    Actually it is possible to select files from different folders for sender channel. It is available with SP14.
    I just copy following description from help.sap.com
    Advanced Selection for Source File
    If you want to set an exclusion mask for the File Name specified above, or if you want to specify multiple directories using a file name mask and exclusion mask, set the Advanced Selection for Source File indicator.
    ¡        Specify an Exclusion Mask for the file name specified above.
    Example
    You want to process all files that have the extension '.txt', but want to exclude all files that begin with the letter 'a'. To do this, enter .txt for File Name, and a for Exclusion Mask.
    ¡        You can enter additional specifications for source directories, file names, and exclusion masks in the table. This data is processed in addition to the details specified above.

  • Create multiple files in different directories for receiver system

    Hi,
    My scenario is File-XI-File. Based on a value of a field(1...Unbounded) & its occurance in source file XI needs to create same file number of times(based on occurance of field in source file) in different directories on receiver system(Single Business System).
    What different ways/solutions are available to achieve this?
    Regards,
    Bharat
    Edited by: Bharat Rathod on Nov 21, 2009 5:24 PM

    Hi Bharath,
    >>Based on a value of a field(1...Unbounded) & its occurance in source file XI needs to create same file number of times(based on occurance of field in source file) in different directories on receiver system(Single Business System).
    This logic needs to be handled in message mapping ... and you need to use multimapping..check the link here
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f3b31d48fb1bc8e10000000a11466f/content.htm
    Regards
    Suraj

  • How to write file into multiple directories by using file adapter?

    i need to write my file into multiple directories,i able to do in single directory.But i need to write to muliple directories.Please help me out.Thanks in advance.

    If you are passing the values at runtime then you can loop it and and invoke the file adapter in loop by dynamically passing the value in invoke properties for "File Directory and File name" etc.

  • How to read multiple files of different name using single file adapter

    There are two inbound locations inbound1 and inbound2 , and the files structure present in these two inbound locations are same but the files start with different names example
    (1)files in inbound1 starts with file1,file2...
    (2)files in inbound2 starts with abc1,abc2...
    by using same file adapter with read option how can i read both files....

    Hi K.A.N.N.,
    You can define multiple directories using the above link in 11g and poll for the file as \*.*.
    Alternatively you can use the Synchronous Read and specify the file name at runtime.
    You can also use Pick activity to define multiple branches each with a File Adapter to read from a specified location with specified file name. Although it would contain multiple Adapter Definitions at Development-time, only one of the Adapters will execute at Run-Time.
    Regards,
    Neeraj Sehgal

  • FILES FROM MULTIPLE DIRECTORIES

    Hi Experts,
                    I got a doubt here plz clarify it
        1.How can we pick files from multiple directories ? and all the files will have different  names?
                    Plz clarify this, good explanations willbe rewarded .
                                                                                    Regards,
                                                                                    Vinod.

    Hi Vinod Reddy,
    One way that i know to solve this prob is by using the 'File Name Masking'.
    This can be done with the sender channel, where you have to specify the
    source directory as <NOTHING>
    source file as <NOTHING>
    This gives you an advanced selection option, where you need to give the Source Directories along with the File name masks (the source files).
    Hope this may solve your problem.
    regards
    vinod v
    reward me if its helpful.

  • How can i create  excel sheet with multiple tabs using utl file?

    how can i create excel sheet with multiple tabs using utl file?
    any one help me?

    Jaggy,
    I gave you the most suitable answer on your own thread yesterday
    Re: How to Generating Excel workbook with multiple worksheets

  • Same file name from sender to receiver file adapter with out using UDF

    Hi All,
    I am working on FILE TO FILE. My requirement is same file name from sender to receiver file adapter. Is it possible to do using only Adapter Specific message properties?  i mean with out using UDF.
    Thanks
    Karthik

    Hi,
    >>>Is it possible to do using only Adapter Specific message properties?
    yes
    just enable Adapter Specific message properties in sender and receiver channel for file name
    and you're done
    Regards,
    Michal Krawczyk

  • How to pickup files from multiple directories

    Hi all,
    How to pickup files from multiple directories and send it to two different folders at target
    Ex:
    files\xi\us\US.txt
    files\xi\uk\UK.txt
    i need to pick up the above mentioned two files and send it to the following paths
    app1\files\us\download\US.txt
    app1\files\uk\download\UK.txt
    US.txt has to goto US folder and UK.txt has to goto UK folder only
    Regards

    Hi,
    To pick form multiple folders, select Advanced Mode for file selection in file adapter..
    there u can specify directory name/file names
    Refer
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    To put those files at multiple folders write a command line arguments for this.. go through this weblog...
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    XI/PI: Command line sample functions
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    Hope this will help you....
    Regds,
    Pinangshuk.

  • How to create an Excel file from XML in the Receiver File Adapter Comm Ch

    How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
    I saw this blog, but I don't know how to create a XSLT transformation.
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    Any help would be appreciated. Thanks.

    Here are the steps I took to create an XSLT transformation in XI 3.0:
    1. I created my source and target XSDs using XMLSpy.
    2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
    3. I created another XSLT mapping to format the target into Excel XML.
    4. Import the source and target XSDs in the IR's External Definitions
    5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
    6. Reference the XSL mappings in the Interface Mapping

Maybe you are looking for