Generating multi-level xml in oracle

Hi,
I want to create a multi-level XML structure from oracle, is there a way?
Presently oracle provides DBMS_XMLQUERY and XMLGEN package to generated XML structure given a query. But the structure so generated is of single level. That is say I use
select XMLGEN.getXML('select * from employees') from dual;
the output is
<EMPLOYEE>
<ROW num="1">
<NAME>Mark</NAME>
<TEL>451-638191</TEL>
</ROW>
</EMPLOYEE>
That I call a single level output.
To create a multiple level XML I went in for object type in oracle. But the problem with this is that if I want to have multiple children for a single parent then object types fail. The structure below is not possible with object type.
<EMPLOYEE>
<ROW num="1">
<NAME>Mark</NAME>
<CONTACT>
<ROW>
<RESIDENCE>
<ADDRESS>
     <ROW>
     Fifth Avenue, New York
     </ROW>
</ADDRESS>
<TEL>
     <ROW>451-638191</ROW>
     <ROW>451-638192</ROW>
     <ROW>451-638193</ROW>
</TEL>
</RESIDENCE>
</ROW>
<ROW>
<RESIDENCE>
<ADDRESS>
     <ROW>
     Fouth Avenue, New York
     </ROW>
</ADDRESS>
<TEL>
     <ROW>452-638191</ROW>
     <ROW>452-638192</ROW>
     <ROW>452-638193</ROW>
</TEL>
</RESIDENCE>
</ROW>
</CONTACT>
</ROW>
</EMPLOYEE>
Then I tried nested tables. Here one needs to create an object type to create a table type. One cannot create a table type out of another table type. So that leavs me with 2 levels
object type
used by
table type
used by
table.
Presently to generated a multi-level output as shown above I'm using cursors and build it in a clob variable.
Is there any other way that one can build a multi-level structure. Or is there a build in package that comes with orace 8i (and higher).
Regards,
Milton.

Milton,
I was able to generate hierarchical XML from Oracle using object views and XML-SQL Utility (XSU).
Here is a simplified version of my OR schema:
/* Physical spec object */
create or replace type physical_specifications_object as object (
physical_specifications_id number(15),
page_count number(10),
product_id number(10),
four_color_count number(10),
two_color_count number(10),
table_count number(10),
binding_type varchar2(100),
height varchar2(20),
width varchar2(20)
/* Market object */
create or replace type market_object as object (
market_id number(15),
master_class_name varchar2(50),
market_name varchar2(100),
market_type varchar2(100),
market_description varchar2(500),
level_rank varchar2(15),
market_code varchar2(100),
product_id number(10)
/* List of markets */
create or replace type market_table as table of market_object;
/* Market object view */
create or replace view market_object_view of market_object
with object identifier (market_id) as
select mkt.market_id,
class.master_class_name,
mkt.market_name,
mkt.market_type,
mkt.market_description,
prod_mkt.level_rank,
mkt.market_code,
p.product_id
from market mkt,
product p,
product_market prod_mkt,
master_class class
where p.product_id = prod_mkt.product_id
and prod_mkt.market_id = mkt.market_id
and mkt.master_class_id = class.master_class_id(+);
/* Feature object */
create or replace type product_feature_object as object (
feature_id number(15),
feature_text varchar2(3500),
feature_type varchar2(100)
/* List of features */
create or replace type product_feature_table as table of product_feature_object;
/* Product object */
create or replace type product_object as object (
product_id number(10),
title varchar2(150),
media_type varchar2(20),
standard_number varchar2(100),
physical_specifications physical_specifications_object,
markets market_table,
product_features product_feature_table
/* Product object view */
create or replace view product_object_view of product_object
with object identifier (product_id) as
select p.product_id,
p.title,
p.media_type,
p.standard_number,
physical_specifications_object(spec.physical_specifications_id,
spec.page_count,
spec.product_id,
spec.four_color_count,
spec.two_color_count,
spec.table_count,
spec.binding_type,
spec.height,
spec.width),
cast(multiset(select *
from market_object_view mkt
where mkt.product_id(+) = p.product_id) as market_table) as markets,
cast(multiset(select f.feature_id, f.feature_text, f.feature_type
from feature f
where f.product_id = p.product_id) as product_feature_table) as product_features
from product p,
physical_specifications spec
where p.product_id = spec.product_id(+)
The objective is to generate XML for a product list with all the product subelements. The simple query "select * from product_object_view" when fed to the XML-SQL utility generates multi-level SQL. Note that Oracle 8i allows up to two level collection nesting in object types. Oracle 9i removes this limitation.
Check XSU documentation at http://otn.oracle.com/docs/tech/xml/xdk_java/doc_library/Production9i/doc/java/xsu/xsu_userguide.html#1014886
Hi,
I want to create a multi-level XML structure from oracle, is there a way?
Presently oracle provides DBMS_XMLQUERY and XMLGEN package to generated XML structure given a query. But the structure so generated is of single level. That is say I use
select XMLGEN.getXML('select * from employees') from dual;
the output is
<EMPLOYEE>
<ROW num="1">
<NAME>Mark</NAME>
<TEL>451-638191</TEL>
</ROW>
</EMPLOYEE>
That I call a single level output.
To create a multiple level XML I went in for object type in oracle. But the problem with this is that if I want to have multiple children for a single parent then object types fail. The structure below is not possible with object type.
<EMPLOYEE>
<ROW num="1">
<NAME>Mark</NAME>
<CONTACT>
<ROW>
<RESIDENCE>
<ADDRESS>
     <ROW>
     Fifth Avenue, New York
     </ROW>
</ADDRESS>
<TEL>
     <ROW>451-638191</ROW>
     <ROW>451-638192</ROW>
     <ROW>451-638193</ROW>
</TEL>
</RESIDENCE>
</ROW>
<ROW>
<RESIDENCE>
<ADDRESS>
     <ROW>
     Fouth Avenue, New York
     </ROW>
</ADDRESS>
<TEL>
     <ROW>452-638191</ROW>
     <ROW>452-638192</ROW>
     <ROW>452-638193</ROW>
</TEL>
</RESIDENCE>
</ROW>
</CONTACT>
</ROW>
</EMPLOYEE>
Then I tried nested tables. Here one needs to create an object type to create a table type. One cannot create a table type out of another table type. So that leavs me with 2 levels
object type
used by
table type
used by
table.
Presently to generated a multi-level output as shown above I'm using cursors and build it in a clob variable.
Is there any other way that one can build a multi-level structure. Or is there a build in package that comes with orace 8i (and higher).
Regards,
Milton.

Similar Messages

  • Generating multi-level XML in Oracle 8i using XML-SQL utility

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

    Oracle 8i has a limitation when it comes to the object types. Only one-level nesting of collection is allowed. Oracle 9i apparently removes this limitation.
    I am trying to generate XML for a hierarchical (conceptually) structure. To do that I am using XML-SQL utility (XSU) running agains an object view build on top of the relational data. The problem is the limit to onelevels of colelction nesting. Oracle 8i gives you a way to create a view with more levels of nesting by using references (REF). The problem is that when XSU runs agains a view with the references, it inserts the references into the XML document (instead of dereferencing them).
    Is there a way to generate XML with Oracle 8i with more than two levels of collection nesting?
    Thank you.
    Michael

  • Import multi-level BOM into Oracle

    We have a client requirement to create BOM based on level using Pl/Sql, Data will be coming in the below format:-
    Item Description      BOM LEVEL
    a               *1*     
    aa               *2*     
    aaa               *3*     
    aab               *3*     
    aaba               *4*     
    aabb               *4*     
    ab               *2*     
    aba               *3*     
    abb               *3*     
    we want the above data in table to be inserted in below format:
    Assembly Item     Component Item
    a               Aa
    Aa               Aaa
    Aa               Aab
    Aa               Aac
    A               Ab
    Ab               Aba
    Ab               Abb
    Aab               aaba
    Please suggest.
    Thanks,
    Urvashi Arora
    Edited by: user10992307 on 08-May-2012 23:07

    When you look at one row in your source data, there is no way to tell what is the parent item for the component you are looking at.
    So you will have to write a program that walks thru the data and builds parent=child relationship. It will be a tricky program but once that is done, all you have to do is to insert into bom interface tables and Oracle will take care of the rest.
    Oracle BOM interface will take care of building a multi-level structure.
    Sandeep Gandhi

  • Reading XML from Oracle directory to generate charts

    Hi,
    I have a requirement create graphs, charts and maps based on data from a data warehouse (dw).  As I see things, there are two possibilities:
    Graphs, charts and maps based on an XML file
    Graphs, charts and maps based on Oracle tables
    Both would contain small data sets that will allow for quick response.  The intent of these graphs, charts and maps is to generate a dashboard that would allow the user to quickly drill down to the desired warehouse data.
    The proof of concept has already been validated using the Oracle table scenario.  My question is whether or not this could be accomplished reading xml files for generating the same set of dashboard items?
    My Oracle database and APEX environments configuration are as follows:
    NLSRTL                 11.2.0.1.0                                                           Production
    Oracle Database 11g Enterprise Edition 11.2.0.1.0                         64bit Production
    PL/SQL 11.2.0.1.0                                                                            Production
    TNS for Solaris: 11.2.0.1.0                                                               Production
    Application Express 4.2.2.00.11
    APEX Listener Release 2.0.2.  / Tomcat
    An Oracle database directory has been setup and is accessible to our APEX application.
    Any suggestions/help is appreciated.
    Thanks,
    Charles

    An Oracle Directory has an underlying OS directory associated with it, Oracle just overlays it's control structure onto an existing folder in the OS. You can manipulate the files with stored procedures in Oracle or at the OS level from outside of Oracle.
    If you manipulate the files from the OS level, outside of Oracle, you may need a refresh of the Oracle Directory structure.

  • Multi-level nested tables for repeatable XML Elements

    Hi there,
    Suppose we have a XML Schema „ASchema“ like this (XMLDB schema annotations are left out for simplicity):
    <xs:schema xmlns:xs=" .... " />
    <xs:element name=“A“>
         <xs:complexType>
              <xs:sequence>
                   <xs:element name=“B“ maxOccurs=“unbounded“/>
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name = “C“ maxOccurs=“unbounded“/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    </xs:schema>
    After registering this schema in Oracle, I can define a table like this:
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    This creates a nested table "BTable" within the table "ATable". So far so good, I can use this nested table to gain faster access on every possible subelement of Element B when I set an appropriate index.
    I now want to create another nested table for element “C“ like this:
    DROP TABLE ATable;
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    VARARRAY doc.“XMLDATA“.“B“.“C“ STORE AS TABLE “CTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    But this statement fails with the error message something like „ ... no such attribute ... „
    And here's my question: is it possible to create nested tables for repeatable XML Elements that are subelements of other repeatable XML Elements ? And if so, how can I do it ?
    Thank you very much in advance
    Jan

    Found a (partial) solution myself:
    If you add the attribute xdb:storeVarrayAsTable="true" to the root element of the XML schema, Oracle XMLDB generates nested tables for all repeatable XML Elements while registering the XML schema.
    Unfortunately, the names of these nested tables are system-generated, hence it's a bit uncomfortable to set indices on them. You can find out the names of these nested tables as follows:
    select table_name, parent_table_name, parent_table_column from user_nested_tables;
    Further information on that subject is supplied in the following thread:
    Re: default tables for elements with maxoccurs > 1
    It would be nice if there was a way to name the generated nested tables via appropriate XMLDB schema annotations.
    regards
    Jan

  • Multi-Org impact on Oracle CRM modules especially on Oracle Service

    Multi-Org impact on Oracle CRM modules especially on Oracle Service
    ====================================================
    I have been searching for any information (notes,whitepapers/ presentation) on the impact of multi org implementation on Oracle Service module and so far not been able to find any either on metalink or on internet.
    Any of you have any inputs on this ? Please provide the same if any.
    basically,
    Looking for the kind of security applied on SR creation form,Debrief form and charges form when a multi org is enabled.
    I also tried to test this out in our instance and found that it seems to have no impact.
    Gana

    HI,
    Yes indeed there is a impact of MULTI-ORG on the Service Module in 11i.
    All the things are integrated now.
    Everything is dependent on the MO:Operating Unit Profile Option and the setup which you had done.
    1)
    Security on SR creation Form:-
    See you can implement the security, but for that you have to setup accordinglly and also to follow the process.
    If you create 2 responsibilities with MO profile option different, then none of them will able to see the others data.
    Note:-
    But if you are using the instance to generate the SR, then you had to make it sure that the ITEM which you are using should be assigned to the Operating unit which is set in the MO profile Options of that responsibility.
    2)
    Debrief Form:-
    As you must know that for debrief to work, you had to setup the Service Activities.
    This is where you can define the security.
    1) Create a Service activity,
    2) Map it with BILLING TYPES
    3) Map the Billing Types with Order Management Header and the Line Type
    This the place where you can specify the Operating Unit.
    When a user will log in and open a debrief form, then he will be able to see only those service activities which are mapped with the operating unit as that of set in MO Profile Option to the user.
    3)
    Charges:-
    The same as the debrief is applied on the charges TAB.
    Here you will only able to see the Service activites which are mapped with the operating unit as that of set in MO operating unit.
    If you want ITEM level security, then you will be only able to see the items which are assigned to the Operating unit as that of set in the MO profile option.
    Hope this will clear your doubt.
    If want more clarification, you can ask me.
    Regds,
    Vikram

  • Bursting ERROR: java.util.NoSuchElementException in 1 level XML (i.e. FSG)

    Hello,
    We are encountering error with 1-level XML(non-RDF reports - i.e. FSG) on bursting. It is happening when the bursting control file ("select" attribute under "request" element) only has 1 level of distribution XML(i.e. /MasterReport).
    I have found similar issue in this forum but got no definite solution - Re: Bursting Fails with java.util.NoSuchElementException after 5.6.3 upgrade
    Start bursting process..
    [032309_032311003][][EXCEPTION] java.util.NoSuchElementException
         at java.util.Vector.lastElement(Vector.java:449)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.removeEndPath(BurstingProcessorEngine.java:1999)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.globalDataEndElement(BurstingProcessorEngine.java:1944)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(BurstingProcessorEngine.java:1124)
         at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingRequest(BurstingProcessorEngine.java:2153)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingEndElement(BurstingProcessorEngine.java:1802)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(BurstingProcessorEngine.java:1127)
         at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:227)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingConfigParser(BurstingProcessorEngine.java:959)
         at oracle.apps.xdo.batch.BurstingProcessorEngine.process(BurstingProcessorEngine.java:903)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:269)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Thanks in advance for your help.
    regards,
    Rownald

    Hi Ike,
    Thanks for your reply.
    Although I already went thru a different path on bursting FSG(Financial Statement Generator) reports (creating Java program to fetch/send email - Delivery Manager), I am still very interested in the idea of bursting FSG using the seeded bursting program(XDOBURSTREP) - which I still cannot figure out.
    Anyway, I am stuck having a data definition from FSG with only 1-level to burst on (see in bold below). This kind of XML data is causing the previous error that I've posted above.
    Trying to add another level (i.e. /MasterReport/fsg:SOBName/) won't work either - namespace being not supported by Oracle??
    <?xml version="1.0" encoding="utf-8"?>
    <*MasterReport* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:fsg="http://www.oracle.com/fsg/2002-03-20/"
    xsi:schemaLocation="http://www.oracle.com/2002-03-20/fsg.xsd">
    <fsg:SOBName>COMPANY NAME</fsg:SOBName>
    Any idea would be highly appreciated.
    Thanks!

  • A better way to generate the needed XML?

    I am working on a 10.2 system and looking to see if there is a better way to generate the resulting XML than what I have come up with. Here is a test case and the output it generates. I don't really like querying the table for each column needed as the real table has eight columns I am pulling. I would like to make one pass on person_h and get the info needed instead of making eight passes, but not sure if it is possible.
    with person_h as
       (select 1 id, 'M' gender, 'W' race, '170' weight from dual union all
        select 1, 'M', 'W', '170' from dual union all
        select 1, 'M', 'W', '180' from dual union all
        select 1, 'M', NULL, '175' from dual union all
        select 1, NULL, 'W', NULL from dual
    select xmlelement("Person",
             (select xmlagg(xmlelement("Sex", gender))
                from (select distinct gender
                        from person_h
                       where id = 1
                         and gender is not null) pg),
             (select xmlagg(xmlforest(race as "Race"))
                from (select distinct race
                        from person_h
                       where id = 1) pg),
             (select xmlagg(xmlforest(weight as "Weight"))
                from (select distinct weight
                        from person_h
                       where id = 1) pg)
           ).getstringval()
      from dual;
    Output
    <Person>
      <Sex>M</Sex>
      <Race>W</Race>
      <Weight>170</Weight>
      <Weight>175</Weight>
      <Weight>180</Weight>
    </Person>Note: Previously posted on the XML DB forum at A better way to generate the needed XML? but still looking for other solutions so putting in front of more eyes here. I have considered using a WITH statement to do the initial query on person_h but haven't tested that yet to see what Oracle really will do as just getting back around to this lower priority task of mine.

    I'm using the WITH statement to simulate a table and DUAL/UNION ALL to create data in that "table". I've seen it used plenty of times in this forum so not sure why a problem for this example. The actual SQL/XML statement hits that "base table" three times, so I didn't include all eight columns because three columns is sufficient to show the problem in the way I coded the SQL. Following the SQL is the sample OUTPUT that SQL statement generates and that is the output I created and need. I'm just looking for other options to achieve the listed output.

  • New to XML and Oracle

    Just trying to clarify some issues as I try and learn about XML, and specifically how it integrates into the DB.
    1 - Is there a way with Oracle tools for me to get an XSD of an existing 9i relational schema? We are not currently using the XML DB, but our middleware developers would like to have an up to date XSD to use for their internal mapping.
    2 - Is there any way that I can keep that XSD up-to-date automatically, so I get a new one whenever the schema gets updated?
    3 - If I wanted to investigate storing XML docs within the DB in native XML format, I need to have an XML DB, correct? Is this DB construct maintained seperatelly from my "normal" relational schema? or are they kept in sync by Oracle?
    I know these may all be real basic questions, but as I said, I'm new to XML and Oracle. I am reading as much as I can, but there are a lot of docs out there.
    Thanks,
    Mike

    Hi
    1. On my opinion such a tool doesn't exists. Some parts can be implemented elsewhere, but not as described by you... e.g. with XSU if you specify the parameter "withschema" the XSD of the executed statement is generated. Another example is to use DBMS_METADATA to dump the data dictionary in XML (but not XSD, of course you could write your own XSLT to do this transformation...).
    2. -
    3. If you use XSD-based tables the XSD and the relational model are stored separately in the data dictionary. Therefore if you change the XSD you have to drop/create the XSD-based table... no schema evolution yet.
    Chris

  • How to create a multi-level configuration sales order?

    Hi,
        My client use configurable material to sell computers. And the production mode is MTO. One sales order item correspond with a production order
        Now my client also sell array which consist of two computers, two storage, one UPS power etc. That means I must realize multi-level configuration. First, choose the computer type. Second, based on the choosed computer in first step, choose the cpu, disk and so on. And then based on the sales order item, there must be several production order related to the same sales order item.
        Now I have semi-finished product B1,B2--computer. Class type is 300. Many characteristics is allocated to the class. B type material has the BOM which consist of cpu,disk etc.
        Then I created the finished product A--array. Class type is 300. Allocated characteristics is the B1,B2. A has the BOM which consist of B1,B2 etc.
        When I create sales order, I can only config the first level,choose computers for A, can not choose cpu,disk for computers.
        So, how can I find a solution for this scenario?
        Thanks in advance.

    Thanks, Waza
    1.  Does the Sales order BOM explode in the sales order?
    No. Just one top item would be ok for my client.
    2. Why do thy want this in the sales order?  They can explode the BOM in the production order, do they then need pricing at the component level?
    They do not need pricing at the component level. Exploding the BOM in the production order is acceptable. But how can I config the configurable material in components of production order?
    I tried collective order, but the second level of configurable material can not generate production order. I just make use of special procurement 52 in MRP2 of top finished product. Is there something I missed?
    Thanks again.

  • XML Publisher question - Not generating a valid XML file

    I am working through an Oracle document that walks you through creating an XML Pub report. I am using HCM 8.9, Tools 8.49.15 and it has XML Pub installed and I have the Microsoft plug-in installed
    I have created a query and have downloaded an rtf template and now am on a page where you enter your data source and then click ‘Generate’ for the sample data file. I did it and it created ‘PERSONAL_DATA_PAY.XML’ which is created from a PS Query. However if I click on ‘PERSONAL_DATA_PAY.XML’ it generates a blocky text file that is not an XML file and I can’t go any further.
    Do you know why it’s not generating a valid XML file when I click on 'generate'?
    Thanks
    Allen H. Cunningham
    Data Base Administrator - Oracle/PeopleSoft
    Sonoma State University

    You mean to say that you create a new data source by specifying Data Source Type as 'PS Query' and Data Source ID as your query name, you are not able to generate a valid XML file (by clicking on Generate link).
    did you cross check your query by running it?
    On field change of Generate link, PeopleSoft uses PSXP_RPTDEFNMANAGER and PSXP_XMLGEN app packagaes and query objects to create the file
    It should work if you query is valid..

  • Need to generate a Index xml file for corresponding Report PDF file.

    Need to generate a Index xml file for corresponding Report PDF file.
    Currently in fusion we are generating a pdf file using given Rtf template and dataModal source through Ess BIPJobType.xml .
    This is generating pdf successfully.
    As per requirement from Oracle GSI team, they need index xml file of corresponding generated pdf file for their own business scenario.
    Please see the following attached sample file .
    PDf file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/BPA_Print_Trx-_output.pdf
    Index file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/o39861053.out.idx.txt
    In R12 ,
         We are doing this through java API call to FOProcessor and build the pdf. Here is sample snapshot :
         xmlStream = PrintInvoiceThread.generateXML(pCpContext, logFile, outFile, dbCon, list, aLog, debugFlag);
         OADocumentProcessor docProc = new OADocumentProcessor(xmlStream, tmpDir);
         docProc.process();
         PrintInvoiceThread :
              out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
                   out.print("<xapi:requestset ");
                   out.println("<xapi:filesystem output=\"" + outFile.getFileName() + "\"/>");
                   out.println("<xapi:indexfile output=\"" + outFile.getFileName() + ".idx\">");
                   out.println(" <totalpages>${VAR_TOTAL_PAGES}</totalpages>");
                   out.println(" <totaldocuments>${VAR_TOTAL_DOCS}</totaldocuments>");
                   out.println("</xapi:indexfile>");
                   out.println("<xapi:document output-type=\"pdf\">");
    out.println("<xapi:customcontents>");
    XMLDocument idxDoc = new XMLDocument();
    idxDoc.setEncoding("UTF-8");
    ((XMLElement)(generator.buildIndexItems(idxDoc, am, row)).getDocumentElement()).print(out);
    idxDoc = null;
    out.println("</xapi:customcontents>");
         In r12 we have a privilege to use page number variable through oracle.apps.xdo.batch.ControlFile
              public static final String VAR_BEGIN_PAGE = "${VAR_BEGIN_PAGE}";
              public static final String VAR_END_PAGE = "${VAR_END_PAGE}";
              public static final String VAR_TOTAL_DOCS = "${VAR_TOTAL_DOCS}";
              public static final String VAR_TOTAL_PAGES = "${VAR_TOTAL_PAGES}";
    Is there any similar java library which do the same thing in fusion .
    Note: I checked in the BIP doc http://docs.oracle.com/cd/E21764_01/bi.1111/e18863/javaapis.htm#CIHHDDEH
              Section 7.11.3.2 Invoking Processors with InputStream .
    But this is not helping much to me. Is there any other document/view-let which covers these thing .
    Appreciate any help/suggestions.
    -anjani prasad
    I have attached these java file in kixs : https://kix.oraclecorp.com/KIX/display.php?labelId=3755&articleId=354962
    PrintInvoiceThread
    InvoiceXmlBuilder
    Control.java

    You can find the steps here.
    http://weblogic-wonders.com/weblogic/2009/11/29/plan-xml-usage-for-message-driven-bean/
    http://weblogic-wonders.com/weblogic/2009/12/16/invalidation-interval-secs/

  • Generate a File XML in Forms with PL/SQL

    Hi Friends!
    I need to generate a file XML and validate it with a XSD schema!
    I see some ways to generate a file with a QUERY.
    But i cant generate a file with a Query because my datas existing in diferent tables and isn't possible to create in a query! I need to construct the XML step by step... creating the nodes and subnodes... setting values to the nodes and so on!
    I see a class java called by Marshall and i created a bean to generate XML but it is so slow even in a powered server!
    How can i do this in PL/SQL?????
    Somebody can help me!!

    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_xmldom.htm#sthref10098
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb10pls.htm#sthref1389
    Regards.

  • How to create multi level reports?

    The report I have created contains 25 columns and is to wide. I would like to create a multi level report in the fashion of below:
    Col 1 Col 2 Col 3
    Row1 Row1 Row1
    Row2 Row2 Row2
    Col 5 Col 6 Col 7
    Row1 Row1 Row1
    Row2 Row2 Row2
    I am assuming this needs to be done by modifying html in a template.
    I have cut up a normal report to try and illistrate what I am thinking.
    http://i71.photobucket.com/albums/i124/breinhar/multirow.jpg
    I greatly appreciate the help. Thanks.

    Hi,
    OK - I've put together a horizontal scrolling report template for a Theme 12/Standard report: [http://apex.oracle.com/pls/otn/f?p=33642:198]
    To create this, you need to:
    1 - Through Shared Components, Templates - create a new Report Template based on a copy of the existing Standard report template.
    2 - When you have your new template, edit it.
    3 - In the template's "Before Rows" setting, replace what's there with the following:
    &lt;style type="text/css"&gt;
    #table1 th {white-space: nowrap}
    #table1 td {white-space: nowrap}
    #table2 th {white-space: nowrap}
    #table2 td {white-space: nowrap}
    &lt;/style&gt;
    &lt;table cellpadding="0" cellspacing="0" summary="" style="padding:0px; border-collapse:collapse;"&gt;#TOP_PAGINATION#
    &lt;tr&gt;&lt;td&gt;
      &lt;tr&gt;
        &lt;td style="vertical-align:top; background-color:#EFEFEF; padding:0px; border:1px solid darkgray;"&gt;
          &lt;div id="d1" style="background-color:white; margin:0px; border:0px; padding:0px;"&gt;
          &lt;/div&gt;
        &lt;/td&gt;
        &lt;td style="vertical-align:top; padding:0px; border:1px solid darkgray;"&gt;
          &lt;div id="d2" style="overflow-X:scroll; margin:0px; border:0px; padding:0px; border-right:1px solid darkgray;"&gt;
    &lt;table cellpadding="0" border="0" cellspacing="0" summary="" class="t12Standard" id="table2"&gt;4 - In the template's "After Rows" setting, replace what's there with the following:
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;div class="t12bottom"&gt;#EXTERNAL_LINK##CSV_LINK#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;#PAGINATION#&lt;/table&gt;
    &lt;script type="text/javascript"&gt;
    var d1 = document.getElementById("d1");
    var t2 = document.getElementById("table2");
    var t1 = t2.cloneNode(false);
    t1.style.width = "100%";
    t1.id = "table1";
    d1.appendChild(t1);
    var t2Rows = t2.rows;
    var k;
    var r;
    var c;
    for (k = 0; k &lt; t2Rows.length; k++)
    r = document.createElement("TR");
    t1.appendChild(r);
    c = t2Rows[k].cells[0].cloneNode(true);
    r.appendChild(c);
    t2Rows[k].deleteCell(0);
    d1.innerHTML += "";
    &lt;/script&gt;5 - On your report's Report Attributes, change the template used for the report from "Standard" to your new one
    6 - Also on the report's Report Attributes, set "Enable Partial Page Refresh" to No - this is required as we need the javascript in the template to be run whenever pagination happens and Partial Page Refresh does not seem to allow us the means to trigger javascript
    7 - Finally, on the report region's Region Footer, add in:
    &lt;style type="text/css"&gt;
    #d1 {width:75px;}
    #d2 {width:500px;}
    &lt;/style&gt;#d1 refers to the width of the frozen column and #d2 is the width of the rest of the report - you can adjust these figures as required.
    The template contains two DIV tags - d1 and d2. Initially, d1 is empty and d2 contains the report. The javascript moves the first cell in each row from d2 to d1. The styles then add the scrolling functionality.
    Andy

  • CIF error-Multi-level error propagation carried out

    Dear ALL,
        When i am trying activate the integration model for Material transfer it generates queue with status SYSFAIL with message "Multi-level error propagation carried out".
    and the integration model is not activated.
      please help
    regards
    Kiran

    Dear Arek,
          The problem is not yet resolved . we have raised an OSS note for the same.
    as the relevant notes are already implemented in our case.
    regards
    Kiran

Maybe you are looking for