Mergeing files of same structure to one file without BPM

Hi XI Gurus,
                I want to merge various xml files having same structures(coming as separate files in source directory) to a one file. I want to do it without using BPM.I need this Final structure as an  input to another scenario to post an idoc.
e.g -->
<i>File1</i>:
<AR_Posting>
     <currency_line_item>1<currency_line_item>
     <tax_line_item>2<tax_line_item>
      <customer_line_item>3<customer_line_item>
<AR_Posting>
<i>File 2</i>:
<AR_Posting>
     <currency_line_item>11<currency_line_item>
     <tax_line_item>22<tax_line_item>
      <customer_line_item>33<customer_line_item>
<AR_Posting>
<i>File 3</i> :
<AR_Posting>
     <currency_line_item>111<currency_line_item>
     <tax_line_item>222<tax_line_item>
      <customer_line_item>333<customer_line_item>
<AR_Posting>
Target:
<Recordset>
      <AR_Posting>
         <currency_line_item>1<currency_line_item>
         <tax_line_item>2<tax_line_item>
         <customer_line_item>3<customer_line_item>
     <AR_Posting>
       <AR_Posting>
           <currency_line_item>11<currency_line_item>
           <tax_line_item>22<tax_line_item>
           <customer_line_item>33<customer_line_item>
      <AR_Posting>
      <AR_Posting>
          <currency_line_item>111<currency_line_item>
          <tax_line_item>222<tax_line_item>
          <customer_line_item>333<customer_line_item>
     <AR_Posting>
<Recordset>
Please suggest any solution to achieve this.

Hi Anurag,,
I guess what Sumit is aiming for, is that if you don't want to use a BPM you will need a two step solution.
Step one:
If the different files have the same structure, read them with a sending file adapter and route the to an receiving file adapter which appends all messages to a new combined file.
Step two:
Read the new combined file with a sending file adapter and route the messages to your target interface.
This approach of-course means that you can not do any correlations as you can in BPM. I.e. you will not "know" when all three files have arrived but just simply read the combined files at certain times and pick-up whatever content it holds.
rgds Johan

Similar Messages

  • Multiple files, same structure into one message without BPM

    Hi,
    Is it possible to read multiple files (each with single row) as one message without BPM by some configuration in channel?
    For example:
    input files placed simultaneously in input folder:
    file1: a,b,c
    file2: f,g,h
    file3: k,l,m
    after adapter picks files, xml message:
    <Message_type>
        <RecordSet>
            <file>
                 <A>a</A>
                 <B>b</B>
                 <C>c</C>
            </file>
            <file>
                 <A>f</A>
                 <B>g</B>
                 <C>h</C>
            </file>
            <file>
                 <A>k</A>
                 <B>l</B>
                 <C>m</C>
            </file>
         </RecordSet>
    </Message_type>

    Bond,
    Yes Bond. You can read the pattern what you have given.
    First Read the whole line in the file as one record. Now take the substring or write udf in mapping. This entirely depends upon your requirement.
    Regards,
    ---Satish

  • Can anyone help me write a code about coping data from many files and paste them to one file !?

    Hello ! 
    As I said in title , I have alot files (e.g. 60 files) and I want to write a code to copy 5 columns (for examples) of special sheet of files and paste them in one file respectively. For perceive it I explained it more below .
    Suppose one of my files is simplified as this : http://s000.tinyupload.com/?file_id=00699705919876414523
    The name of  this file is 2006Oct and assume my excel files are like "2006Oct, 2006Nov,2006Dec,2007Jan ... 2010Dec". At first I should go to "my files" sheet of 2006Oct file and copy columns " A,B,C,D,E,F " that has "PerturbationNumber=1"
    respectively and then paste these to a file that is output file and repeat this process for the other files ( 2006Nov and etc ) and paste data in output file sequentially. 
    I appreciate and look foreward for any help in this issue.
    Majid

    Try code below
    Sub CombineBooks()
    Dim wb As Workbook
    Dim sourceSht As Worksheet
    Dim destSht As Worksheet
    Set destSht = ThisWorkbook.Sheets(1)
    destSht.Cells.Clear
    FolderName = "C:\temp\test\"
    file = Dir(FolderName & "*.xlsx")
    firstSht = True
    Do While file <> ""
    Set wb = Workbooks.Open(Filename:=FolderName & file, ReadOnly:=True)
    Set sourceSht = wb.Sheets(1)
    With sourceSht
    sourceLastRow = .Range("A" & Rows.Count).End(xlUp).Row
    If .Cells.AutoFilter Then
    .Cells.AutoFilter 'turn off autofilter
    End If
    .Cells.AutoFilter Field:=6, Criteria1:="1"
    If firstSht = True Then
    Set copyRange = .Range("A1", .Range("E" & sourceLastRow)).SpecialCells(xlCellTypeVisible)
    destSht.Range("F1") = "FileName"
    firstSht = False
    destNewRow = 1
    Else
    Set copyRange = .Range("A2", .Range("E" & sourceLastRow)).SpecialCells(xlCellTypeVisible)
    destNewRow = destSht.Range("A" & Rows.Count).End(xlUp).Row + 1
    End If
    copyRange.Copy Destination:=destSht.Range("A" & destNewRow)
    LastRow = destSht.Range("A" & Rows.Count).End(xlUp).Row
    If destNewRow = 1 Then
    destSht.Range("F2:F" & LastRow) = file
    Else
    destSht.Range("F" & destNewRow & ":F" & LastRow) = file
    End If
    End With
    wb.Close savechanges:=False
    file = Dir()
    Loop
    End Sub
    jdweng

  • Combine several XML files with same structure

    Hello,
    I have several XML files with the same structure and I want to combine them and create a new XML file to be bale to compare that information easily. It does not look very difficult but as I am very new in this I am not bale to get it
    The structure of my actual files would be something simlar to:
    Root->...-> Name->Address, Telephone
    And what I would like to have si something like
    Root->.... ->Address-> Name 1,Name 2....
    Root -> ...->Telephone-> Name 1, Name 2....
    Does anyone know how to do this.
    Thanks

    You could write a XSL transformation file that does this and transform your input file via
         * Transform XML file with a style sheet.
         * <p><b>Example:</b><p>
    <table align="center" bgcolor="#E0E0E0" border=1 cellpadding="10" cellspacing="0"><tr><td><pre style="margin-top:0; margin-bottom:0">
    XMLTransformer t = new XMLTransformer();
    FileOutputStream fos = new FileOutputStream("C:/Project/result.html");
    String xmlFile = "C:/Project/source.xml";
    String styleSheet = "C:/Project/stylesheet.xsl";
    t.transform(xmlFile, styleSheet, fos);
    </pre></td></tr></table>
         * @param xmlfile The XML file to transform.
         * @param style Stylesheet to use for transformation.
         * @param outputStream OutputStream to write the transformed result to.
        public void transform(String xmlfile, String style, OutputStream outputStream) {
            DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
            //factory.setNamespaceAware(true);
            //factory.setValidating(true);
                //todo: use inputstreams instead of file names
                try {
                    File stylesheet = new File(style);
                    File datafile   = new File(xmlfile);
                    DocumentBuilder builder = factory.newDocumentBuilder();
                    document = builder.parse(datafile);
                    // Use a Transformer for output
                TransformerFactory tFactory = TransformerFactory.newInstance();
                StreamSource stylesource = new StreamSource(stylesheet);
                Transformer transformer = tFactory.newTransformer(stylesource);
                DOMSource source = new DOMSource(document);
                StreamResult sr = new StreamResult(outputStream);
                transformer.transform(source, sr);
            } catch (TransformerConfigurationException tce) {
               // Error generated by the parser
               System.out.println ("\n**XMLTransformerr Factory error");
               System.out.println("   " + tce.getMessage() );
               // Use the contained exception, if any
               Throwable x = tce;
               if (tce.getException() != null) {
                   x = tce.getException();
               x.printStackTrace();
            } catch (TransformerException te) {
               // Error generated by the parser
               System.out.println ("\n** Transformation error");
               System.out.println("   " + te.getMessage() );
               // Use the contained exception, if any
               Throwable x = te;
               if (te.getException() != null) {
                   x = te.getException();
               x.printStackTrace();
             } catch (SAXException sxe) {
               // Error generated by this application
               // (or a parser-initialization error)
               Exception  x = sxe;
               if (sxe.getException() != null) {
                   x = sxe.getException();
               x.printStackTrace();
            } catch (ParserConfigurationException pce) {
                // Parser with specified options can't be built
                pce.printStackTrace();
            } catch (IOException ioe) {
               // I/O error
               ioe.printStackTrace();
        }//transform()

  • Each line of a file to a single Idoc (one file to multiple IDoc)?

    Hi Community,
    I have a flat file with many lines. Each of these lines has the same structure and has to fill a separate IDoc. How can I configure XI that it creates for each line a separate IDoc?
    I already found a blog to such a topic: File to Multiple IDocs (XSLT Mapping)
    But thatu2019s not what I am looking for (or I do not get the Point).
    I also tried to set u201CRecords per Messageu201D to 1. But that is not working to. :/
    Maybe one of you guys has an idea?
    Thanks in advance,
    Udo

    Hi Udo,
    For instance if  file structure is as follows:
    <File>
    <Header>
    </Header>
    <Item>
    </Item>
    <Item>
    </Item>
    </File>
    Now if u want to genarate a new Idoc for each n every <Item> in the file. The Header Information is to be repeated for each IDOC as well.
    Then allu need to do is  import the idoc in XI, then take the idoc xsd and change the occurrence o..unbound and then create the external definition.
    Look into this blog.
    The specified item was not found.
    Now use the external definition in your mapping instead of using the original IDOC. In your mapping map the item to IDOC, and for header data you have to use the useOneAsMany function.
    Reward if found useful
    Regards,
    Vinod.

  • How to mass-reindex files with same name but different file extensions

    (reposting cos I'm confused about if I posted in the proper place before. Please delete if it is a repost.)
    So I'm on a remote workflow. I pick all the raw data and convert it in two quality standards, one on 'high' with full specifications and one on 'low' so I can send 2gb instead of 80gb of files through the internet for me to work remotely on, and to speed up the overall work rhythm because files are lighter. All I need to do is to work at my home with the low quality files, send it back to the client's computer after finished, re-index all files in their high resolution twins and we are good to go to finish the product with highest quality possible. But both high and low quality files need to be the same extension, that I picked .mp4 for it is the standard for pretty much anything.
    The point is, if I want to go full mobile, I only have an old HP Pavillion notebook and I really need to work with a video codec that goes very easy on it. I can only think about some 16:9 DV format. But the point is, this format generates a different file extension than my .mp4 standard, and Premiere, to my knowledge, really can't reindex files using only the file name while ignoring the file extension. It really should. And I really need to know how.
    We also need to consider Premiere versions that allow themselves to be installed at x32 processors. My desktop is x64 and I really have no problem to work on these standards, the problem is, in my notebook I really can't.
    So, halp?

    i want to say it was added in cs7, which requires subscription, so in that case might as well be using latest version 8.  if you had to use an older version like cs5, you could still use h264 or low bitrate dnxhd/prores codecs inside a quicktime .mov file. that would allow you to have same file ext on both versions of files.

  • IO - Read two image files and put them into one file

    Hi,
    i have 3 files in all. The two image files and one text file. I need to place the image in the first image file, followed by text in the text file and then the image in the second image file, into one file.
    Can anyone tell me how do i go about doing this ?
    i tried using fileinputstream and fileoutputstream, which works fine if all the 3 files have text but when the first and the third file have image, the code doesn't give any error but the result file displays only the image from the first file and nothing else.
    i am running short of time and need to do this really soon.
    if anyone has done anything like this. please let me know,
    thanx,
    poonam

    One approach would be to programmatcally create a single zip/jar file from the three input files. You can use the java.util.zip and java.util.jar packages for this purpose.
    The other apprach would be to create a single image by drawing images and text strings on a BufferedImage object.
    I think the first approach is preferable because you can easily extract the individual files from the zip/jar file

  • File adapter every 15 minutes  one file !!!

    Hello every one
    If I need to pick a file every 15 minutes using scenario file adapter to mail ..
    How can I make this works ???
    Thanks

    hey
    <b>The following are valid examples for filename:
    myFile.txt
    my*.txt
    *.txt
    File.
    File.*
    myle.</b>
    source: http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm
    As you can see above there is no specific format for the sender file.if you are using wildcard you have lots of ways to make selection for the file
    Thanx
    Ahmad

  • Multiple Flows of Same Name in One File

    (FM11 on Win7)
    The Compare Documents utility reports that the same file has multiple flows of the same name, and so does not compare the files. Doh!
    The report from the utility seems accurate.
    I see two end-of-flow markers in the file, one on the second page and another on the final page.
    The flow tag names of the text frames on the body pages are identical: BodyText.
    The AutoConnect box on each is selected.
    I still want to compare the files, so I try this:
    When I do View > Master Pages and then go back to View > Body Pages, FM says some body pages in the file override their master page layout.
    Do I want to override? I say yes.
    I go to the body pages. Everything looks the same.
    I try Compare Documents again. Same message.
    So how do I join those two flows, even though they apparently are already Autoconnected and have the same name?
    Or, as an alternative, how do gain the benefits of a Compare Documents operation in a file that contains two flows of the same name?
    Best regards,

    iPhone will duplicate if you import contacts from your SIM card or namually add new contacts and save in iPhone memory instead of save in iCloud. So you have contacts from iCloud and from iPhone memory too.
    Try to save your contacts just one place, like iCloud.
    Hope it will be helpful

  • ODI to connect with Multiple Foxpro DBF files having same structure.

    Hi Experts ,
    Need your help on the situation below on ODI 11g .
    I Identified my source system as Foxpro ,and there are 20000 users using this fox-pro application and each generates its own output file(zipped with dbf files ) .
    Example of DBF file -> User1 : daccount_18356.DBF , User2 :daccount_17536.DBF and goes on ....
    1. Please recommend how do i connect or automate this DBF files ?
    2. Also its having different file name per user but having same format . ?
    Please let me know if any details needed further .
    Thanks
    Kenny
    Edited by: 839100 on Jun 20, 2011 8:11 PM

    Ashish,
    I have similar issue. we are loading multiple files and getting "java.sql.SQLException: ORA-00942: table or view does not exist" error while inserting a record into staging table. Appreciate if you or any one suggest solution.
    we are using following KM-
    1) LKM File to SQL
    2) IKM SQL CONTROL APPEND.
    Thanks

  • Copying files from same directory as *.java files and moving to WEB-INF/classes/ package name

    In our current application we have the following source directory structure:
              src -
              - com
              - edeploy
              - subdirs ... (many directories here)
              - jsp
              -subdirs ... (many directories here)
              In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              files). I would like to modify my build.cmd script to copy the *.gxq files
              into the same directory as the class files.
              Here's my script so far:
              @REM Create list of files to compile
              DIR /S /B /A:-D src\com\*.java >class.list
              @REM Create list of query files
              DIR /S /B /A:-D src\com\*.gxq >query.list
              @REM Compile
              javac -d stage\WEB-INF\classes @class.list
              @REM Copy query files into class directory
              .......... code needed here ......
              Can anyone help me with this?
              Thanks,
              Matt
              

    You may want to check out:
              http://jakarta.apache.org/ant/index.html
              Gary
              "Matt Raible" <[email protected]> wrote in message
              news:[email protected]..
              > In our current application we have the following source directory
              structure:
              >
              > src -
              > - com
              > - edeploy
              > - subdirs ... (many directories here)
              > - jsp
              > -subdirs ... (many directories here)
              >
              >
              > In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              > files). I would like to modify my build.cmd script to copy the *.gxq
              files
              > into the same directory as the class files.
              >
              > Here's my script so far:
              >
              > @REM Create list of files to compile
              > DIR /S /B /A:-D src\com\*.java >class.list
              >
              > @REM Create list of query files
              > DIR /S /B /A:-D src\com\*.gxq >query.list
              >
              > @REM Compile
              > javac -d stage\WEB-INF\classes @class.list
              >
              > @REM Copy query files into class directory
              > .......... code needed here ......
              >
              > Can anyone help me with this?
              >
              > Thanks,
              >
              > Matt
              >
              >
              

  • Utility that makes jpg files with same name as avi file

    I would like to have my avi files catalogued in Photoshop elements 2.0 as I do with my photos - tagging etc.
    but I do not want to include the avi files in my photoshop catalogue since when backing all photos all clips would be included = to many GB ( I already back up the avis separately)
    So what I want is an easy way to automatically convert a frame from an avi file and save it with the same name as the avi.jpg - so I can import that to Phel and tag it.
    Any one who knows of such an utility?

    >So what I want is an easy way to automatically convert a frame from an avi file and save it with the same name as the avi.jpg - so I can import that to Phel and tag it.
    Jan,
    Are you aware that the Photoshop Elements Editor has a function that will create a still photo from a frame of a video? Look at File > Import > Frame from Video in the Editor workspace.
    And I think that Premiere Elements 2 may also have a function for capturing a single frame and saving as a photo file. (I don't have Prem Elem 2 available at the moment to verify that it is present in v2.) I believe that it was in Prem Elem 3 that I used this function.
    However, I don't think that either the Photoshop Elements or the Premiere Elements functions satisfy your request that it be automatic. I think that you would need to invoke that command for each video clip and then choose which frame of the video.

  • Receiver side file name same as Sender side file name

    Hi,
      We want to pick a file from one location and put into another location using XI <u><b>with the same name in which the file was lying there in the source directory/folder</b></u>. This we need to do it w/o opening the file and hence we cannot use the variable substitution also.
    Any clue????
    Thanks in advance
    Jayakrishnan

    Hi,
    There was a similar discussion which went on this topic.
    Retain file name
    In my opinion, we can easily achieve this using modules. The steps are very simple.
    (any file) ->[module #1]-> XML -> Sender CC
    The XML produced will have 2 tags say,
    <filename></filename><data_base64></data_base64>
    where fileame is the name of the file and data is the base64 converted data. Similarly
    Receiver CC -> XML -> [module #2] ->  (any file)
    During the second step there will be a default step module  called localejbs/CallSapAdapter. Just remove this entry and have only your module entry provided the module #2 must implement all FileOutputStream functions to write the file from the stream, extracting the filename from the xml node. Since you are removing the CallSapAdapter module, the default file which you give in the Receiver CC is not created, instead the filename which comes alone the tag is created. I hope this information helps you.
    I am planning to put a blog on this
    Best regards,
    Felix

  • Batch processing: save processed file with same name to different location without moving the original

    Hi, I would like to denoise Voice Over files with help of Auditions Batch Process. However, I have to save the files with the same name as the original, so that I can simply relink them in Premiere. Since I do want to keep the originals, I would like to save the processed files to a different location.
    Unfortunately, Batch Processor adds " Copy" to the processed files and moves the originals along with the processed files to the new folder (causing Premiere to loose the original files).
    Can I achieve my goal with Batch Processor, and how would I have to configure it?
    Kind regards,
    Andreas

    Which version of Audition are you using? The latest ones allow you to specify where the batched files are saved and also if any Prefix or Postfix are added to the file name. These are all under Export Settings in the Batch Process pane. However you must have the Export box ticked to give you access to the settings.

  • File Adapter: Different lines in one file

    Hi,
    I receive a flat file where I have to do content conversion.
    In this file, I have different structures which could appear unsteady.
    Means, every could structure appear in a non continuous way:
    File:
    struc1
    struc2
    struc3
    struc3
    struc3
    struc1
    struc1
    struc2
    struc3
    How to handle this in file adapter?
    Regards
    Chris

    Hi,
    do you mean like this:
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    How to identify the different structures? Every structure got different fields and different
    amount of fields.
    Every struc1 to struc3 should be a single message.
    And how to specifiy line break in file adapter?
    thanks
    chris

Maybe you are looking for

  • Unexpected severe error in Jdeveloper opening a toplink project

    Folks, I'm getting the following errors trying to open a Toplink project on Jdev 11.1.1.2 Could you please advice ? Thanks, Gustavo. oracle.javatools.db:Jun 25, 2010 11:44:38 AM oracle.javatools.db.marshal.DBObjectSAXHelper logConversionError WARNING

  • Apex_util.set_session_state + user id

    Hi, In my login process I have the following two calls, where user_group and user_id are application level items apex_util.set_session_state('USER_GROUP', apex_util.get_groups_user_belongs_to(:APP_USER)); apex_util.set_session_state('USER_ID', apex_u

  • Selecting text field from table ignoring capitalization

    Hi, i'm doing a read on a table using select.....where text in s_text . if i want to ignore the capitalization; how to perform the read. for eg : if the text is saved as 'Name' and in my select criteria if i specify the selection text as 'name' it sh

  • Workflow triggered twice. Triggered using Message Control/Output Types

    I created an output type for VA01. After creating (then saving) SO, workflow is immediately triggered which shouldn't be the case since I have to run program 'rsnast00' to trigger workflow. So workflow is triggered twice during the process. How do i

  • Activating new config in old sales documents

    Hi I have created a status profile assigned to some sales item categories. This will be used during a data migration & upgrade process. The users must now go into existing sales order items and assign a certain status. Problem: The status profile is