Multiple Output XML based on input

I want to have multiple outbound files based on the contents of the input file.  For instance, in the example below, I want to have multiple outputs based on Report_ID.
So I would have Output 1 with Report_ID of 001 (With 2 lines), Output 2 with Report_ID of 002 (With 1 line), Output 3 with Report_ID of 007 (With 1 line) and Output 4 with Report_ID of 009 (With 2 lines).
- <ns:INB xmlns:ns="...">
- <EXPENSES>
- <EXPENSE_LINES>
  <EMP_ID>TUUK1</EMP_ID>
  <Report_ID>001</Report_ID>
  <Value>7</Value>
  </EXPENSE_LINES>
- <EXPENSE_LINES>
  <EMP_ID>TUUK1</EMP_ID>
  <Report_ID>001</Report_ID>
  <Value>3</Value>
  </EXPENSE_LINES>
- <EXPENSE_LINES>
  <EMP_ID>TUUK1</EMP_ID>
  <Report_ID>002</Report_ID>
  <Value>25</Value>
  </EXPENSE_LINES>
- <EXPENSE_LINES>
  <EMP_ID>TUUK1</EMP_ID>
  <Report_ID>007</Report_ID>
  <Value>6</Value>
  </EXPENSE_LINES>
- <EXPENSE_LINES>
  <EMP_ID>TUUK1</EMP_ID>
  <Report_ID>009</Report_ID>
  <Value>63</Value>
  </EXPENSE_LINES>
- <EXPENSE_LINES>
  <EMP_ID>TUUK1</EMP_ID>
  <Report_ID>009</Report_ID>
  <Value>3</Value>
  </EXPENSE_LINES>
  </EXPENSES>
  </ns:INB>

You have to use Multimapping here.
for that create a Message mapping and switch to the signature tab ,change the Occurence of target Message Type to 0..unbounded.
Assign the Mapping as follows
Report_ID(Change the Context to Expences)-->splitByValue(value Change)-->collapeseContext--->TO THE Target Message Type
Report_ID(Change the Context to Expences)---> splitByValue(value Change)----->collapeseContext--->SplitByValue(ValueChange)---to the Target Report_Id.
EMP_ID(Change the Context to Expences)---> splitByValue(value Change)----->collapeseContext--->SplitByValue(ValueChange)---to the Target EMP_Id.
Value(Change the Context to Expences)------------------------------------------------------\
                                                                                formatByExample-----To the TargetValue
Report_ID(Change the Context to Expences)-->splitByValue(value Change)---------------------/
this works fine if the Values are coming in the Order otherwise you also have to use Sort and SortBy Key functions.
It will be better if you provide the target structure to provide the exact mapping with the target fields
Edited by: Kubra fatima on Jun 23, 2010 3:32 PM

Similar Messages

  • Grouped output required based on input group :No one???????

    Hi to all,
    I want grouped output based on input group.
    e.g
    SQL> select * from test_data;
    FIELD
    a
    b
    c
    d
    e
    a
    e
    c
    d
    e
    10 rows selected.
    SQL>
    Now I want grouped output like this
    When I give input set (a,b) then output should be :
    a,b
    a
    c
    c
    d
    d
    e
    e
    e
    When I give input set (a,e) then output should be :
    a,e
    a,e
    b
    c
    c
    d
    d
    e
    I want a query regarding this , I know this is possible through Pl/SQL, but the requirement is through query.....
    rgds,
    Rup

    I want grouped output based on input group.
    I want a query regarding this
    with
    test_data as
    ( select substr(p, instr(p, ',', 1, level) + 1, instr(p, ',', 2, level) - instr(p, ',', 1, level) - 1) as field
        from (select ',' || 'a,b,c,d,e,a,e,c,d,e' || ',' as p from dual)
        connect by level <= length(p) - length(replace(p, ',')) - 1
    input_set as
    ( select distinct substr(p, instr(p, ',', 1, level) + 1, instr(p, ',', 2, level) - instr(p, ',', 1, level) - 1) as field
        from (select ',' || 'a,d,e' || ',' as p from dual)
        connect by level <= length(p) - length(replace(p, ',')) - 1
    group_count as
    ( select min(count(i.field)) as group_cnt
        from test_data t, input_set i
        where i.field(+) = t.field
        group by t.field
        having count(i.field) > 0
    test_data2 as
    ( select field,
          row_number() over (partition by field order by null) as group_no1,
          row_number() over (                   order by null) as group_no2
        from test_data
    input_set2 as
    ( select field, row_number() over (order by field) as item_no
        from input_set
    select max(fields) as fields
      from
      ( select
            replace(sys_connect_by_path(decode(level, 1, group_no2), '-'), '-') as group_no,
            ltrim(sys_connect_by_path(t.field, ','), ',') as fields,
            level as lvl
          from test_data2 t, input_set2 i, group_count
          where i.field(+) = t.field
          start with group_no1 > group_cnt or item_no = 1 or item_no is null
          connect by prior group_no1 <= group_cnt and group_no1 = prior group_no1 and item_no = prior item_no + 1
      group by group_no
      order by max(lvl) desc, fields
    FIELDS
    a,d,e
    a,d,e
    b
    c
    c
    e
    6 rows selected.

  • Determine output filename based on input filename content with RFC lookup

    Hello Guys,
    I have this sitaution which needs your ideas/sugestion.
    1)  PI system picks up text file from FTP server folders.
    2)  Within PI system,  we need to dynamically determine output filename , logic to determine output filename will be :
              2a)  Read content of the input file particular line number  (Fixed)
              2b)  Pass the value got from step 2a)  to the Remote function module passing value read in step 2a) to get response
              2c)  Use response received from 2b) to construct output filename.
    Please let me know if you have any qeustions on my problem,  appreciate your ideas/suggestions.
    Thanks,
    Krishna

    Hello Priyanka,
    THanks for your response to my post.
    My input  TEXT filename has following contents
    :20:CHASGB2LXXX
    :25:24803501
    :28:11264/01
    :60F:C110921USD85410,88
    :61:110921C12307,00NTR NONREF//5311802
    :86:TR ?
    ?20IV.2000199238 FR.26.08.11 IV.2000198595FR.22.08.11
    ?23AZMAT20091123183
    Now  I would like to read second row of this TEXT file containing   ":25:24803501"   and would like to read only text
    24803501.
    Hope this additional info will provide me more info on my requirement.  Appreciate your response.
    Regards
    Krishna

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • How to hide columns in the output table in webdynpro based on input

    Hi Experts,
       I have 2 inputs and 1 input is optional.If both inputs are given proper table output is displayed,but if only 1 input is given a column is empty in the output table  so i want to hide this column dynamically at runtime based on my inputs.And i want to hide some empty rows also at runtime based on inputs.
    Can anyone help me out to solve this.
    Thanks in advance.
    Regards,
    Anita.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format

    Is it possible to create a Webservice in BI which takes XML as an input and gives PDF as output with an additional requirement that Siebel expecting the XSD from BI to send data in the BI requested format. Siebel wants to send the data as xml to BI but not sure of the BI capabilities on giving WSDL embedded with XSD (input is a hierarchical)

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • How to use an .xsl file to transform input XML to re-formatted output XML?

    Hello,
    I have a .xml file from a report that I want to use a stylesheet to transform into a different .xml format.
    I am reading that I can create a .xsl file to read my input and then transform it to a new output .xml file.
    How do I load this into the Apps?
    I tried creating a template definition and loading the .xsl in as type 'XSL-TEXT' and also, I added
    <?xml-stylesheet type="text/xsl" href="Transform.xsl"?> to my xml data source. The output looked the same as the input.
    Has anyone done this before? Any suggestions would be great!
    Thanks
    -CC

    This is how I use e4x with HTTPService:
    import mx.collections.XMLListCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var claimsXLC:XMLListCollection;
    private function claimsHandler(evt:ResultEvent):void{
        claimsXLC = new XMLListCollection(evt.result..claim as XMLList);
    XML data is being returned, but I use XMLList to create the XMLListCollection.
    If this post answers your question or helps, please mark it as such.

  • XSLT Generation from input and output XML

    Is it possible to generate an XSL mapping file in Java if we have input and output XML.
    If yes, then how to achieve this when user defined functions are used during mapping?

    Hi Prateek,
    check the following links for Business connectors and adapter:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/92/3bc0401b778031e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/4fb240ac052817e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/3f93404f673028e10000000a1550b0/frameset.htm
    Hope these help you.
    Regards,
    Anuradha.B

  • Different input and output xml files [encoding]

    Welcome. I write a little code that connect to ftp server, log in, than search an input xml file. That file is input for BufferedReader. This data are writing to local file. Im from poland and i wish use polish fonts and that fonts are broken in this output file (input is ok, it's write in editor that support utf-8 encodding)
    Code of my program:
    http://www.piotrkow.net.pl/~loko/xml_java/java_pyt.html
    Input file:
    http://www.piotrkow.net.pl/~loko/xml_java/agreeting[input].xml
    Output file (totaly broken):
    http://www.piotrkow.net.pl/~loko/xml_java/agreeting[output].xml
    How do I fix this? Please help.
    PS: Documentation used ftp libraries:
    http://jvftp.sourceforge.net/docs/api/

    Problem has been solved :)
    --> http://www.piotrkow.net.pl/~loko/xml_java/java_solved.html

  • Multiple Input Multiple Output Fuzzy Logic Controller

    I am designing an autotuning PID temperature control system whose PID gains are adjusted using a Multiple Input Multiple Output (MIMO) Fuzzy Controller. I am unsure how to set up specific inputs and how to use specific outputs when there are multiple inputs and outputs. Specifically, my Fuzzy system has two inputs and three outputs.
    For the input, I have two 1D arrays of scalars (doubles) which I have used to build an array and concatanated the inputs to the array. How do I configure which values of this array are used as each specific input value to the fuzzy system?
    Similarly, for the output, the fuzzy system gives three output values which are used as the PID gains. How do I configure these such that they are in the right order to be used as the PID Gains of the PID VI?

    Hi natsmi,
    You can find some examples by navigating to:
    C:\Program Files (x86)\National Instruments\LabVIEW XXXX\examples\control\fuzzy
    Some of them are at least MISO systems and might be helpful to clarify some ideas. You can also find them using the Example Finder from LabVIEW (By going to help on the top menu, and then Find Examples). There you can go to the search tab on the left and type in fuzzy.
    Hope this helps.
    Regards,
    AGJ

  • One Input File Multiple output files.

    Hi,
    How to Generate Multiple Output (Target) files by using Single (Source File) Input file in File 2 File Scenario.
    Please help me to do this.
    With Regards,
    Mahesh

    Hi,
    This is a scenario of 1 : N transporting right.. for this u shud use Multi-mapping then you need to change your logic because Multi-mapping is only be used by ccBPM. so use BPM (integration process) in IR to implement you logic in File to File scenario.
    oops.. i missed one thing ..
    in simple file to file scenario you can use Message patterns for duplicating the target fields if you getting from single file. You can use this pattern like in target field structure right click on root tag and then click on duplicate subtree, and then you are down.. above is the other way if u want to use bpm.
    Hope this will help you,
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • BOM and Production Order: Multiple Inputs to Multiple Outputs

    Dear All, My client's industry required BOM and Production Order must be Multiple Inputs to Multiple Outputs. We propose to create customization program to work on it but client do not want any customizations. Any suggestions? SAP B1 8.81 PL13 Thank you very much in advance. Best Regards, Vivian

    Hi,
    Please advice your requirement with an example. There is possibility to input multiple components to produce single finished product.
    Not sure you have checked with SAP help file. If not refer SAP help file and below blog.
    http://scn.sap.com/community/business-one/blog/2014/03/01/how-to-implement-production-in-default-sap-business-one
    Thanks & Regards,
    Nagarajan

  • XML based Adobe form is not allowing to input values while display on IE

    Hi Experts
    I have intergarted an XML based adobe form in webdynpro with inputs fields and submit button.
    But on display on Internet expolrer it doesn't allow to input values even button dosen't work.
    Please help me how would it will allow to input values .
    Many thanks in advance

    hi dear
    yes the enabled property is checked but still form doesn't allow to enter value and submit button is also disabled.
    Is there any setting or some program code is required.
    It would be great if some body can help us in this ....
    many thanks in advance.
    thanks

  • Input xml from output xml with reverse transformation

    I have the transformation and the output xml file. Is there any way I get the input message using the trasformation and output message with minor manual changes? Is there any tool for that?

    Hi Ragavalli,
    I understand that you want to archive the incoming message before map is applied. (Assuming map is not to be there on send port as not very clear about restrictions you have)
    There are two ways:
    1. Use of Custom pipeline component to archive message . You can find one at :http://biztalkarchiving.codeplex.com/
    2. The other option is to have
     Recieve port without map
     Two send port one  pointing to Archive folder  and other to temporary folder (intermediate)location
     Add both the send port to Send Port group. Have filter on it as BTS.PortName = ReceivePortName
     Create a receive port with temporary folder as receive location 
     Apply the inbound map on this port
    If map can be allowed on send port then
    1. Rec port without map
    2. Two send port, one without map other with map. 
    Thus original message will be saved by Send Port 1 and transformed by Send Port 2
    Maheshkumar
    S Tiwari|User
    Page|Blog|BizTalk
    Server : Scheduling Orchestration using Trigger Message

  • How to retain prolog in output xml after parse the input xml

    Hi,
    I am using com.bea.xml.XmlObject.Factory.parse(String) method to parse a xml.
    Input XML is having prolog defore the root node.But after parse the xml using the above method, the prolog is not there in the Output XML.
    can any one help me to retain the prolog in Output XML as it is in Input XML......
    Thanks in advance..
    Regards,
    Deba

    Hi,
    The Input XML is like
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Body>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    But after parse the Output XML become
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <SOAP-ENV:Body>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    But due to project requirement i want to keep the prolog(<?xml version="1.0" encoding="UTF-8"?>) as it is with Output XML after parse the xml.
    can i use any XMLOption while calling parse() method...Or any one have any otherway to retain prolog after parse ?
    please help me to get it .
    Thanks in advance.
    Regards,
    Deba

Maybe you are looking for

  • ITunes 7(Error Quick Time 7.1.3 is needed, you have 7.0.0d)

    Uh... So I download Itunes/QuickTime. Install it, and boot my computer. It tells me I dont have the most up-todate QuickTime. I try and download QuickTime stand alone, but it only is a package with Itunes, and is still out of date. Any Help would be

  • Anyway to put data folder into dvd project

    Hey, so I am trying to make a short video for my friend using a bunch of pictures from her birthday, I burned the short movie and it works fine, though i am curious if there is a way to add all the .jpg files onto the disc after burning it in DVD SP.

  • Unable to expand the dropdown in the Webdynpro Java iview in Portal

    Dear Experts, We have a lot of Webdynpro java application iview in portal in production system.All the dropdowns present in those iviews are not expanding in production system. But we are able to expand & select the same webdynpro java iview applicat

  • Missing Beginning/Ending balances for Italian company on RFSSLD00

    We are using report RFSUMB00 ( TA  F_IT_01) for the hard closing procedure for our Italian company. The process is known and working properly. Now we have been requested for reporting beginning and ending balances for past fiscal years using report R

  • Yet another Itunes won't open, but shows in TAsk Manager

    Yesterday I was loading some new music into itunes (6.0.1 I believe), when the application froze. I ended task on it and tried to restart. I got busy and forgot that I opened it, but when things slowed down I noticed that the GUI was not in my taskba