Split XSLT Output into Multiple Files

I have an XML-to-File scenario working, but now I need to split my XSLT map output into multiple files based on the data.  I have been reading the Jin Shin blog on message splitting, but don't know that it pertains to my situation.
XML data getting mapped with XSLT map creates output formatted like this.
<?xml version="1.0" encoding="utf-8"?>
<ns1:ColdInvoiceData xmlns:ns1="http://graybar.com/cold/invoice">
<Header>
  <RecordID>HDR</RecordID>
  <InvoiceNumber>15</InvoiceNumber>
</Header>
<Details>
  <RecordID>DTL</RecordID>
  <LineItemNumber>001</LineItemNumber>
  <UnitPrice>1.25</UnitPrice>
</Details>
<Details>
  <RecordID>DTL</RecordID>
  <LineItemNumber>002</LineItemNumber>
  <UnitPrice>2.22</UnitPrice>
</Details>
<Header>
  <RecordID>HDR</RecordID>
  <InvoiceNumber>16</InvoiceNumber>
</Header>
<Details>
  <RecordID>DTL</RecordID>
  <LineItemNumber>001</LineItemNumber>
  <UnitPrice>3.33</UnitPrice>
</Details>
</ns1:ColdInvoiceData>
I currently have this output writing to a file (FTP, File Conversion).  A single file is no issue, but I need to send multiple files for every set of HDR/DTL(s).  I also need to put the invoice number in the filename (which is working fine as a parameter in my single FTP File CC now).
Can I make this happen with message splitting and maybe a second map (GUI map)?  Do I need to adjust the XSLT output XML format to have an invoice level?  Is there a better way to go?
Thanks!

I made a change to the namespace used on the Messages/Message1 nodes (since the system-assigned ns0 was already being used in my xml data) and now I am getting output. 
The problem is that the output matches my input.  As aforementioned, I started with just a one-to-one mapping on every node and field. 
When I change the mapping to try to force multiple ColdInvoiceData nodes, I get the following error (when my source has two Invoice nodes):
<Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages/ns0:Message1/ns1:ColdInvoiceData[2]/Invoice. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at
When my source has one invoice node, it works ok.
Here is a screenshot of my mapping structure.
http://webpages.charter.net/kpwendel2/ib.jpg

Similar Messages

  • Split SQR output into multiple files And Rename each file.

    Greetings!
    We ran into scenario where we need to split an SQR output (PDF) split into multiple files (each page , each file). More over the out put has to be renamed with EMPLID.
    It is for printing Advices, where we run DDP003 to print all of them, Our requirement needs to have one PDF file for each employee to placed into a shared drive OR to be emailed.
    I was thinking of running the same process in a loop individually, but this is resource intensive. Is there any way we can batch run this SQR process and split into each page (each paychek comes to one page),
    AND
    I need them renamed by SQR as it creates them, Each file would be names as EMPLID.
    This is all in alternative to run process individually by employee , via self service. to not to over laod Process scheduler server.
    Can anyone help me how can we get these thigns done in SQR?
    Thanks in advance.

    You can use the SQR command new-report for each employee which closes the current report output file and opens a new one with the specified file name (e.g. EMPLID).

  • Redirecting XSLT output to multiple files

    Hi,
    I am trying to redirect the output of the XSLT into multiple files using
    <xsl:variable name="filename" select="concat(@id,'.xml')" />
    <redirect:write select="$filename">
    </redirect:write>I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
    Can you please tell me if this can be done in someway ?

    Aravinda wrote:
    I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
    Can you please tell me if this can be done in someway ?You + setParameter + method of your Transformer in java code to set parameters. like below:
    transformer.setParameter("message1", "This is my message to XSLT from Java Class.");
    transformer.setParameter("message2", "Hello XSLT how are you?");
    . . .You can retrieve above parameters in global parameters/variables(must be as child of xsl:stylesheet element in xslt) defined in xslt like below:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:param name="message1"></xsl:param>
         <xsl:variable name="message2"></xsl:variable>
         <xsl:template match="/">
              <xsl:value-of select="$message1"/>     // retrieving message1
              <xsl:value-of select="$message2"/>     // retrieving message2
              <xsl:value-of select="concat($message1,$message2)"/>     // performing concat on message1 and message2
         </xsl:template>
    </xsl:stylesheet>*Cheers
    TYPUROHIT*
    (Tejas Purohit)

  • Splitting single video into multiple files - workflow improvements?

    I regularly need to split a single video into multiple separate files that are used by other programs.  I'm using Premiere Pro CS4 for a number of reasons including the ability to easily and accurately select a scene by individual frames, native audio and video effects/filters, and the ability to import and export various video types.  I'm open to using other tools, but I haven't yet found one that is even close to Premiere Pro when it comes to accurately selecting split points.
    I'm not a Premiere Pro expert.  I have been doing this for about four months and have read many resources (books, forum posts, help guides) to refine the workflow I'm currently using.  My question:  does anyone know any improvements that might save me time/keystrokes.
    Current workflow:
    I've bound F8 to File > Export > Media
    Import video file
    Open in source monitor
    Set In and Out points for scene in source monitor
    Ctrl-drag from source monitor to Project Panel (creates a subclip)
    Repeat 3 and 4 for all scenes/subclips
    Select all subclips from Project Panel and drag to timeline
    Set work area bar to first subclip in timeline by the following four keystrokes:  Home, Alt-[, PageDown, Alt-]
    Type F8 (File > Export > Media shortcut).  Type output file name, click OK and the first subclip is put in the AME queue
    For the remaining subclips, type: Alt-[, PageDown, Alt-], F8, output file name, OK and repeat until done
    Any thoughts/ideas on workflow improvements?
    Thank you!

    Thank you Hunt.
    For the sake of brevity, I didn't include all of the details about the various aspects of the projects.
    Early on I was doing what you suggested and yes, it is a little quicker.  I learned (painfully) a couple of months later that I sometimes have to go back and adjust the clips and this method (trim to timeline with no subclips) resulted in quite a bit of duplicate effort (to reobtain start/stop points).  I've since learned that managing the "scenes" as subclips in topical bins allows me to go back and make adjustments, long after I've totally forgotten about the project content, without a lot of unnecessary reworking.

  • I am trying to split a document into multiple files and it won't let me

    I have opened my file in Adoble Acrobat Pro, for which I have a year subscription, and the option to split the document is gray (not applicable).  Why would this not be an option?  This file contains multiple docs that were merged into one for ease while emailing.  Now I need to split them back up.  Shouldn't I be able to do this with Acrobat Pro?

    Hi adminkg&a,
    It sounds like the file may have security applied to prevent alteration. Do you see "Secured" in the document's title bar?
    Best,
    Sara

  • Problem splitting XML Data into multiple files

    I am sending an XML message through an enterprise message source in enterprise link design studio. While I do so, I am getting a heavy error. This error tells me that my path ist wrong, but I am sure this one is right. Actually everything worked fine till I added an attribute twice in my XML. Since this point enterprise link drives me crazy, I have checked on my XML, it is valid, I have checked on my path, which is also ok.
    Anyone some suggestions how to resolve the issue?
    The Error code looks the following:
    Unable to resolve path "/msg" in message field "host" XML.
    XML:
    <msg host="192.168.52.129:18342" app="[ZInvestigationProvider#null]" cat="PROCESS" id="org.sopware.services.exampleuri.impl.CepMessage.21" lvl="INFO" text="Investigation_POSSIBILITY BPEL_ID=330024 - ID=1002, RFID=RFID002, NAME=SSN Emmersberger, StartDate=10 CurrentDate=17, expectedShippingDate=13, currentZone=-1, deliveryTimeAgreement=true" tsp="2007-12-05T22:25:36.093Z" xmlns="http://schemas.sbb.org/management/Notification/1.0" />
    [Oracle BAM Enterprise Link error code:  0x75 -- 0x1, 0x75 -- 0x68]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Unable to resolve path "/msg" in message field "host" XML.
    XML:
    <msg host="192.168.52.129:18342" app="[ZInvestigationProvider#null]" cat="PROCESS" id="org.sopware.services.exampleuri.impl.CepMessage.21" lvl="INFO" text="Investigation_POSSIBILITY BPEL_ID=330024 - ID=1002, RFID=RFID002, NAME=SSN Emmersberger, StartDate=10 CurrentDate=17, expectedShippingDate=13, currentZone=-1, deliveryTimeAgreement=true" tsp="2007-12-05T22:25:36.093Z" xmlns="http://schemas.sbb.org/management/Notification/1.0" />
    [Oracle BAM Enterprise Link error code:  0x75 -- 0x1, 0x75 -- 0x68]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Update of Plan "NotificationPLAN" failed.
    [Oracle BAM Enterprise Link error code:  PlanMgr -- 0x1, PlanMgr -- 0xD5]
    Regards,
    Christoph

    Ok what I tried:
    - I restarted the BAM Server
    - I restarted the Design Studio
    - I restarted the oc4j through which I publish the messages through a topic
    Result:
    Unable to resolve path "/msg" in message field "Data" XML.
    XML:
    <msg host="192.168.52.129:18342" app="[ZInvestigationProvider#null]" cat="PROCESS" id="org.sopware.services.exampleuri.impl.CepMessage.21" lvl="INFO" text="Investigation_POSSIBILITY BPEL_ID=330024 - ID=1002, RFID=RFID002, NAME=SSN Emmersberger, StartDate=10 CurrentDate=17, expectedShippingDate=13, currentZone=-1, deliveryTimeAgreement=true" tsp="2007-12-05T22:25:36.093Z" xmlns="http://schemas.sbb.org/management/Notification/1.0" />
    [Oracle BAM Enterprise Link error code:  0x75 -- 0x1, 0x75 -- 0x68]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Unable to resolve path "/msg" in message field "Data" XML.
    XML:
    <msg host="192.168.52.129:18342" app="[ZInvestigationProvider#null]" cat="PROCESS" id="org.sopware.services.exampleuri.impl.CepMessage.21" lvl="INFO" text="Investigation_POSSIBILITY BPEL_ID=330024 - ID=1002, RFID=RFID002, NAME=SSN Emmersberger, StartDate=10 CurrentDate=17, expectedShippingDate=13, currentZone=-1, deliveryTimeAgreement=true" tsp="2007-12-05T22:25:36.093Z" xmlns="http://schemas.sbb.org/management/Notification/1.0" />
    [Oracle BAM Enterprise Link error code:  0x75 -- 0x1, 0x75 -- 0x68]
    Error while processing the data for the step 'Oracle BAM Enterprise Message Receiver'
    [Oracle BAM Enterprise Link error code:  DC -- 0x1, DC -- 0x83]
    Update of Plan "NotificationPLAN" failed.
    [Oracle BAM Enterprise Link error code:  PlanMgr -- 0x1, PlanMgr -- 0xD5]

  • Need to split the output into files

    Hi,
    I have a query regarding splitting the output into different files. Please help to resolve that.
    I have have select query query...
    SELECT INDEX_NAME FROM DBA_INDEXES WHERE TABLE_NAME=<Table Name>;
    If it returns less than 4 indexes then we have create one table and have to move those into the files.
    For example...
    File_1.sql
    ====
    index1
    index2
    index3
    If select statement returns more than 4 indexes then we have create 4 files and have to splict those indexes and has to move to those 4 files.
    For example....
    If select statement returns 13 records then...
    File_1.sql File_2.sql File_3.sql File_4.sql
    ===== ====== ======= =======
    index1 index4 index7 index10
    index2 index5 index8 index11
    index3 index6 index9 index12
    index13
    Index no need to be in order in any file and any file can I extra index in it.
    Can be ok if we have any procedure or shell script. Please help me on this?
    We are using 10.2.0.1 oracle db. Please let me know if you need any thing else?
    Thanks
    Pathan

    Are you trying to put the output from SQL reports in different files?
    Some reporting tools can do this.
    You have a couple of options to do this.
    Some reporting tools support the functinality to write to different files.
    Another way is to write a PL/SQL procedure using UTL_FILE, which can open multiple files based on your conditions and to write to them as you need to.
    An older, less elegant solution is to write nested SQL*PLUS scripts spooling to different files with the queries you need. A top level script would invoke the others, something like (untested)
    --in first script
    @subscript1
    @subscript2
    --in subscript1.sql
    spool whatever.lst
    select *
       from dual;
    ...

  • Split TempDB Data file into multiple files

    Hey , 
    I have been seeing TempDB contention in memory on our SQL server 2012 Enterprise Edition with SP2 and I need to split TempDB Data file into multiple files .
    Could someone please help me to verify the following information:
    1]
    We are on SQL server 2012 Enterprise Edition with service pack2 but as per SQL Server 2012 Enterprise Edition under CAL Licensing –We are limited to use 20 logical processors instead 40 logical processors. Our SQL is configured
    on NUMA nodes and with the limitation SQL uses only 2 NUMA nodes on live .There are 10 logical CPUs are evenly assigned to each NUMA nodes. Microsoft recommends that if SQL server configured on NUMA node and we have 2 NUMA nodes, then we may add two data files
    at a time. Please let me know should I add two TempDB data file at a time?
    2] We have TempDB Data and log files both on the same Drive of SQL server  .When I split TempDB into two Data files, I can get them on the same Drive .What your recommendation should I need to create TempDB Data files on the same drive or on separate
    disks?
    3] What would be the blackout plan for splitting the tempdb into multiple files? Please let me know if someone has a better back out plan ?
                1] Run script that create tempdb Database with a single file
    2] Reboot SQL service in order to apply change   
    Your help will be apprecited .
    Thanks ,
    Daizy

    Tom , I am seeing TempDB contention on Production server when there is a heavily load on sql server . We also experiencing the overall system slowness.Please look at Pagelatch wait statistics on our server ,Please advise .
    wait_type
    waiting_tasks_count
    wait_time_ms
    max_wait_time_ms
    signal_wait_time_ms
    PAGELATCH_UP
    2680948
    3609142
    10500
    508214
    PAGELATCH_SH
    1142213
    1338451
    8609
    324538
    PAGELATCH_NL
    0
    0
    0
    0
    PAGELATCH_KP
    0
    0
    0
    0
    PAGELATCH_EX
    44852435
    7798192
    9886
    6108374
    PAGELATCH_DT
    0
    0
    0
    0
    Thanks ,
    Daizy

  • How can I split a class into 2 files?

    I converted a C++ program to Java recently and it works fine, but I ran into a problem.
    One file is very large and I need to add more functionality. Unlike with C++ where you can just put new functions in another file, I don't see a way to do it in Java.
    I made another file, and therefore another class, but the compiler complains that it can't call a static function from non-static context. (I did not declare it static so I guess it's assuming it) But I understand why. So I made the new class "extend" the old one so "this" would exist but that doesn't work -- Is it because the new class is a subclass of the original class?
    There must be a way to do this. But I don't see what is likely obvious. HELP! And thanks.

    JavaIsBetterThanCPP wrote:
    There must be a way to do this. But I don't see what is likely obvious. HELP! And thanks.Unfortunately Java has no concept of "partial classes" like C# has. Generally, however, a class that is large enough to split up into separate files is either one class that should be modularized further into separate classes, or it already is modularized and all that code is the result of many inner classes. What some people do is promote those inner classes to top-level members in their own file, and mark them as package-private. Using a package you can basically have two classes that know everything about each other and have full access to each other.
    But personally, and until I see justification otherwise, semantics in Java being unbreakingly tied to a certain file structure and naming is the most bonehead and, frankly, non-Java thing about Java.
    There's probably a pre-processor out there that will let you split a class into multiple files and will combine them into a single source file just-in-time to pass to the compiler.

  • Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    'Cuz that's what mail merges do.  They create multiple documents based on the parent doc and all the names/addresses in your data tables.
    Perhaps if you describe exactly what you're trying to do & why you need PDF, we can point you to relevant tutorials.
    Nancy O.

  • Split download file into multiple files

    Hi all,
    I'd like to split my internal table into multiple files when downloading. The split will be determined by contents of a specific field (e.g. create a new file for every unique country, where country is a key field). The number of files to download can only be determined at runtime.
    Any ideas on how i can resolve this?
    Thanks,
    Chris.

    try this...
    *declare itab1 same as itab
    data : filename(25).
    loop at itab.
    <b>  move-corresponding itab to itab1.
      append itab1.</b>
      at end of BUKRS.
            *use GUI_DOWNLOD    FM here
       *pass itab1 every time here
       *change the filename everytime
         concatenate 'Company_' itab-bukrs into filename.
    <b>   refresh itab.</b>
      endat.
    endloop.

  • Split Single IDOC into Multiple IDOC's Based on Segment Type

    Hi Experts,
    I have a scenario IDOC to FILE ,  Split Single IDOC into Multiple IDOC's based on Segment Type
    Outbound:
    ZIdocName
    Control Record
    Data Record
    Segment 1
    Segment 2
    Segment 3
    Status Record
    I should get output like below
    Inbound:
    ZIdocName
    Control Record
    Data Record
    Segment 1
    Status Record
    ZIdocName
    Control Record
    Data Record
    Segment 2
    Status Record
    ZIdocName
    Control Record
    Data Record
    Segment 3
    Status Record
    Please suggest me step by step process to achieve this task.
    Thanks.

    Thanks a lot Harish for reply.
    I have small doubt. According to your reply , If we have N number of segments in single IDOC with same fields in all segments then for splitting Single IDOC into Multiple IDOC's based on Segment Type we need to duplicate N number of target IDOC tree structure.
    Is that possible to Split single IDOC into Multiple IDOC's based on Segment Type using only one Target IDOC structure without duplicating the Target IDOC structure tree.

  • Split a record into multiple records

    Hi,
    I have situation where i need to split a record into multiple records.
    InputData :
    value|BeginDate |EndDate
    15 |2002/10/15|2002/10/16
    13 |2002/10/13|2002/10/20
    19 |2002/10/19|2002/10/23
    10 |2002/10/10|2002/10/12
    OutPut :
    10 |2002/10/10|2002/10/12
    13 |2002/10/13|2002/10/15
    15 |2002/10/15|2002/10/16
    13 |2002/10/16|2002/10/19
    19 |2002/10/19|2002/10/23
    Thanks

    Hi ,
    As a far I understood from your example ,
    I have few questions...
    1. You have information about the patient in a 1 source table.
    2. how u are identifying for patient X u need 5 rows to be created. R u storing these informations in seprate table or how ...
    3. if you have these information in a seperate tables ..... a simple cross join in ODI should get you the expected result.....
    Or give some more information with a example ..that would be great ...
    Thanks

  • Help... Why did the dvd to ipod converter split one movie into 2 files?

    I have a 80GB Video Ipod and I'm confused on why when I ripped a dvd using the dvd to ipod converter for mac program it split the dvd into 2 files.. Is there a way I can merge the files together so it is 1 file?.. I would apprciate any help or suggestions...
    G3 Ibook.. 15, 40 and 80GB Video Ipods... G4 PowerMac   Mac OS X (10.4.2)  

    Go to their support forum and ask-you will get a better answer from people who actually use the program.
    It's not a paid for program is it?
    A totally free program that rips and converts DVD's for Macs can be found here: http://handbrake.m0k.org/
    Why would anyone on a Mac pay for a DVD rip program?

  • How to convert Oracle reports previewer output into delimited file.

    How to convert Oracle reports previewer output into delimited file if the report has more than 1000 pages.
    I tried with previewer option File --> Generate to file --> Delimited file, but the report engine is crashing.Not generating .TXT file.
    I observed that this option is not working for more than 400 pages.
    I am using Oracle reports 6i version.
    Plz suggest me to generate .TXT file from Report previewer.

    You can specify a delimiter (a character or string of characters) to separate the data (boilerplate or field objects) in your report output in either of the following ways:
    On the command line using the DELIMITER keyword.
    In the Delimited Output dialog box or DelimitedData Output dialog box (displayed with File > Generate to File > Delimited or File > Generate to File > DelimitedData) in Reports Builder.
    for further information goto this link
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_concepts2.htm#sthref760

Maybe you are looking for

  • Link sales Order with contract

    Hi, We have created a sales orders using va01,but without referencing to contract. is there any way to link these sales order to the old contracts. Pls help, Thanks

  • No themes available in iPhoto after Upgrading to 9.1.5?

    I recently upgraded my iPhoto to Version 9.1.5 which should be most recent version. When I now try to create a photo book a message pops up which says, that no themes are available. I bought my iPhoto online in the AppStore so I can´t just reinstall

  • Auto HDR for N8

    Auto HDR photography ammong the wonderful winning application idea at Make My App contest by Nokia, I would like to know where we can have this application because it is already made. In addition what about other winning applications for Nokia N8 use

  • Video_dxgk​rnl_fatal_​error for HP 15n004tx

    Hi have recently upgarded to windows 8.1, when the problem started. 1) when my system wakes up from "sleep mode", it restarts the system with the error "video_dxgkrnl_fatal_error" with blue screen. 2) I am unable to install the AMD graphics drivers p

  • Sleeping a MacPro with a connected RAID array

    I just got a 4T G-Tech GSpeed connected via an eSATA card to my MacPro set up as RAID 5. I manually sleep the computer at night and then power down the GSpeed. In the morning I power up the drive unit and then unsleep the computer. I think I'm saving