Usage of ORDER BY in XML

I am using a simple table to store records.
I am using sys_xmlgen, xmlforest and xmlagg functions to generate an XML. While the the records re retrived and XML is formed the sequence of the records is not as desired.
for eg: i have got 6 rows in a simple table. When a select query is written with the xml functions the xml is generated but record no 4 always occurs at the end of the xml generated. This is a consistent behaviour and occurs irrespective of all above. I have tried using order by rowid also but the problem persists.
Is there any way to retrive the XML in the order the rows were inserted in the table?

Hi,
I have pasted the query which uses the xmlagg and other xml functions in order to generate an XML from a table.
The data inserted in the table is also pasted and the generated XML output. I have tried using order by in the query (in sub-queries also) but was not successful in doing so. Could you please have a look and let me know that where shall i place the order by clause in order to get the proper XML.
The error in the XML that is generated is jumbled up and not in accordance as the rows were inserted. How do i order them and generate the XML?
CREATE TABLE ARS_EMPLOYEE
EMPID VARCHAR2(10 BYTE),
DOJ VARCHAR2(12 BYTE),
TRAINING_TYPE VARCHAR2(10 BYTE),
TRAINING_CODE VARCHAR2(10 BYTE),
TCODE VARCHAR2(10 BYTE),
DEV_PHASE VARCHAR2(30 BYTE),
DEV_TIME VARCHAR2(10 BYTE),
DT_CODE VARCHAR2(10 BYTE)
INSERT INTO ARS_EMPLOYEE A (
A.EMPID,
                              A.DOJ,
                              A.TRAINING_TYPE,
                              A.TRAINING_CODE,
                              A.TCODE,
                              A.DEV_PHASE,
                              A.DEV_TIME,
                              A.DT_CODE
                              VALUES (
                              '1',
                              '12-MAY-1985',
                              'WBT',
                              '1',
                              'GEN',
                              'RA',
                              '11',
                              'GEN'
CREATE TABLE ARS_EMPLOYEE_XML
ID NUMBER(10),
MESSAGE CLOB,
T_TIME VARCHAR2(30)
DECLARE
l_clob CLOB;
BEGIN
SELECT sys_xmlgen(
sys_xmlgen(xmlelement("COMPANY_MAIN"
,xmlelement("COMPANY"
,xmlelement("EmployeeId",a.EMPID)
,xmlelement("DOJ"
,xmlelement("DateOfJoining",(SELECT DISTINCT TO_CHAR(TO_DATE(AAA.DOJ,'DD-MON-YYYY'),'yyyy-mm-dd') FROM ARS_EMPLOYEE AAA WHERE EMPID = '1' AND DOJ = '12-MAY-1985'))
,xmlagg((SELECT
xmlagg(xmlelement("Training_TypeItem"
,xmlforest(b.TRAINING_TYPE AS "Training_Type")
,xmlelement("Training_TypeBal"
,xmlelement("Training_TypeAmt"
,xmlforest(b.TRAINING_CODE AS "TrainingCode",b.TCODE AS "TCode" ))
,(SELECT
xmlagg(xmlelement("DevlopmentPhaseTotal"
,xmlforest(e.DEV_PHASE AS "DevlopmentPhase")
,xmlelement("TotalCurAmt"
,xmlforest(e.DEV_TIME AS "TimeDevPhase",e.DT_CODE AS "TimeDevCode"))
                                                                                                                                                 )--xmlagg3
FROM ARS_EMPLOYEE e
WHERE e.EMPID = b.EMPID
AND e.DOJ = b.DOJ
AND e.TRAINING_TYPE = b.TRAINING_TYPE
AND e.TRAINING_CODE = b.TRAINING_CODE
AND e.TCODE = b.TCODE
                                                                                                                                       GROUP BY e.EMPID,e.DOJ,e.TRAINING_TYPE,e.TRAINING_CODE,e.TCODE                                                                                                                                                                          
                                                                                                                                       )--select2
)--xmlagg2
FROM (SELECT DISTINCT
c.EMPID
, c.DOJ
, c.TRAINING_TYPE
, c.TRAINING_CODE
, c.TCODE
FROM ARS_EMPLOYEE c
                                                                                          --ORDER BY c.ID DESC
                                                                                          ) b
WHERE b.EMPID = a.EMPID
AND b.DOJ = a.DOJ
AND b.TRAINING_TYPE = a.TRAINING_TYPE
                                                                                GROUP BY b.EMPID,b.DOJ,b.TRAINING_TYPE
) -- doj
)--Company
,xmlformat.createformat('COMPANY'))
,xmlformat.createformat('COMPANY_MAIN')).getClobval()
INTO l_clob
FROM (SELECT DISTINCT d.EMPID,d.DOJ,d.TRAINING_TYPE FROM ARS_EMPLOYEE d)a
WHERE EMPID = '1'
AND DOJ = '12-MAY-1985'
GROUP BY EMPID,DOJ
INSERT INTO Ars_Employee_XML VALUES (1,l_clob,(SELECT TO_CHAR(SYSDATE,'yyyy-mm-dd') FROM dual));
END;
EMPID     DOJ     TRAINING_TYPE     TRAINING_CODE     TCODE     DEV_PHASE     DEV_TIME     DT_CODE
1     12-MAY-1985     WBT     1     GEN     RA     11     GEN
1     12-MAY-1985     WBT     1     GEN     IA     22     GEN
1     12-MAY-1985     WBT     1     GEN     FS     33     GEN
1     12-MAY-1985     WBT     1     GEN     TS     44     GEN
1     12-MAY-1985     WBT     1     GEN     UTP     55     GEN
1     12-MAY-1985     WBT     1     GEN     CODING     66     GEN
1     12-MAY-1985     WBT     2     GEN     RA     21     GEN
1     12-MAY-1985     WBT     2     GEN     IA     22     GEN
1     12-MAY-1985     WBT     2     GEN     FS     23     GEN
1     12-MAY-1985     WBT     2     GEN     TS     24     GEN
1     12-MAY-1985     WBT     2     GEN     UTP     25     GEN
1     12-MAY-1985     WBT     2     GEN     CODING     26     GEN
1     12-MAY-1985     WBT     3     GEN     RA     31     GEN
1     12-MAY-1985     WBT     3     GEN     IA     32     GEN
1     12-MAY-1985     WBT     3     GEN     FS     33     GEN
1     12-MAY-1985     WBT     3     GEN     TS     34     GEN
1     12-MAY-1985     WBT     3     GEN     UTP     35     GEN
1     12-MAY-1985     WBT     3     GEN     CODING     36     GEN
1     12-MAY-1985     WBT     4     GEN     RA     41     GEN
1     12-MAY-1985     WBT     4     GEN     IA     42     GEN
1     12-MAY-1985     WBT     4     GEN     FS     43     GEN
1     12-MAY-1985     WBT     4     GEN     TS     44     GEN
1     12-MAY-1985     WBT     4     GEN     UTP     45     GEN
1     12-MAY-1985     WBT     4     GEN     CODING     46     GEN
1     12-MAY-1985     WBT     5     GEN     RA     51     GEN
1     12-MAY-1985     WBT     5     GEN     IA     52     GEN
1     12-MAY-1985     WBT     5     GEN     FS     53     GEN
1     12-MAY-1985     WBT     5     GEN     TS     54     GEN
1     12-MAY-1985     WBT     5     GEN     UTP     55     GEN
1     12-MAY-1985     WBT     5     GEN     CODING     56     GEN
1     12-MAY-1985     WBT     6     GEN     RA     61     GEN
1     12-MAY-1985     WBT     6     GEN     IA     62     GEN
1     12-MAY-1985     WBT     6     GEN     FS     63     GEN
1     12-MAY-1985     WBT     6     GEN     TS     64     GEN
1     12-MAY-1985     WBT     6     GEN     UTP     65     GEN
1     12-MAY-1985     WBT     6     GEN     CODING     66     GEN
<?xml version="1.0"?>
<COMPANY_MAIN>
<COMPANY>
<COMPANY_MAIN>
<COMPANY>
<EmployeeId>1</EmployeeId>
<DOJ>
<DateOfJoining>1985-05-12</DateOfJoining>
<Training_TypeItem>
<Training_Type>WBT</Training_Type>
<Training_TypeBal>
<Training_TypeAmt>
<TrainingCode>1</TrainingCode>
<TCode>GEN</TCode>
</Training_TypeAmt>
<DevlopmentPhaseTotal>
<DevlopmentPhase>RA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>11</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>IA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>22</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>FS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>33</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>UTP</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>55</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>CODING</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>66</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>TS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>44</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
</Training_TypeBal>
</Training_TypeItem>
<Training_TypeItem>
<Training_Type>WBT</Training_Type>
<Training_TypeBal>
<Training_TypeAmt>
<TrainingCode>2</TrainingCode>
<TCode>GEN</TCode>
</Training_TypeAmt>
<DevlopmentPhaseTotal>
<DevlopmentPhase>RA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>21</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>IA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>22</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>FS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>23</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>UTP</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>25</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>CODING</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>26</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>TS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>24</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
</Training_TypeBal>
</Training_TypeItem>
<Training_TypeItem>
<Training_Type>WBT</Training_Type>
<Training_TypeBal>
<Training_TypeAmt>
<TrainingCode>3</TrainingCode>
<TCode>GEN</TCode>
</Training_TypeAmt>
<DevlopmentPhaseTotal>
<DevlopmentPhase>RA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>31</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>IA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>32</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>FS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>33</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>UTP</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>35</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>CODING</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>36</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>TS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>34</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
</Training_TypeBal>
</Training_TypeItem>
<Training_TypeItem>
<Training_Type>WBT</Training_Type>
<Training_TypeBal>
<Training_TypeAmt>
<TrainingCode>5</TrainingCode>
<TCode>GEN</TCode>
</Training_TypeAmt>
<DevlopmentPhaseTotal>
<DevlopmentPhase>RA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>51</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>IA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>52</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>FS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>53</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>UTP</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>55</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>CODING</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>56</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>TS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>54</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
</Training_TypeBal>
</Training_TypeItem>
<Training_TypeItem>
<Training_Type>WBT</Training_Type>
<Training_TypeBal>
<Training_TypeAmt>
<TrainingCode>6</TrainingCode>
<TCode>GEN</TCode>
</Training_TypeAmt>
<DevlopmentPhaseTotal>
<DevlopmentPhase>RA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>61</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>IA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>62</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>FS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>63</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>UTP</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>65</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>CODING</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>66</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>TS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>64</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
</Training_TypeBal>
</Training_TypeItem>
<Training_TypeItem>
<Training_Type>WBT</Training_Type>
<Training_TypeBal>
<Training_TypeAmt>
<TrainingCode>4</TrainingCode>
<TCode>GEN</TCode>
</Training_TypeAmt>
<DevlopmentPhaseTotal>
<DevlopmentPhase>RA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>41</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>IA</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>42</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>FS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>43</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>UTP</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>45</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>CODING</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>46</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
<DevlopmentPhaseTotal>
<DevlopmentPhase>TS</DevlopmentPhase>
<TotalCurAmt>
<TimeDevPhase>44</TimeDevPhase>
<TimeDevCode>GEN</TimeDevCode>
</TotalCurAmt>
</DevlopmentPhaseTotal>
</Training_TypeBal>
</Training_TypeItem>
</DOJ>
</COMPANY>
</COMPANY_MAIN>
</COMPANY>
</COMPANY_MAIN>

Similar Messages

  • Howto transform a Sales Order (idoc) into xml file and download it?

    I need to tranform a Sales order into an xml file such that I could download the file onto my disk. I try to transform an IDOC.
    I do the following from an example and I get an xml document on screen but I do get get any file downloaded:
    DATA: document TYPE REF TO if_ixml_document.
      document = g_ixml->create_document( ).
      DATA: ostream TYPE REF TO if_ixml_ostream.
    ostream = g_stream_factory->create_ostream_uri(
      system_id = 'file://C:\test.xml' ).
      DATA: renderer TYPE REF TO if_ixml_renderer, rc TYPE i.
    renderer = g_ixml->create_renderer( ostream  = ostream
                                          document = document ).
      rc = renderer->render( ).
      document->render( ostream = ostream  recursive = ' ').
    Is there something else I should do? Is there another approach for transforming a sales order to an xml file.
    The R/3 4.6 system is used.
    Thank you
    -eglese-

    Hi Eglese,
    Another option could be to use XML port configured for the IDOC and use the XML files generated be extracted from Web Dynpro using a file download UI element.
    Thanks and Regards,
    Sam Mathew

  • Is XML adapter should be installed in BODS server in order to access XML files?

    Hi All,
    I have doubts while working withe XML/XSD files.
    1.Is XML adapter should be installed in BODS server in order to access XML files?
    2.What is startup_script.xml that we need to set up in Admin side.
    Thanks,
    Deepthi

    Hi Shiva,
    Thanks for reply. With out XML adapter I am able to load .xml file throght BODS using template XML. But I am notable to view the file properly like it is not showing schema.
    I doubt I need to check with XML source using BODS.But I have few doubts.
    1. XSD in local mechine and XML in Remote server (FTP).- In this case I am able to read the stucture of XSD.
    2. XSD and XML in FTP server-- In this case I am unable read the XSD structure from FTP server
    Please suggest how access XSD and XML in the job with out error.
    Thanks,
    Deepa

  • Problem in creatinga sales order idoc into XML file in the same appl server

    Hai....friends....
    I am tring to send an  sales order as iDOC  to a xml port in the same application server....
    1. have created a xml port with path..\usr\sap\RRM\SYS\global\.
    2. assigned it to logical system.
    3.Have a RFC destination of TCP/ip(LOCAL_EXEC)
    but in bd64 after creating  model view when i am generating partner profiles  a tRFC PORT has been automatically created.
    then finally the IDOc has been created but its saying....IDOC CANNOT OR SHOULD NOT BE SENT...
    Pls help me regarding this...
    thx,
    ram

    Hi Thanks for your updates,
    But I got the same error, while pass the data from abap into XML.
    error message,what I am getting is
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/tempcustomers.xml'. Line 1, Position 1
    #<?xml version="1.0" encoding="utf-16"?>
    Thanks
    Gowrishankar

  • Converting sales order into a XML file

    Hai....friends....
    I am tring to send an sales order as iDOC to a xml port in the same application server....
    1. have created a xml port with path..\usr\sap\RRM\SYS\global\.
    2. assigned it to logical system.
    3.Have a RFC destination of TCP/ip(LOCAL_EXEC)
    but in bd64 after creating model view when i am generating partner profiles a tRFC PORT has been automatically created.
    then finally the IDOc has been created but its saying....IDOC CANNOT OR SHOULD NOT BE SENT...
    Pls help me regarding this...
    thx,
    simraan.

    Hello Simaraan,
    Do you still have this problem?
    Have you used the port your xml in WE20 (partner profile)?
    If you still face problem send me the detailed error.
    Thanks,
    Suma

  • Why is the thumbnail images placed in different order than the xml?

    Hi all!
    This same code I have asked about before, and got excelent help, but this is a different problem so I just start a new thread.
    This is a code that open a XML file, containing a small list of images, and place them as thumbs on the page.
    It kinda work now, but the funny thing is, the order of the thumbs is totally scrambled compared to the xml list, and I can't just see why!
    It has something to do whith when the loaders gets transfered via addEventListener to the placePics function, more than that I cant find out!
    There may be the better way to put up this code. I just feel putting it up in two nested addEventListeners like this is not the best of practice. But I see no other way here...
    package {
         import flash.display.*;
          import flash.events.*;
          import flash.net.*;
          public class thumbHolder extends MovieClip {
                var xmlRequest:URLRequest;
                var xmlLoader:URLLoader;
                var imgData:XML;
                var numberOfChildren:Number;
                var currentImgNum:Number;
                var imgLoader:Loader;
                var imgContainer:Array = [];
                var currentImg:String;
                public function thumbHolder() {
                      currentImgNum = 0;
                      xmlRequest = new URLRequest("images.xml");
                      xmlLoader = new URLLoader(xmlRequest);
                      xmlLoader.addEventListener(Event.COMPLETE, handlePics);
                public function handlePics(e:Event):void {
                      imgData = new XML(e.target.data);
                      numberOfChildren = imgData.*.length();
                      for (var i:int = 0 ; i < numberOfChildren ; i++) {
                           currentImg = imgData.image[i].imgURL;
                           imgLoader = new Loader;
                           imgLoader.load(new URLRequest(currentImg));
                           imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, placePics);
              function placePics(e:Event):void {
                     var oldH:Number = e.target.loader.height;
                     var oldW:Number = e.target.loader.width;
                     e.target.loader.height = 100;
                     var prosent:Number = (e.target.loader.height / oldH) * 100;
                     e.target.loader.width = (prosent * oldW) /100;
                     imgContainer.push(e.target.loader);
                     imgContainer[currentImgNum].x = (e.target.loader.width * currentImgNum) + (currentImgNum * 5) + 6;
                     addChild(imgContainer[currentImgNum]);
                     currentImgNum++;

    Never mind! I finally managed to see what to do. Thanks for the help
    package {
         import flash.display.*;
         import flash.events.*;
         import flash.net.*;
         public class thumbHolder extends MovieClip {
              var xmlRequest:URLRequest;
              var xmlLoader:URLLoader;
              var imgData:XML;
              var numberOfChildren:Number;
              var currentImgNum:Number;
              var imgLoader:Loader;
              var imgContainer:Array = [];
              var currentImg:String;
              public function thumbHolder() {
                   currentImgNum = 0;
                   xmlRequest = new URLRequest("images.xml");
                   xmlLoader = new URLLoader(xmlRequest);
                   xmlLoader.addEventListener(Event.COMPLETE, handlePics);
              public function handlePics(e:Event):void {
                   imgData = new XML(e.target.data);
                   numberOfChildren = imgData.*.length();
                   adToArray(currentImgNum);
              private function adToArray(currNum:Number):void {
                   currentImg = imgData.image[currNum].imgURL;
                   imgLoader = new Loader;
                   imgLoader.load(new URLRequest(currentImg));
                   imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, placePics);
              function placePics(e:Event):void {
                   var oldH:Number = e.target.loader.height;
                   var oldW:Number = e.target.loader.width;
                   e.target.loader.height = 100;
                   var prosent:Number = (e.target.loader.height / oldH) * 100;
                   e.target.loader.width = (prosent * oldW) /100;
                   imgContainer.push(e.target.loader);
                   imgContainer[currentImgNum].x = (e.target.loader.width * currentImgNum) + (currentImgNum * 5) + 6;
                   addChild(imgContainer[currentImgNum]);
                   if (currentImgNum < numberOfChildren) {
                        currentImgNum++;
                        adToArray(currentImgNum);

  • XML Elements Ordering in Generated XML Output

    I have a requirement where I need the xml element tags to appear in the generated xml output in the same order as in data template definition but in my case this is not happening. I have one master group - Customer and two subgroups - BillingAddress and ShipToAddress. The subgroups appear below some master elements eg. Contact but above other master elements eg. Telephone . However when the xml output is finally generated all the Master Elements appear first followed by the subgroup elements. Does anyone know how I can rectify this?
    See below:
    my data template structure is as follows:
    - <group name="Customer" dataType="varchar2" source="Q_MASTER_FILE_CUST">
    <element name="CustomerID" datatype="varchar2" value="CUSTOMER_NUM" />
    <element name="CustomerTaxID" datatype="varchar2" value="TAXPAYER_ID" />
    <element name="CompanyName" datatype="varchar2" value="COMPANY_NAME1" />
    <element name="Contact" datatype="varchar2" value="CONTACT_NAME" />
    - <group name="BillingAddress" dataType="varchar2" source="Q_MF_CUST_BILLTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM1" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME1" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE1" />
    <element name="City" datatype="varchar2" value="CITY1" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE1" />
    <element name="Region" datatype="varchar2" value="COUNTY1" />
    <element name="Country" datatype="varchar2" value="COUNTRY1" />
    </group>
    - <group name="ShipToAddress" dataType="varchar2" source="Q_MF_CUST_SHIPTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM2" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME2" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE2" />
    <element name="City" datatype="varchar2" value="CITY2" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE2" />
    <element name="Region" datatype="varchar2" value="COUNTY2" />
    <element name="Country" datatype="varchar2" value="COUNTRY2" />
    </group>
    <element name="Telephone" datatype="varchar2" value="PHONE_NUMBER" />
    <element name="Fax" datatype="varchar2" value="FAX1" />
    <element name="Email" datatype="varchar2" value="EMAIL_ADDRESS" />
    <element name="WebSite" datatype="varchar2" value="URL" />
    </group>
    </group>
    My XML Output is as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    </Customer>
    It should be as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    </Customer>
    is anyone able to advise?
    Rani

    If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

  • Load order faces-config.xml

    I've got the following code:
    User.java
         public User() {
              userData = ( UserData ) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("userData");
         }EMailCenter.java
    public EMailCenter() {
              userData = ( UserData ) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("userData");
              The problem: userData is accessed correctly in User.java and in EMailCenter I get an invalid object. My faces-config.xml looks like this:
    <faces-config>
         <managed-bean>
              <managed-bean-name>user</managed-bean-name>
              <managed-bean-class>jsf.User</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>userData</managed-bean-name>
              <managed-bean-class>jsf.UserData</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>emailcenter</managed-bean-name>
              <managed-bean-class>jsf.EMailCenter</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
            ...I'm not shure but I think that EMailCenter is loaded before the userData object is created when starting the web application. So is it possible to tell Tomcat in which order it should create the objects? Or is it another problem?

    You can also consider to inject the userData bean as managed property of the other beans.

  • Global Attribute Usage -- Customization (Order Line level)

    Hi All,
    We have a requirement to capture some additional fields during order creation. We have already exhausted the attribute fields in the oe_order_lines_all table. So we are unable to create DFF using any of attribute fields.
    To achieve the functionality, we are analyzing the usage of global_attribute field. We have few doubts before using it,
    1. What is the significance of global_attribute fields. Can we use in DFF as we use Attribute fields
    2. Does oracle ever use the global_attribute fields for any of its purpose.
    Please provide some insight in using the global_attribute fields for our customization.
    Thanks,
    Rajesh SM.

    Hi Rajesh,
    I hope you would have got the solution for the same by now. I am also facing the same situation what you faced. We have consumed all attributes in OE_ORDER_HEADERS_ALL and would need minimum 4 more attributes for adding a new functionality which is required by business.
    I raised and SR with oracle asking if it is possible to extend the Order header DFF and got following response
    It is NOT possible to extend the available DFF columns since this will mean adding further columns to the base table which is not supported.
    I can give the below suggestions for your requirement.
    It might be easier to revisit your existing DFF fields and make better use of them - e.g.
    - any that are not user enterable or displayed, push to unused fields e.g. global_attributeXX
    - ensure context sensitivity is being used to make best use of available segments.
    - combine any related DFFs into one (often in combination with validation sets)
    - move any DFFs that are at a lower level of detail to the correct level of detail, eg. if it can be on the customer site rather than customer site use level, move it!
    Some updates to DFF fields may be necessary, but much easier than modifications.
    I am still in a fix to find the best possible solution. Can you please suggest how did you resolve the issue?
    Vikz
    Edited by: user13090130 on Sep 13, 2011 10:18 PM

  • About  "Append mode" of cs6, cc & cc2014 project file in order to insert xml sequence which is sent from 3rd-party tool

    let me ask you all something about  “Append mode” of cs6, cc & cc2014 project file in order to insert multiple xml sequence  which is sent from 3rd-party tool  into specific project file .
    Finalcut pro 7 & x  was supported this , but i am not sure will support this on cs6, cc & cc2014 .
    is this possible ??
    could someone  let me know about this - append mode possible or not ?? 

    let me ask you all something about  “Append mode” of cs6, cc & cc2014 project file in order to insert multiple xml sequence  which is sent from 3rd-party tool  into specific project file .
    Finalcut pro 7 & x  was supported this , but i am not sure will support this on cs6, cc & cc2014 .
    is this possible ??
    could someone  let me know about this - append mode possible or not ?? 

  • Restrict Usage of Order Types by Users

    Hi
    We have two order types existing in SAP and interfaced with MAXIMO. Data flows into these order types via XI Interface from MAXIMO. So, in SAP my client wants to restrict usage of these two order types by SAP users. Is there a way, do i need to config something. Please let me know
    Thanks in advance

    Hi Srinivas
    Do you have config steps documentation available. If yes please share. Previous thread was useful but dint supplied me full information. Now I'm confused as, do i have to specify restrictions in Status profile or in Maintain authorization.
    Thanks for the initial help.

  • How to monitor cube usage in order to add more aggregations to speed up performance

    hi all:
      We have finally deployed our first Enterprise level cube to production and fact table contains roughly around 150M  records. 
    We also created a measure group for distinct order purpose and works fine for us. Now, we realized that the cube is responding a tad slow when users drag order count to their excel ... 
       During design phase, I created aggregation based on over all performance (  when 20% achieved, it stopped). What I want to do now is below:
    1. I want to  know the usage pattern when users are navigating this cube
    2. once I know the pattern, how can I add more aggregations based on that?
    thanks
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    Hello,
    Turn on the "OlapQueryLog" to log to a database table, this results can be used for the "Usage-Based Optimization Wizard".
    See Configuring the Analysis Services Query Log  +
    Based Optimization Wizard F1 Help +
    Aggregations and Aggregation Designs
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Order by in xml publisher

    hi all,
    how do i display an order by in the rft file. For example, I have data grouped by periods, and then I want the periods to be displayed in assending order.
    IE. period 3, then period4, then period 5.
    thanks,

    Try using <?sort:element name?>.
    Please refer to user-guide for more details.

  • XML select query causing very high CPU usage.

    Hi All,
    In our Oracle 10.2.0.4 Two node RAC we are facing very high CPU usage....and all of the top CPU consuming processes are executing this below sql...also these statements are waiting for some gc wiat events as shown below.
    SELECT B.PACKET_ID FROM CM_PACKET_ALT_KEY B, CM_ALT_KEY_TYPE C, TABLE(XMLSEQUENCE ( EXTRACT (:B1 , '/AlternateKeys/AlternateKey') )) T
    WHERE B.ALT_KEY_TYPE_ID = C.ALT_KEY_TYPE_ID AND C.ALT_KEY_TYPE_NAME = EXTRACTVALUE (VALUE (T), '/AlternateKey/@keyType')
    AND B.ALT_KEY_VALUE = EXTRACTVALUE (VALUE (T), '/AlternateKey')
    AND NVL (B.CHILD_BROKER_CODE, '6209870F57C254D6E04400306E4A78B0') =
    NVL (EXTRACTVALUE (VALUE (T), '/AlternateKey/@broker'), '6209870F57C254D6E04400306E4A78B0')
    SQL> select sid,event,state from gv$session where state='WAITING' and event not like '%SQL*Net%';
           SID EVENT                                                            STATE
            66 jobq slave wait                                                  WAITING
           124 gc buffer busy                                                   WAITING
           143 gc buffer busy                                                   WAITING
           147 db file sequential read                                          WAITING
           222 Streams AQ: qmn slave idle wait                                  WAITING
           266 gc buffer busy                                                   WAITING
           280 gc buffer busy                                                   WAITING
           314 gc cr request                                                    WAITING
           317 gc buffer busy                                                   WAITING
           392 gc buffer busy                                                   WAITING
           428 gc buffer busy                                                   WAITING
           471 gc buffer busy                                                   WAITING
           518 Streams AQ: waiting for time management or cleanup tasks         WAITING
           524 Streams AQ: qmn coordinator idle wait                            WAITING
           527 rdbms ipc message                                                WAITING
           528 rdbms ipc message                                                WAITING
           532 rdbms ipc message                                                WAITING
           537 rdbms ipc message                                                WAITING
           538 rdbms ipc message                                                WAITING
           539 rdbms ipc message                                                WAITING
           540 rdbms ipc message                                                WAITING
           541 smon timer                                                       WAITING
           542 rdbms ipc message                                                WAITING
           543 rdbms ipc message                                                WAITING
           544 rdbms ipc message                                                WAITING
           545 rdbms ipc message                                                WAITING
           546 rdbms ipc message                                                WAITING
           547 gcs remote message                                               WAITING
           548 gcs remote message                                               WAITING
           549 gcs remote message                                               WAITING
           550 gcs remote message                                               WAITING
           551 ges remote message                                               WAITING
           552 rdbms ipc message                                                WAITING
           553 rdbms ipc message                                                WAITING
           554 DIAG idle wait                                                   WAITING
           555 pmon timer                                                       WAITING
            79 jobq slave wait                                                  WAITING
           117 gc buffer busy                                                   WAITING
           163 PX Deq: Execute Reply                                            WAITING
           205 db file parallel read                                            WAITING
           247 gc current request                                               WAITING
           279 jobq slave wait                                                  WAITING
           319 LNS ASYNC end of log                                             WAITING
           343 jobq slave wait                                                  WAITING
           348 direct path read                                                 WAITING
           372 db file scattered read                                           WAITING
           475 jobq slave wait                                                  WAITING
           494 gc cr request                                                    WAITING
           516 Streams AQ: qmn slave idle wait                                  WAITING
           518 Streams AQ: waiting for time management or cleanup tasks         WAITING
           523 Streams AQ: qmn coordinator idle wait                            WAITING
           528 rdbms ipc message                                                WAITING
           529 rdbms ipc message                                                WAITING
           530 Streams AQ: waiting for messages in the queue                    WAITING
           532 rdbms ipc message                                                WAITING
           537 rdbms ipc message                                                WAITING
           538 rdbms ipc message                                                WAITING
           539 rdbms ipc message                                                WAITING
           540 rdbms ipc message                                                WAITING
           541 smon timer                                                       WAITING
           542 rdbms ipc message                                                WAITING
           543 rdbms ipc message                                                WAITING
           544 rdbms ipc message                                                WAITING
           545 rdbms ipc message                                                WAITING
           546 rdbms ipc message                                                WAITING
           547 gcs remote message                                               WAITING
           548 gcs remote message                                               WAITING
           549 gcs remote message                                               WAITING
           550 gcs remote message                                               WAITING
           551 ges remote message                                               WAITING
           552 rdbms ipc message                                                WAITING
           553 rdbms ipc message                                                WAITING
           554 DIAG idle wait                                                   WAITING
           555 pmon timer                                                       WAITINGI am not at all able to understand what this SQL is...i think its related to some XML datatype.
    Also not able to generate execution plan for this sql using explain plan- getting error(ORA-00932: inconsistent datatypes: expected - got -)
    Please help me in this issue...
    How can i generate execution plan?
    Does this type of XML based query will cause high GC wiat events and buffer busy wait events?
    How can i tune this query?
    How can i find that this is the only query causing High CPU usage?
    Our servers are having 64 GB RAM and 16 CPU's..
    OS is Solaris 5.10 with UDP as protocol for interconnect..
    -Yasser

    I found some more xml queries as shown below.
    SELECT XMLELEMENT("Resource", XMLATTRIBUTES(RAWTOHEX(RMR.RESOURCE_ID) AS "resourceID", RMO.OWNER_CODE AS "ownerCode", RMR.MIME_TYPE AS "mimeType",RMR.FILE_SIZE AS "fileSize", RMR.RESOURCE_STATUS AS "status"), (SELECT XMLAGG(XMLELEMENT("ResourceLocation", XMLATTRIBUTES(RAWTOHEX(RMRP.REPOSITORY_ID) AS "repositoryID", RAWTOHEX(DIRECTORY_ID) AS "directoryID", RESOURCE_STATE AS "state", RMRO.RETRIEVAL_SEQ AS "sequence"), XMLFOREST(FULL_PATH AS "RemotePath"))ORDER BY RMRO.RETRIEVAL_SEQ) FROM RM_RESOURCE_PATH RMRP, RM_RETRIEVAL_ORDER RMRO, RM_LOCATION RML WHERE RMRP.RESOURCE_ID = RMR.RESOURCE_ID AND RMRP.REPOSITORY_ID = RMRO.REPOSITORY_ID AND RMRO.LOCATION_ID = RML.LOCATION_ID AND RML.LOCATION_CODE = :B2 ) AS "Locations") FROM RM_RESOURCE RMR, RM_OWNER RMO WHERE RMR.OWNER_ID = RMO.OWNER_ID AND RMR.RESOURCE_ID = HEXTORAW(:B1 )
    SELECT XMLELEMENT ( "Resources", XMLAGG(XMLELEMENT ( "Resource", XMLATTRIBUTES (B.RESOURCE_ID AS "id"), XMLELEMENT ("ContentType", C.CONTENT_TYPE_CODE), XMLELEMENT ("TextExtractStatus", B.TEXT_EXTRACTED_STATUS), XMLELEMENT ("MimeType", B.MIME_TYPE), XMLELEMENT ("NumberPages", TO_CHAR (B.NUM_PAGES)), XMLELEMENT ("FileSize", TO_CHAR (B.FILE_SIZE)), XMLELEMENT ("Status", B.STATUS), XMLELEMENT ("ContentFormat", D.CONTENT_FORMAT_CODE), G.ALTKEY )) ) FROM CM_PACKET A, CM_RESOURCE B, CM_REF_CONTENT_TYPE C, CM_REF_CONTENT_FORMAT D, ( SELECT XMLELEMENT ( "AlternateKeys", XMLAGG(XMLELEMENT ( "AlternateKey", XMLATTRIBUTES ( H.ALT_KEY_TYPE_NAME AS "keyType", E.CHILD_BROKER_CODE AS "broker", E.VERSION AS "version" ), E.ALT_KEY_VALUE )) ) ALTKEY, E.RESOURCE_ID RES_ID FROM CM_RESOURCE_ALT_KEY E, CM_RESOURCE F, CM_ALT_KEY_TYPE H WHERE E.RESOURCE_ID = F.RESOURCE_ID(+) AND F.PACKET_ID = HEXTORAW (:B1 ) AN
    D E.ALT_KEY_TYPE_ID = H.ALT_KEY_TYPE_ID GROUP BY E.RESOURCE_ID) G WHERE A.PACKET_ID = HEXTORAW (:B1
    SELECT XMLELEMENT ("Tagging", XMLAGG (GROUPEDCAT)) FROM ( SELECT XMLELEMENT ( "TaggingCategory", XMLATTRIBUTES (CATEGORY1 AS "categoryType"), XMLAGG (LISTVALUES) ) GROUPEDCAT FROM (SELECT EXTRACTVALUE ( VALUE (T), '/TaggingCategory/@categoryType' ) CATEGORY1, XMLCONCAT(EXTRACT ( VALUE (T), '/TaggingCategory/TaggingValue' )) LISTVALUES FROM TABLE(XMLSEQUENCE(EXTRACT ( :B1 , '/Tagging/TaggingCategory' ))) T) GROUP BY CATEGORY1)
    SELECT XMLCONCAT ( :B2 , DI_CONTENT_PKG.GET_ENUM_TAGGING_FN (:B1 ) ) FROM DUAL
    SELECT XMLCONCAT (:B2 , :B1 ) FROM DUAL
    SELECT * FROM EQ_RAW_TAG_ERROR A WHERE TAG_LIST_ID = :B2 AND EXTRACTVALUE (A.RAW_TAG_XML, '/TaggingValues/TaggingValue/Value' ) = :B1 AND A.STATUS = '
    NR'
    SELECT RAWTOHEX (S.PACKET_ID) AS PACKET_ID, PS.PACKET_STATUS_DESC, S.LAST_UPDATE AS LAST_UPDATE, S.USER_ID, S.USER_COMMENT, MAX (T.ALT_KEY_VALUE) AS ALTKEY, 'Y' AS IS_PACKET FROM EQ_PACKET S, CM_PACKET_ALT_KEY T, CM_REF_PACKET_STATUS PS WHERE S.STATUS_ID = PS.PACKET_STATUS_ID AND S.PACKET_ID = T.PACKET_ID AND NOT EXISTS (SELECT 1 FROM CM_RESOURCE RES WHERE RES.PACKET_ID = S.PACKET_ID AND EXISTS (SELECT 1 FROM CM_REF_CONTENT_FORMAT CF WHERE CF.CONTENT_FORMAT_ID = RES.CONTENT_FORMAT AND CF.CONTENT_FORMAT_CODE = 'I_FILE')) GROUP BY RAWTOHEX (S.PACKET_ID), PS.PACKET_STATUS_DESC, S.LAST_UPDATE, S.USER_ID, S.USER_COMMENT UNION SELECT RAWTOHEX (A.FATAL_ERROR_ID) AS PACKET_ID, C.PACKET_STATUS_DESC, A.OCCURRENCE_DATE AS LAST_UPDATE, '' AS USER_ID, '' AS USER_COMMENT, RAWTOHEX (A.FATAL_ERROR_ID) AS ALTKEY, 'N' AS IS_PACKET FROM EQ_FATAL_ERROR A, EQ_ERROR_MSG B, CM_REF_PACKET_STATUS C, EQ_SEVERITYD WHERE A.PACKET_ID IS NULL AND A.STATUS = 'NR' AND A.ERROR_MSG_ID = B.ERROR_MSG_ID AND B.SEVERITY_I
    SELECT /*+ INDEX(e) INDEX(a) INDEX(c)*/ XMLAGG(XMLELEMENT ( "TaggingCategory", XMLATTRIBUTES ( G.TAG_CATEGORY_CODE AS "categoryType" ), XMLELEMENT ("TaggingValue", XMLATTRIBUTES (C.IS_PRIMARY AS "primary", H.ORIGIN_CODE AS "origin"), XMLAGG(XMLELEMENT ( "Value", XMLATTRIBUTES ( F.TAG_LIST_CODE AS "listType" ), E.TAG_VALUE )) ) )) FROM TABLE (CAST (:B1 AS T_TAG_MAP_HIERARCHY_TAB)) A, TABLE (CAST (:B2 AS T_ENUM_TAG_TAB)) C, REM_TAG_VALUE E, REM_TAG_LIST F, REM_TAG_CATEGORY G, CM_ORIGIN H WHERE E.TAG_VALUE_ID = C.TAG_VALUE_ID AND F.TAG_LIST_ID = E.TAG_LIST_ID AND G.TAGGING_CATEGORY_ID = F.TAGGING_CATEGORY_ID AND H.ORIGIN_ID = C.ORIGIN_ID AND C.ENUM_TAG_ID = A.MAPPED_ENUM_TAG_ID GROUP BY C.IS_PRIMARY, H.ORIGIN_CODE, G.TAG_CATEGORY_CODE START WITH A.MAPPED_ENUM_TAG_ID = HEXTORAW (:B3 ) CONNECT BY PRIOR A.MAPPED_ENUM_TAG_ID = A.ENUM_TAG_ID
    SELECT /*+  INDEX(e) */ XMLAGG(XMLELEMENT ( "TaggingCategory", XMLATTRIBUTES ( G.TAG_CATEGORY_CODE AS "categoryType" ), XMLELEMENT ( "TaggingValue", XMLATTRIBUTES (C.IS_PRIMARY AS "primary", H.ORIGIN_CODE AS "origin"), XMLAGG(XMLCONCAT ( XMLELEMENT ( "Value", XMLATTRIBUTES ( F.TAG_LIST_CODE AS "listType" ), E.TAG_VALUE ), CASE WHEN LEVEL = 1 THEN :B4 ELSE NULL END )) ) )) FROM TABLE (CAST (:B1 AS T_TAG_MAP_HIERARCHY_TAB)) A, TABLE (CAST (:B2 AS T_ENUM_TAG_TAB)) C, REM_TAG_VALUE E, REM_TAG_LIST F, REM_TAG_CATEGORY G, CM_ORIGIN H WHERE E.TAG_VALUE_ID = C.TAG_VALUE_ID AND F.TAG_LIST_ID = E.TAG_LIST_ID AND G.TAGGING_CATEGORY_ID = F.TAGGING_CATEGORY_ID AND H.ORIGIN_ID = C.ORIGIN_ID AND C.ENUM_TAG_ID = A.MAPPED_ENUM_TAG_ID GROUP BY G.TAG_CATEGORY_CODE, C.IS_PRIMARY, H.ORIGIN_CODE START WITH A.MAPPED_ENUM_TAG_ID = HEXTORAW (:B3 ) CONNECT BY PRIOR A.MAPPED_ENUM_TAG_ID = A.ENUM_TAG_IDBy observing above sql queries i found some hints forcing for index usage..
    I think xml schema is created already...and its progressing as you stated above. Please correct if i am wrong.
    I found all these sql from AWR report and all of these are very high resource consuming queries.
    And i am really sorry if i am irritating you by asking all stupid questions related to xml.
    -Yasser
    Edited by: YasserRACDBA on Nov 17, 2009 3:39 PM
    Did syntax allignment.

  • Customizing Printed Purchase Order (XML) in R12

    Hi,
    I need to customize the Printed Purchase Order (which is sent to Supplier).
    I see the existing report (Executable: XDODTEXE Method: Java Concurrent Program) , I tried to download the template with data definition code=POXPRPOL_XML
    but i dont see any tempate for that.
    Conc Prog:Printed Purchase Order Report(Landscape) (XML)
    Short name:POXPRPOL_XML
    Could you let me know how to approach for customizing the report.
    Thanks.

    855902 wrote:
    Hi,
    I need to customize the Printed Purchase Order (which is sent to Supplier).
    I see the existing report (Executable: XDODTEXE Method: Java Concurrent Program) , I tried to download the template with data definition code=POXPRPOL_XML
    but i dont see any tempate for that.
    Conc Prog:Printed Purchase Order Report(Landscape) (XML)
    Short name:POXPRPOL_XML
    Could you let me know how to approach for customizing the report.
    Thanks.Yes..there is no xml associated with it..I have seen it even in my instance..better to log a SR with oracle to get the data template...even when you submit the program it will end up saying no data template...program will be errored out..because there is no template available to pick that
    All Parameters: P_REPORT_TYPE=R:P_AGENT_ID=:P_PO_NUM_FROM=:P_PO_NUM_TO=:P_RELEASE_NUM_FROM=:P_RELEASE_NUM_TO=:P_DATE_FROM=:P_DATE_TO=:P_APPROVED_FLAG=:P_TEST_FLAG=:P_PRINT_RELEASES=Y:P_SORTBY=:P_USER_ID=1013895:P_QTY_PRECISION=2:P_FAX_ENABLE=:P_FAX_NUM=:P_CANCEL_LINE=Y:P_BLANKET_LINES=N:DebugFlag=N
    Data Template Code: POXPRPOL_XML
    Data Template Application Short Name: PO
    Debug Flag: N
    {P_RELEASE_NUM_FROM=, P_DATE_FROM=, P_CANCEL_LINE=Y, P_FAX_NUM=, P_SORTBY=, P_RELEASE_NUM_TO=, P_PO_NUM_TO=, P_REPORT_TYPE=R, P_USER_ID=1013895, P_AGENT_ID=, P_APPROVED_FLAG=, P_PO_NUM_FROM=, P_BLANKET_LINES=N, P_TEST_FLAG=, P_FAX_ENABLE=, P_QTY_PRECISION=2, P_DATE_TO=, P_PRINT_RELEASES=Y}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.oa.util.DataTemplate.getDataTemplate(DataTemplate.java:379)
         at oracle.apps.xdo.oa.util.DataTemplate.<init>(DataTemplate.java:226)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:283)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    HTH
    Mahendra

Maybe you are looking for

  • HT1727 How can i get my old downloaded songs back that were purchased from my account to a new computer?

    I deauthorized all my old computers to make it so my sister and I could get ITunes on our new computers, I authorized my computer now and i will authorize hers tomorrow but its not showing my past purchages on itunes in my library. How do I get my ol

  • How to disable copy and paste from Mail to other applications

    Are there MDM or policy that can limit copy and paste?  Using MDM or ACU to lockdown the phone would be completely useless in regards to preventing data leakage unless copy/paste can be controlled.  MDM provider is advising that there is no API from

  • Dynamic PDFs with Digital Signatures?

    LCD 9 – Acrobat 9 standard/Pro Looking for the definitive answer on this one.  My PDFs have a need to be both dynamic and use multiple digital signatures.  For now I design as static with multi dig sig and deal with break-out forms and such via a por

  • Build a New Libary vs. Add Files?

    I need advice about the choice creating a new library file or adding files to the library. Here is the situation: My computer was stolen .  On the computer that was stolen I had I-Tunes installed.  The music/media files were on an external hard drive

  • Select Template at run time?

    I have a site that contains content for multiple languages. Each language currently has it's own set of templates and this works well in conjunction with Contribute. However, some page are shared between the different languages, usually those contain