Combine Two Files and sent to webservice

Hi all,
I need to read two files and combine in XI and i need to send it to webservice.
can anyone please tell me which way is the better.
kind regards,
Praveen

hi
i am reading two different file structures and i need to map it to webservice structure.
i did all design and config steps including BPM also. i used fork step with two receivers and transformation step and send step.
but in the mapping iam getting only first file message only.
This is source message
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>
      <ns1:Test_result_MT xmlns:ns1="http://lonmin.co.za/GetServeyData">
         <Details>
            <x>10</x>
            <y>aaa</y>
         </Details>
         <Details>
            <x>20</x>
            <y>bbb</y>
         </Details>
      </ns1:Test_result_MT>
   </ns0:Message1>
   <ns0:Message2>
      <ns1:Test_result_MT xmlns:ns1="http://lonmin.co.za/GetServeyData">
         <Details>
            <x>30</x>
            <y>ccc</y>
         </Details>
         <Details>
            <x>40</x>
            <y>ddd</y>
         </Details>
      </ns1:Test_result_MT>
   </ns0:Message2>
</ns0:Messages>
Target Messgae must be like this
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:Test_final_MT xmlns:ns1="http://lonmin.co.za/GetServeyData">
     <Details>
     <x>10</x>
     <y>aaa</y>
     </Details>
     <Details>
     <x>20</x>
     <y>bbb</y>
     </Details>
     <Details>
     <x>30</x>
     <y>ccc</y>
     </Details>
     <Details>
     <x>40</x>
     <y>ddd</y>
     </Details>
</ns1:Test_final_MT></ns0:Message1></ns0:Messages>
i am giving source and target message can any one please tell me which elements i must map to get this target structure.
Edited by: Kiran Kumar on Dec 19, 2007 1:21 PM

Similar Messages

  • SAP XI - Combine Two files as one in File Adapter

    Experts,
    I want to combine two files as one in File adapter itself.  I am using a simple scenario of File-to-File where i am just sending the file from sender to receiver as it is , EXCEPT, i want to add one line at the end of the file .
    I was thinking of doing this in File adapter , avoiding any mapping program in Integration Repository ..
    ANY INDEA's ??
    Regards,
    Ashutosh

    Hey
    You have 3 options,first one can be to execute a OS command before message processing or use adapter modules to append the new line in the sender adapter.
    the second option(and better one) is to do this via message mapping.
    third option is to write a OS script and execute it after message processing on receiver file adapter.
    one thing you need to make sure is that since OS scripts run on XI server itself(not on FTP server) so in case you are picking file from FTP server and delivering to FTP ,then you can't use option 1 or 3,you can only use option 2
    Thanx
    Aamir

  • Adobe Create PDF, my main usage is to combine 2 files and delet part of it, can I do That?

    I want to suscribe to Adobe Create PDF, my main usage is to combine 2 files and delet part of it, can I do That?

    Hi mzf35k,
    CreatePDF would enable you to combine two files however you might not be able to delete from the existing file. You need to make modification(delete) in the source file.
    Or you can purchase the full Acrobat or subscription for Acrobat to perform the desired task with PDFs.(Please visit the link)
    http://www.adobe.com/products/acrobat.html?promoid=JOLIR
    (Acrobat Full)
    http://helpx.adobe.com/x-productkb/policy-pricing/acrobat-pro-xi-subscription-faqs.html#id _53052
    (Know about Acrobat Subscription)
    ~Pranav

  • The function to combine pdf files and the function to add bookmarks stopped working in 10.x

    We had VBA scripts in Access 2003 running with Acrobat 7.0 standard version to combine pdf files and to add bookmarks. The scripts worked fine. Now we installed 10.x and the functions stopped working. Does anyone share the same experience?
    In the scripts, we just call the OLE object with the code like:
        Set acroOrigPdfDoc = CreateObject("AcroExch.PDDoc")
        Set acroNewPdfDoc = CreateObject("AcroExch.PDDoc")
    Then we have the call "acroOrigPdfDoc.InsertPages" and "acroOrigPdfDoc.Save" to save the combined pdf files. All these functions work fine under 7.x. Under 10.x, they stopped working without any error messages.
    Can anyone help me?

    Post your problem in the forum for Acrobat SDK.

  • Combining 2 files and mapping it to a single destination file

    hi all;
    if i am combining 2 files and mapping it to a single destination file then do we need to define 2 sender communication channels and 1 receiver communication channel

    i have done with the BPM.
    steps
    1 Block with corelation name
    2 Fork with end condition counter not equal 2
    3 fork branch 1 -- receive with corelation and container incrementing count by 1
      fork branch 2 -- receive with corelation and container incrementing count by 1
    4 transformation
    5 send
    i have source file structure during mapping:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:SenderData1 xmlns:ns1="http://multimapping.com">
             <Name>AAAA</Name>
          </ns1:SenderData1>
       </ns0:Message1>
       <ns0:Message2>
          <ns1:SenderData2 xmlns:ns1="http://multimapping.com">
             <Name>BBBB</Name>
          </ns1:SenderData2>
       </ns0:Message2>
    </ns0:Messages>
    i breaked the structure in 2 and placed it in different files
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:SenderData1 xmlns:ns0="http://multimapping.com">
       <Name>AAAA</Name>
    </ns0:SenderData1>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:SenderData2 xmlns:ns0="http://multimapping.com">
       <Name>BBBB</Name>
    </ns0:SenderData2>
    is that all to be done

  • Data combining from two files and weired issue in FIM 2010

    Experts,
    Following is the scenrio:-
    User File
    empid:firstname:lastname:deptnumber
    DeptFile
    deptnumber:departmentname:companyname:
    Finally
    Object type 'person' in metaverse and fim service should have all attribute:
    Object Type - Person
    Attributes - empid,firstname,lastname,deptnumber,depatmentname,companyname
    To implement this:-
    I created Inbound rule for User File. Relation ship criteria as accountname=empid and selected 'create resource in FIM'
    Again created Inbound rule for DeptFile. Relationship criteria as deptnumber=deptnumber and not selected 'create resource in FIM'.
    Well the Inbound rule for User File is working fine but Inbound rule for DeptFile is not updating depatmentname and companyname in 'Person' object.
    Also intemittently I see following error:-
    The synchronization rules have changed.
    In order to apply this change to all imported objects, you must run full synchronization or full import and full synchronization.
    Do you want to continue with the selected run profile?
    Any Ideas where I am going wrong?
    Thanks,
    Mann

    If you don't want to write code in FIM, perhaps you could combine the files using powershell before importing it to FIM, that way you only need one MA.
    #Import user csv file
    $userlist = import-csv "C:\temp\users.txt" -Delimiter ":"
    #Import department csv file
    $departmentlist = import-csv "C:\temp\departments.txt" -Delimiter ":"
    #Create a hashtable of departments
    $departmenttable = @{}
    foreach ($department in $departmentlist){
    $departmenttable.add($department.deptnumber,$department.departmentname)
    #Create hashtable of companies
    $companytable = @{}
    foreach ($company in $departmentlist){
    $companytable.add($company.deptnumber,$company.companyname)
    #Map userobjects to departmentnames and write to file
    $tofile = New-Object System.IO.StreamWriter("C:\temp\result.txt")
    $tofile.writeline("empid:firstname:lastname:deptnumber:departmentname:companyname")
    foreach ($user in $userlist){
    $tofile.writeline($user.empid + ":" + $user.firstname + ":" + $user.lastname + ":" + $user.deptnumber + ":" + $departmenttable.item($user.deptnumber) + ":" + $companytable.item($user.deptnumber))
    $tofile.Close()
    --- Jesper Lönnqvist, Identity Architect http://addition-it.se

  • Pls Help--- URGENT... Combining XML file and HTML file Using java program.

    Hi, I need to implemnt this for my project....
    I need to combine XML and HTML file and generate a new HTML file
    Sample XML File:
    <user>
    <txtName>sun</txtName>
    <txtAge>21 </txtAge>
    </user>
    Sample HTML File:
    <body>
    Name: <input type="text" name="txtName" value=""
    Age : <input type="text" Age="txtAge" value=""
    </body>
    I need a java program to combine the above xml and html files and generate the output in HTML.
    Any kind of help is sincerely Appreciated.
    Thanks.

    toucansam wrote:
    So you want us to write it for you? It's pretty straight forward, first parse the xml file with the *[best java xml parser|http://www.google.com/search?&q=parsing+xml+in+java]* and then go through the nodes and construct the html with strings and concatination. Then write the file using *[the best java file writer|http://www.google.com/search?hl=en&q=writing+to+a+file+in+java]*.
    He would do better to use existing tools that make this easy [http://www.ling.helsinki.fi/kit/2004k/ctl257/JavaXSLT/Ch05.html|http://www.ling.helsinki.fi/kit/2004k/ctl257/JavaXSLT/Ch05.html]

  • Read two files and store it to Global Internal table in LSMW

    Hi
    I have a requirement in LSMW, there are two files which needs to read the data and upload into SAP based on 2nd file data with some conditions.
    Example :
    File One : Customer Details.
    File Two : Customer Master.
    when we upload the customer master data into SAP we have to cross check customer aganist file two(customer master).
    If the customer is does not exist in the file two, then only we have create the customer other wise skip the record.
    How to go about this, can we create any global internal table in LSMW and how to store the 2nd file data for cross check.
    I tryed with define two source structures, but at any point of time 1st file data is only one record is available.
    Please suggest some solutions.
    Advance Thanks
    Murali.

    Hi Jürgen L.
    If customer is exist in the both files, then we need to extend him to other company codes.
    Some reasons the data is not available in SAP, for writing select query. apart from this we have to do some validation based on 2nd file data.
    Is there any possibility for global internal tables
    Thanks
    Murali

  • BPM to Check Two files and Connect R3 server

    Two Files are comimg to XI. Both Files having same strucure.
    Sceanaro is File to Proxy
    In File1 ,XiI  search for Record1->Id . if ID found ,then it will connect R3 system and check if ID is present there or not. if not it will create.
    IF Id is present in R3 Server then it will wait  for File2.
    at same time  Xi search for file2 and check whether this ID is there or not.
    If it is not then  Xi will change details in R3 server.If yes then wont modify details of ID in R3 server.
    tWhat will BPM steps Involved in this case.
    Start -> Fork1(Two receiver)-> then what
    plz help me to desing BPM

    Sorry For Confusion
    Can amy one help me to get steps For BPM.
    FILe1->  Contaiss -Hedear(1)-Record(many) Footer(1)
    FILe2->  Contaiss -Hedear(1)-Record(many) Footer(1)
    In Record there is Material Number.
      If File1 Contains 6 Recird and File 2 Contains 4 record.
    When Both file come to XI,
    XI check First Record of File1 and  then check  this Material number for Record 1 agains material Numbers of   all 4 Records of file2.
    If it found same Material Number,in mapping It will update one traget field.
    Edited by: harshalata Gaonkar on Oct 15, 2010 10:28 AM

  • I combined some files and forgot to download the result. How can I download now?

    I have a combined pdf file but I forgot to download it.  How can I do it now?

    Hi sandram,
    Your converted files are stored in your Acrobat.com online account (until you delete them). You can find your file by logging in to https://cloud.acrobat.com/files. Select the file that you want to download, and click the Download link at the top of the window.
    Please let us know how it goes!
    Best,
    Sara

  • Combining two VI and avoiding overlapping digital lines

    I'm working on a VI which used to be two separate programs (top while loop and bottom while loop).  One program would run a stepper motor over time and pull an object to apply tension and read it through a load cell (top while loop).  The other program it used to move the motor rapidly in order to reset it's position back to a "default" (bottom loop).  I'm trying to get the functionality of both programs into one VI that I can control the stepper motor without having to switch programs (and mostly to have a "complete" program).  I'm not very skilled yet with the in's and out's of LabVIEW but I'll try my best to work with your suggestions! 
    Thanks,
    James
    Attachments:
    combinefiles.vi ‏656 KB

    James,
    I want to get some more information about your application.  From what I can understand, the top loop ran first and when that was completed you ran the bottom loop in your program to reset the values to default. Now you combined both VIs and want it to programatically perform the same action?Do you want your code to run in such a way that when you press a button, it 'switches' from one mode to the other? Before giving suggestions, I'd like to verify what it is your are trying to do in order to give a suggestion.
    Stephanie O.
    DIAdem Product Manager
    National Instruments

  • Combining Indesign files, and maintaining Master Pages

    Hi
    I have some Indesign files which I need to combine.
    But I'd like for them to keep their individual Master Pages,
    because of how they are page numbered.
    I suppose there is a way of working with Sections for this,
    but the page numbers appear on either the left side or the right side
    depending on whether they are even or odd...
    So is there a way of doing this?
    I'm stuck...
    Only other way I can think of is doing separate PDF files and
    combining those... But there's gotta be a way in Indesign... Hasn't there?
    Thanks a lot
    Nikki

    You are correct, printing double sided indeed.
    And yes, the reader will see it as spreads.
    To be honest, we are both relatively new,
    and are just following what people in our
    positions in the past have done.
    They used to do their catalogs
    all in Photoshop, and then combine into a PDF.
    So even simply using InDesign to layout the pages
    was a bit of a stretch in terms of opening
    up eyes!
    The way we're  doing it should still work out fine though
    I guess it just wasn't the most efficient.
    Is this what you mean?
    Nikki

  • How to Read from two file and write to another file --Please help !!

    Hi all,
    Please suggest me where i'm goin goin wrng.
    I have 2 flat files. one of them is the main file(Ann.dat) has a about 150,000 lines (each line has unique ID from 00001 to 45000) of data and the the other(Miss.dat) has a just a list of IDs that are no longer in use & have to be deleted from the first file(NewAnn.dat). (Note that Ann.dat is a tab delimitted file and Miss.dat is just a list of all invalid IDs)
    Below is my code. It doesn't do what I'm supposed to. Please suggest me or help me with a code to do it. What I'm trying to do is read each of the lines from the 2 files compare the ID in ann.dat with all the IDs in Miss.dat & if it doesn't match with the ID in Miss.dat write the whole line to NewAnn.dat. And do the rest with all the lines in Ann.dat.
    It could be a real dumb question. since i'm not a software professional, I consider myself to be newbie to programming. I desperately need your help.
    import java.io.*;
    import java.util.*;
    public class anntemp{
         public static void main(String[] args)
              String keyAnn ="";
              String keyMis="";
              String recAnn =null;
              String recMis =null;
              try{               
              FileReader fr=new FileReader("C:\\Tom\\Ann.dat");
              BufferedReader br=new BufferedReader(fr);
              int couter=0;
              while ((recAnn = br.readLine())!=null)
                   couter++;
                   keyAnn = recAnn.substring(0, recAnn.indexOf("\t"));
              FileReader fr1=new FileReader("C:\\Tom\\Miss.dat");
              BufferedReader br1=new BufferedReader(fr1);
              while((recMis = br1.readLine())!=null){
              keyMis = recMis.substring(0, recMis.indexOf("\t"));
                   if(keyAnn.equals(keyMis)){
         FileWriter fw=new FileWriter("C:\\Tom\\NewAnn.dat",true);
         BufferedWriter bw=new BufferedWriter(fw);
         PrintWriter pw=new PrintWriter(bw);
         StringBuffer writeValue = new StringBuffer();
         writeValue.append(recAnn);
                                                 pw.println(writeValue.toString());
         pw.flush();
              }catch (Exception expe){
                   System.out.println("In Exception ");
                   expe.printStackTrace();
    Thank you all in advance,
    br

    I think you need to close the files when you are done in the inner loop. Plus I think you'll be overwritting the file in the inner loop if more than one match. It might be easier to read the unused id file into a map at the start, and then loop up the id's from the master file in the map. You can put the unused id's in as the keys, and a Boolean.TRUE as the value (value won't matter). Then just check if the map contains the key for the id read from the master file. That should cut down on disk activity. This assumes the unused id file is smallish.

  • What is the Unix command to concatenate two files and merget it in to one ?

    Hi Experts,
    I have three jobs and each job creates a file. I want to run one more job which clubs these three files and merges it in to one.
    I know the process of opening each file and appending it in to the target file using DATASET concept.
    Instead of that, I want any UNIX Shell command so that I can call that directly from ABAP and execute it
    Any help on this would be highly appreciated
    Thanks in advance.
    Babu Kilari

    Hello Babu,
    We can very well call an OS command from within ABAP, but in your case, I don't think that is really required. Please find below a logic that might be helpful to you.
    You have three files, whose contents needs to be merged into a single file.
    Read the contents of each file and store it into an internal table.
    DATA: command LIKE rs37a-line.
    DATA: BEGIN OF tabl OCCURS 0,
              line(2000),
          END OF tabl.
    command = 'cat /tmp/file1.txt'.
    CALL 'SYSTEM' ID 'COMMAND' FIELD command
                  ID 'TAB'     FIELD tabl-*sys*.
    Internal table 'tabl' will contain the contents of the file.
    Accumulate all the contents into a single file and upload to the application server using OPEN DATASET, TRANSFER DATASET and CLOSE DATASET.
    Let me know if you need a more detailed explanation.
    Regards
    Sabu.

  • Combine csv files and insert source filename

    Newbie powershell question - Need help combining multiple csv files (100+) and inserting a column containing the name of the source file
    ex: 
    Apples.csv
    A,B,C,D
    1,2,3,4
    Oranges.csv
    A,B,C,D
    1,2,3,4
    Desired output would look like this:
    combined.csv
    A,B,C,D,Filename
    1,2,3,4,Apples.csv
    1,2,43,4,Oranges.csv

    I did see a post with something similar to what I wanted to accomplish but it wouldn't work for me since my file names will change and I am not going to create a variable for each file
    $CSV1 = Import-CSV c:\csv1.csv
    $CSV2 = Import-CSV c:\csv2.csv
    $Result = New-Object PSObject -Properties @{
    Field1 = $CSV1.Field1
    Field2 = $CSV1.Field2
    Source1 = "CSV1"
    Field3 = $CSV2.Field1
    Field4 = $CSV2.Field2
    Source2 = "CSV2"
    $Result | Export-CSV c:\Result.csv -NoTypeInformation

Maybe you are looking for