OInvoice Business Object XML Schema question

I am trying to produce an xml file based on the oInvoices business object to use in an EDI translation.  I am running Sap Business One 2005 A SP:01 PL:03.  I used one of the sample programs in the SDK Samples folder to produce an XML schema of the oInvoices object.  The sample program is in the COM DI folder, program #06. ObjectSchemas.  When I run this program is produces an xml file that is really a schema for oInvoices, and it uses the GetBusinessObjectXmlSchema function for the oInvoices BoObjectType.  If I use the SaveXML function on the SAPbobsCOM.BoObjectTypes.oInvoices, I get a different xml file that does not use the same table or fields names.  (See sample below - schema uses the table name, OINV, SaveXml uses 'Documents' in place of the OINV name, schema has a QueryParams tag set, SaveXml does not, SaveXml has a Version defined within the AdminInfo, the Schema does not have this). Why doesn't the oInvoices xml schema match the xml file produced using the SaveXML function.  Which example below is the correct xml representation of an Invoice?  I have copied parts of each file below.
oInvoices file produced using GetBusinessObjectXmlSchema for oInvoices:
- <element name="BOM">
- <complexType>
- <all>
- <element maxOccurs="1" minOccurs="0" name="BO">
- <complexType>
- <sequence>
- <element maxOccurs="1" minOccurs="0" name="AdmInfo">
- <complexType>
- <all>
  <element maxOccurs="1" minOccurs="0" name="Object" type="long" />
  </all>
  </complexType>
  </element>
- <element maxOccurs="1" minOccurs="0" name="QueryParams">
- <complexType>
- <all>
  <element maxOccurs="1" minOccurs="0" name="DocEntry" type="string" />
  </all>
  </complexType>
  </element>
- <element maxOccurs="1" minOccurs="0" name="OINV">
- <complexType>
- <sequence>
- <element maxOccurs="unbounded" minOccurs="0" name="row">
- <complexType>
- <all>
  <element maxOccurs="1" minOccurs="0" name="DocNum" type="long" />
  <element maxOccurs="1" minOccurs="0" name="DocType" type="string" />
  <element maxOccurs="1" minOccurs="0" name="Handwrtten" type="string" />
  <element maxOccurs="1" minOccurs="0" name="DocDate" type="string" />
  <element maxOccurs="1" minOccurs="0" name="DocDueDate" type="string" />
  <element maxOccurs="1" minOccurs="0" name="CardCode" type="string" />
  <element maxOccurs="1" minOccurs="0" ......
OInvoices xml file produced using SaveXml
- <BOM>
- <BO>
- <AdmInfo>
  <Object>13</Object>
  <Version>2</Version>
  </AdmInfo>
- <Documents>
- <row>
  <DocNum>5</DocNum>
  <DocType>dDocument_Items</DocType>
  <HandWritten>tNO</HandWritten>
  <Printed>tNO</Printed>
  <DocDate>20050116</DocDate>
  <DocDueDate>20050215</DocDueDate>
  <CardCode>C20000</CardCode>.....
I did not copy all of the xml for each file as it would be too lengthy. 
Thanks,
Nancy Walk
[email protected]

Hi Nancy,
I can´t find it right now, but I do remember reading that there were different XML definition versions for SBO objects. In the version 1, table names where used. In the version 2, object names where used. Looks like the schema defines version 2, but SBO is using version 2.
I will check if I can found where I did read that. Try speaking with someone in SAP and about XML versions, perhaps they could help you with this info.
Hope helps,
Ibai Peñ

Similar Messages

  • Business Object LB - Probe question

    Has anyone ever worked with Business Object for load balancing ?
    My main question concerns the probe to get all the content of a web page where I would need to follow all the links included in a probed web page to get all the content.
    Otherwise the probe is useless. Anything at this point would help.
    Thanks

    Hi Nancy,
    I can´t find it right now, but I do remember reading that there were different XML definition versions for SBO objects. In the version 1, table names where used. In the version 2, object names where used. Looks like the schema defines version 2, but SBO is using version 2.
    I will check if I can found where I did read that. Try speaking with someone in SAP and about XML versions, perhaps they could help you with this info.
    Hope helps,
    Ibai Peñ

  • Please only post SAP Business Objects products related questions here

    Hi
    Thanks for reading.
    Unfortunately many people get confused with the term BI which was used for SAP BW at one time. With the acquisition of Business Objects some product names have changed.
    SAP BW is still SAP BW, please post in the respective forums: /community [original link is broken]
    Business Intelligence in this forum refers to the these SAP Business Objects products:
    SAP Business Objects Enterprise
    SAP Business Objects 4.0
    SAP Business Objects Intelligence Platform 4.0
    For more information and great articles and videos please see:
    http://www.sdn.sap.com/irj/boc/bi
    Kind Regards
    Roland Hoeller

    >
    Suresh Babu Aluri wrote:
    > Hi,
    >
    > You can create All prompt in lovs of reuired object as
    >
    > do the following steps for all prompt creation.
    >
    > 1. Go to Object to which the lovs are mapped. -> select object -> properties -> advanced (not sure) -> edit lovs -> then a query panel will display and it will have query like
    >
    > select distinct(..........) from ......................
    >
    > change the above query to
    >
    > select distinct(..........) from ......................
    > union
    > select 'all' from dual -> dual is temporary table in oracle (you define a temporary table w.r.to database)
    >
    > 2. In designer go to the object on which prompt is defined.
    > i.e.
    >
    > may be in selecor where clause you might defined prompt as
    >
    > .............. @prompt('Member Name')
    >
    > so change that to
    >
    > .................. .............. @prompt('..Member name')
    > or
    > 'all' in @prompt('Member name')
    >
    > 2. For your second requirement the max no lov values are changed in prm files. For that go to programs -> BO -> BO ii.5 or ur version -> dataaccess->win32_x86-> based on ur back end select required folder -> search in *.prm files to change the max no lovs.
    >
    > Cheers,
    > Suresh Aluri.
    Hi Suresh
    Thank you for the detailed response.  I tried your suggestions and neither works.
    LOV issue:
    Within the Business View manager, i right-click on the LOV object and click "Edit List of Values..." and i get a dialog box that only shows me Available fields, List of Value Fields used, description field, and Referenced objects. Along with buttons for Clear Instance & Refersh Status.
    I have read similar posts to what you suggested but never get to the same place as described.
    Please advise....
    as for _Max Number LOV _
    I have researched this as well and found the same suggestion you made. But the PRM file does not have that value, and the file contains all XML code
    Now what???
    Thanks
    Mike

  • Business Objects Training -General Questions

    Hi,
      I am just Going through the Business Objects...had some few general questions.
    1)What  is the current Version on BO
    2)Where does Crystal reports & Xcelsius fit in Business Objects
    3)Does Power Center & Informatica are also included in Business Objects
    Thanks

    The latest version of Business Objects Enterprise is XI Release 3.1 Service Pack 2. There have been several fixpacks delivered on top of this as well.
    Crystal Reports and XCelsius are tools to build Reports and Dashboards respectively. While XCelsius is suited for creating sleek dashboards with very aggregated data - usually less than 2000 rows per report, Crystal Reports can be used for reporting off data warehouses requiring reporting off large data sets.
    Informatica Powercenter is a tool proivded by an independant vendor and is not a Business Objects Product. Business Objects Provides Data Integrator, which is pretty much as rugged as Informatica and provides all the functionalities of ETL(Extraction Transformation and Loading).

  • XML Schema Question

    Hi everyone,
    I'm constructing two complex data types in my xml schema: Base and Extended. The two types look like this (or this is how I want them to look):
    <xs:complexType type="baseType">
         <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="stuff" type="xs:string" use="required" />
    <xs:all>
    </xs:all>
    </xs:complexType>
    <xs:complexType type="extendedType">
         <xs:complexContent>
              <xs:extension base="baseType">
                   <xs:attribute name="stuff" type="xs:string" use="optional" />
    <xs:all>
    </xs:all>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    What I'm trying to do is overwrite the use attribute for the attribute stuff. Is this possible? Can this be done?
    Thanks,
    Brandon

    Could you provide a little more information about the code bit you posted. More info about what class/package it is from and how you want to get the schema vs. how the method wants you to do it.
    I have worked with Dtds and Schemas, but not too much through the way you are doing it (We use them mainly as printouts on paper to give to people), so I will help with what I can.
    A little more info might also help someone remember something similar they did.

  • Crystal Report Server / Business objects XI R2 questions

    Hello all,
    If this isn't the place to post these questions please advise which forum is. Thank you in advance.
    We are running XI R2 SP5 of Crystal Report server (11.5.11.1470). I have some general questions...and are fairly new to this version.  Although I have been developing CR for many years.
    There is plenty of discussions here about "Universes" in BO, but for my deployment I don't think this applies. Correct?
    I have created list of values (LOV) using Business View Manager (11.5.11.1470) and would like to
    1. give the user an ability to select an "ALL" option in the report.
    2. If the LOV is large, it only returns a partial list.
    Now i have search these forums and other and found discussions regarding the above but none seemed to relate to my version.  Either I'm missing some component or just slow.
    Any advice / help would be greatly appreciated.
    Thank you.

    >
    Suresh Babu Aluri wrote:
    > Hi,
    >
    > You can create All prompt in lovs of reuired object as
    >
    > do the following steps for all prompt creation.
    >
    > 1. Go to Object to which the lovs are mapped. -> select object -> properties -> advanced (not sure) -> edit lovs -> then a query panel will display and it will have query like
    >
    > select distinct(..........) from ......................
    >
    > change the above query to
    >
    > select distinct(..........) from ......................
    > union
    > select 'all' from dual -> dual is temporary table in oracle (you define a temporary table w.r.to database)
    >
    > 2. In designer go to the object on which prompt is defined.
    > i.e.
    >
    > may be in selecor where clause you might defined prompt as
    >
    > .............. @prompt('Member Name')
    >
    > so change that to
    >
    > .................. .............. @prompt('..Member name')
    > or
    > 'all' in @prompt('Member name')
    >
    > 2. For your second requirement the max no lov values are changed in prm files. For that go to programs -> BO -> BO ii.5 or ur version -> dataaccess->win32_x86-> based on ur back end select required folder -> search in *.prm files to change the max no lovs.
    >
    > Cheers,
    > Suresh Aluri.
    Hi Suresh
    Thank you for the detailed response.  I tried your suggestions and neither works.
    LOV issue:
    Within the Business View manager, i right-click on the LOV object and click "Edit List of Values..." and i get a dialog box that only shows me Available fields, List of Value Fields used, description field, and Referenced objects. Along with buttons for Clear Instance & Refersh Status.
    I have read similar posts to what you suggested but never get to the same place as described.
    Please advise....
    as for _Max Number LOV _
    I have researched this as well and found the same suggestion you made. But the PRM file does not have that value, and the file contains all XML code
    Now what???
    Thanks
    Mike

  • XML Schema questions

    Question 1:
    If I have a many to many relationship that I want to display within multiple tables.  Is there a straightforward way to bind that?
    An example would be an automobile that use similar parts (seats etc).  I dont think livecycle supports keys
    So the xml looks like
    <orderCatalog>
      <automobile>
         <modelNumber>auto1</modelNumber>
          ... year etc
      </automobile>
      <part>
             <partNo>part1</partNo>
      </part>
       <joinAutoPart>
              <modelNumber>auto1</modelNumber>
              <partNo>part1</partNo>
       </joinAutoPart>
    </orderCatalog>
    I would like to point this to
    Subform pointing to joinAutoPart
    Header field pointing to automobile (with model number and name)
    Table with part information pointing to partNo (with partName and partNo and price)
    That way I would have a table per automobile with all of the individual parts listed
    Question 2:
    Can reader load an xml file over the internet by pressing a button like loadXML?
    Question 3: non xml related
    Is there a way to save a link from a table row to another table row
    Using the above example if I had multiple auto tables with multiple parts.  The user selects a part which I add to an order table.
    I would like to highlight that field showing they have ordered the part and grey out the button.
    However, if they remove the item from their order I would like to add it back without having to search every field in every table to find the part number.

    Thanks again for the response.
    Q1: If I have a join table - given that I have a many - to - many relation with multiple autos and multiple parts
    How do I connect the partNo to the description in the table from the xml
    If I create a table that I want to have
    <orderCatalog>
      <automobile>
         <modelNumber>auto1</modelNumber>
         <modelName>Mustang</modelName>
          ... year etc
      </automobile>
      <part>
             <partNo>part1</partNo>
             <partName>Headrest</partName>
      </part>
       <joinAutoPart>
              <modelNumber>auto1</modelNumber>
              <partNo>part1</partNo>
       </joinAutoPart>
    </orderCatalog>
    Automobile Model #,  Make, ....
    PartNo |  Part Description | Order Button
    I can bind joinAutoPart table to the Automobile header, but how to I convert that to a text Model Name vs a number
    I can join PartNo to the entries of a table, but can I fill the descriptions of each
    I want to do select partdescription, colorOptions, etc from partTable where PartNo = part1 then use those values - using binding or xml syntax
    I can reform the xml from my data to be the following, but this requires a lot of duplicate data and is very error prone to have one part name or number that is one off
    <automobile>
        <partList>
             <part>
                     <partNumber>part1<partNumber>
                     <partName>partName</partName>
             </part>
        </partList>
    </automobile>
    Q2: ok
    Ideally, I would like to have a dropdown box where the user selects say a  model name.  Then it builds a list of tables from an xml file - so there are a few common tables - like t-shirts, coffee cups etc that would show up on every form and the rest are dynamic.
    For ODBC, am I correct in thinking that the link has to be established at the client to the server outside of reader before a connection can be made within reader?
    Q3:  I am doing the add programatically, but if I have a part number from a built xml with many tables - is there a way to identify which table it is coming from?
    I don't on the order form have  | ModelNumber | PartNumber, so I don't have an easy way to reference back. And if I did I would still have to do multiple linear searches.  I assume the performance wouldn't be too bad, but it is not pretty.
    i = 0;
    j=0;
    while(i < (ModelTableForm.count-1))
       if (xyz.resolveNode("foo[" + i + "]").modelNumberField.rawValue == modelNumber)
              j = 0;
             while(j< (abc.resolveNode("bar[" + i + "]").count-1))
                 if(abc.resolveNode("bar[" + i + "]").partNumberField.rawValue == partNo)
                         abc.resolveNode("bar[" + i + "]").addButton.prescence="visible"
       i++;
    I was hoping for an extra field or way to extend the row object I could add referringNode or something to that effect and just say OrderRow.refferingNode.button.presence = "visible"
    I think I found one way to get around this.  I think I can create 0 width colums for indexes to the tables
    That way I could say  xyz.resolveNode("foo[" + modelIndex + "]").abc.resolveNode("bar[" + partIndex + "]")

  • An XML Scheme question - How to express a tag in XSD

    Hi.
    I'm trying to write an XSD to a certain XML (the CD_CATALOG famous example..), which has this kind of tag, which can appear in two formats:
    <PRICE value="34.9"/>
    or
    <PRICE>45.45</PRICE>
    the following expression just won't do, for it won't allow the first format.
    <xs:element name="PRICE">
    <xs:complexType>
    <xs:simpleContent>
    <xs:extension base="xs:decimal">
    <xs:attribute name="value" type="xs:decimal"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    Please Please tell me if you have any Idea..
    Guy

    Could you not add a xs:choice element, like this:
      <xs:complexType>
            <xs:choice>
                <xs:element name = 'price'>
                    <xs:complexType>
                        <xs:attribute name = 'value' type = 'xs:decimal'/>
                    </xs:complexType>
                </xs:element>
                <xs:element name = 'price'>
                    <xs:simpleType>
                        <xs:restriction base = 'xs:decimal'/>
                    </xs:simpleType>
                </xs:element>
            </xs:choice>
        </xs:complexType>

  • SAP XML Schema's - 2 questions

    Hi All,
    1. Difference between ifr.sap.com & XI
    The schema's defined in ifr.sap.com and the schema's retrieved via the RFC adapter are different!  The XSD's in ifr.sap.com use mixed case for the elements.  The XSD/WSDL extracted contain element names that are all uppercase!  Does seems like an error.  Or am I missing something?  Or is this on purpose?
    2. elemenfFormDefault="unqualified"
    The schema's defined in ifr.sap.com and used by SAP XI do not set elementFormDefault="qualified".  This is not an error, but unusual.  Non-global elements therefore do not belong to the target namespace but to an unnamed global namespace.  What would be the reason for doing so?
    Kind regards, Guy Crets (Apogado)

    Hi Guy,
    1. in ifr.sap.com you find three kinds of objects, namely IDocs, RFCs, and Business Objects.
    XI has an IDoc-adapter (which uses the same XML as published at ifr.sap.com) and an RFC-adapter (which uses the same XML as published at ifr.sap.com).
    As far as I know XI has no Business Object adapter. The reason might be, that for each method of a Business Object there is an RFC doing exactly the same work. So you can use the RFC adapter, but then clearly have to stick to the RFC-XML which differs from the Business Object XML. Normally, this RFC XML is not published at ifr.sap.com, because the Business Object is already published. Hence, you have to take the XSD from the Integration Repository in this case.
    2. I think XML namespaces were introduced to avoid naming conflicts when XML documents are put together from different organizations. This purpose is served by both modelling styles.
    So, in my opinion it remains a matter of taste.
    I'm not so familiar with XSLT, but I cannot imagine that this is really a problem. In contrast to elements attributes most of the time are taken unqualified, and you can also deal with this, I think.
    Moreover, 'unqualified' is the default according to the XSD spec. Hence, there are obviously several people, who believed this style to be the default.
    Greetings
              Stephan

  • Two Business Objects to fill a Data Grid/table using Anchors?

    Hi,
    I have a SAP standard tile were a table (grid) is filled by an Business Object. I want to add an additional column and retrieve the value from another Business Object.
    My questions
    1) Can I use Anchors to automatically set the relationship between two Business Objects A & B, so that I can just Drag & Drop an additional field from Business Object B to the DataGrid of Business Object A in the design screen without writing additional code?
    2) Some BO's do come with a predefined relationship to other BO's, but in the case of I have to write a supply function do I have to use a specific "Data Source Type" such as "Business Object", "BusinessQuery" or "Business CollectioN"?
    3) I already tried to write a supply function, but I realized that the system does return for some BO's or BS's a object instance, if I call "gFactory.newBusinessQuery". Is there any logic/restriction behind?
    I know I can use RowLoaded2 and a unbound column, but I want to know if this approach is also possible?
    Thank you for any help,
    Regards,
    Andreas

    Hi Andreas,
    The answer to your question is YES. You can very well do it without any changes at the code level.
    The scenerio can be implemented using a concept called JointField Mapping in MAS.
    Scenerio 1 :
    If you want to display the extra field from another BO in a list tile on the click of a search button from the search tile , then
    Please do the following :
    1. Select the Busines Query that you have associated to the search tile and go to properties from the View Designer.
    2. In the properties, Click on the Joint Field Mapping and select the BO where the extra field id present and select the primary key, Segment Field associated, (extra field)BO Property that you want to display in the list tile.
    2. Add a new control (new Field) in the List tile - ie, From the Toolbox (Tileset COntrols).
    3.Go to properties of the newly added control. Associate the anchor as the same achor as the list tile was pointing to earlier. for eg : Y_BOCAPGEN.
    4. Then Go to BCOLFieldName property and give the property name as the newly added BO property name(New field).
    After everything is modelled, You will be able to see the extra field in your application!!!!
    NOTE : Ofcourse, After the Successful generation.
    Scenerio 2 :
    If you want to display an Extra Field in a Detail tile,
    1. Go to Relationship of the BO from the Detail tile and go to properties.
    2. In the properties, You can find the Joint Field Mapping porperty.
    3. This property is again modelled as explained in scenerio 1.
    Hope, It would have definetly helped and answered your query.
    Have a good day!!
    Best Regards,
    Vignesh Ravikumar.

  • Welcome to Business Objects

    Hello and welcome to Business Objects, now a SAP Company !
    We proudly present our new forum for Business Objects technologies related questions.
    The Business Objects forum will give you the possibility to share ideas, opinions and information with other participants.
    Please find the welcoming message of our Vice President, Tim Lang at the following link:
    /people/community.user/blog/2008/01/22/welcome-to-the-business-objects-diamond-developer-community and, if you are looking for more detailed information beyond what you can find on SDN or BPX,  check the following URL:
    URL: http://diamond.businessobjects.com/sdn
    Join us now !
    Kind Regards,
    Dragos Serban

    Welcome Dragos.  Glad to have you engaged and participating.
    Mark Yolton

  • Business Object Repository ( B O R )

    Can some one please send me some data or links from where I can get data on Business object repository .

    Hi,
         SAP's Business Object Repository gives you an improved way to integrate business processes with external partners -- an increasingly necessary ability in the burgeoning e-marketplace economy.
    The age of e has had a profound effect on the IT industry. Not only has it changed our way of life, but it has also forced systems such as SAP to embrace a new era of openness. Marketplace demands for flexible automation of inter-business workflow and intelligent data exchange have forced formerly very proprietary ERP systems to begin helping customers integrate with other companies and with e-marketplaces data formats. For the first time, companies must expose their business processes to the outside world.
    In order to achieve this openness, SAP provides a technical infrastructure for the R/3 product, the Business Object Repository (BOR), which provides a simple yet powerful mechanism for external systems to trigger core business processes (such as placing an order) without concern for the underlying data structure. This level of abstraction is beneficial because it decouples R/3 from the external system. Either system is therefore free to change its internal business processes without affecting the other. SAP provides this technical infrastructure using a component-based view of its system. Each component or object provides a view of the data and the business processes that interact with that data. External systems can access this data via BAPI methods, which in turn access the underlying data structures of the system. It is the responsibility of the object and the BAPI to ensure the integrity of the data. This encapsulation of the data not only lends itself to external interfaces, but by using objects from within SAP, you can greatly reduce implementation, testing, and maintenance effort via the promotion of code reuse.
    Business Objects
    A business object is a problem-domain entity that you model in the SAP system, such as SalesOrder, BillingDocument, and Employee. The BOR stores all the objects in the R/3 system. The repository is a group of all the objects in the R/3 system. If the focus of objects is to model atomic business processes then it can be said that the BOR provides an enterprisewide view of business processes. By designing your ABAP code to fit your business processes you increase the ability of that code to flex when those processes are altered or integrated with external systems. This had made the object-oriented approach, which the BOR provides, essential to developing inter-business or e-business functionality.
    Attributes
    A business object is primarily represented by its attributes. You perform actions, such as create, update, or delete on the attributes by calling the methods of the object.
    Attribute NetValue of Object BUS2032 (SalesOrder).
    The majority of attributes are data-dictionary fields (for example, the NetValue attribute is defined by VBAK-NETWR). When you access an attribute of an object, you execute a SQL statement that retrieves the corresponding field in the database.
    Definition of attribute NetValue.
    You can also define attributes that do not exist in the data dictionary. These attributes are called virtual attributes. For example, a business partner has an attribute called BirthDate that is stored in the data dictionary. You can add a virtual attribute to the BusinessPartner object called Age. The age of a business partner is not stored in the database, but you can calculate it using the current date and the birth date of the business partner. If you implement the ABAP code that calculates Age, every time you access the Age attribute, the code executes and returns the business partners age.
    Definition of virtual attribute Age.
    This is an excellent example of one of the tools that a component-based approach provides. The external system does not need to concern itself with how to gather the data that it requires. The calling program needs only to access the attribute for the data to be returned. This is how business objects decouple the calling program (whether it be in R/3 or external to R/3) from the internals of R/3.
    The BOR lets you define multi-line attributes. These attributes define one-to-many relationships between an object and other fields. These objects can be defined in the data dictionary or can also be virtual attributes.
    An attribute that uniquely defines an object in the system is called a key attribute. In the case of a SalesOrder, the key attribute is VBAK-VBELN (the TableName and FieldName). It is not uncommon for an object to have several key fields. An example of this is object is the SalesArea (BUS000603) object type which has SalesOrganization (TVTA-VKORG), DistributionChannel (TVTA-VTWEG) and Division (TVTA-SPARTE) as key fields.
    Methods
    As mentioned earlier, the methods of an object represent the actions you take with objects attributes. An action in this example would include retrieving the status of one or more sales orders based on specific criteria. Methods are analogous to function modules in that they have importing and exporting parameters as well as exceptions, which you view by selecting a method and clicking on the toolbar button. This allows external systems (or internal developments) to pass and accept parameters from these methods just as if they were using function modules -- allowing external systems to call methods.
    In Figure 4, the methods shown with the green LED are BAPIs that are called specifically from external systems. They can, however, be called from within the system itself. The method shown with the stop sign is obsolete, but retained for backward compatibility, and should not be used in new developments.
    Methods of SalesOrder.
    Delegation and Subtyping
    One of the most complex concepts in object-oriented development is that of inheritance. This concept lets you extend core functionality by creating a child of the parent object that inherits all of its attributes and methods. For example, a Manager object is a subtype (child) of the Employee object. The Manager object has all the attributes of an Employee object (such as EmployeeID or Name) but also has some extra attributes (such as CompanyCar or ParkingSpace). SAP has not implemented inheritance in the BOR. However, it has provided subtyping and delegation, which offer an alternative way to extend R/3 functionality.
    Subtyping
    A subtype of an object is another object whose creation is based upon a parent object (see the preceding manager/employee example). The subtype maintains references to all the attributes and methods of its parent object. This means that any methods and attributes defined on the parent can be executed and accessed on the child object. I have often heard less-experienced developers refer to subtyping as copying the parent object. Although the effects can be similar, in order to achieve an understanding of some of the more advanced concepts, such as interface inheritance, it is important to realize that this is not accurate.
    If a subtype object were merely a copy of its parent, then all the code contained within the parent would be physically copied to the child. This is not the case. The subtype simply maintains references to its parents methods and attributes. The real difference is that the subtype lets you redefine these methods and attributes. You can easily add your own business rules to the parent methods by redefining the subtypes method. In the following example, I will show why this distinction is so important.
    Subtyping Case Study
    As an ABAP developer at Acme Tyres Pty. Ltd., you have been given the task of implementing some security measures for the companys online store. The requirement is simple: The password must be at least six characters long.
    Modifying SAP code leads to costly and complicated upgrades due to the modified code being overwritten by the newly delivered SAP code. Therefore, The challenge is finding a way of implementing the business logic without modifying SAP code.
    After some investigation, you realize that the method CHANGEPASSWORD (in BAPI) on the object KNA1 (Customer) is called when customers change their passwords. All you need to do is create a subtype of KNA1 and then redefine the CHANGEPASSWORD method adding the ABAP code to ensure that the password is a minimum of six characters long. It is of course not wise to change SAP code even assuming you have the passwords, which can be provided only be SAP. After the method is redefined, you just need to implement the business rules in ABAP.
    FIGURE 5 Redefinition of ChangePassword method.
    It is imperative that once you redefine the method it still behaves in a similar manner. You are allowed to add extra business logic, but the method must still change the password rather than do something unexpected, like delete a customer. This is particularly important when SAP is being accessed from external systems. The external system will expect a method to provide certain functionality. The developer should take care to ensure that this expectation is met.
    Delegation
    Now that you have implemented a new CHANGEPASSWORD method, you need to tell the SAP system to use the redefined version of CHANGEPASSWORD and not the version that was delivered on the KNA1 object. This is similar to object-oriented inheritance but the two concepts do have fundamental differences.
    Delegation for objects.
    By making an entry in the delegation table, you tell R/3 that before executing a method on KNA1, it should first check if that method has been redefined on the subtype. If it has, then the system executes the redefined method . If it hasn't, then the system executes the original method. Figure 7 illustrates this process.
    Execution flow for methods with delegation.
    This delegation is powerful because it lets you implement your own business logic without modifying any SAP code. As long as the objects are properly delegated, your method will be executed.
    Responsibility
    So far I have shown you two major components of an object, its attributes and methods. The difficulty in SAP is that it has traditionally been a data-driven, procedural-development approach. The BOR is not well understood by developers and managers and thus it is shunned by those that stand to gain the most from it. If managers and developers alike would take a formalized approach to development using business objects, significant savings in the development, testing, and maintenance phases would be achieved. This is due to the high level of re-use that business objects encourage.
    Having said this, when a powerful tool is put into the hands of an inexperienced person, chaos can (and usually does) ensue. If object-oriented design principals are not adhered to, then the resulting code has poor reusability and maintainability. Although an in-depth discussion of design issues is beyond the scope of this article, I will introduce in the following section one of the more fundamental design aspects of BOR programming: Responsibility.
    When you are given the task of creating a method or attribute on an object, one of the most important questions you should ask is, Does this attribute or method belong on this object? This question is fundamental to an object-oriented design and the answer can make a world of difference. Answering this question incorrectly has detrimental effects on the development effort resulting in methods and attributes strewn across myriad objects, with no coherent structure. If the methods and attributes were strewn across several objects, it would be more difficult to provide a uniform interface to external systems. If an external system wants to execute a particular business process in R/3, it may need to access several business objects, thus increasing coupling and reducing the layer of abstraction between R/3 and the external system.
    Lets take, for example, the requirement to be able to update a sales order. This is a common requirement and one that SAP usually implements for you. For the sake of the example, lets assume that SAP has not implemented this method. You will need to implement your own UPDATE method on one of the business objects. The question here is: Which object? This question is what I term as defining responsibility. Which object is responsible for having the UPDATE method on it? As shown in Figure 4, the answer in this cases is BUS2032 (SalesOrder). If you put it on any other object then you run the risk of no one else knowing of its existence. Next time there is a requirement to update a sales order, the developer will develop an additional method. You would then have two separate pieces of code that implement the same functionality. This duplication doubles development, testing, and maintenance requirements. On large projects, this can become a real problem and a maintenance and testing nightmare.
    SAP recognizes the challenges facing developers in the e-business era. It is aware that if it wants to take R/3 to the next phase, it needs to continue evolving the ABAP language and ensure that powerful development tools are available to SAP developers.
    Rising to the challenge, SAP has begun developing extensions to the ABAP language called ABAP objects (see "Introducing ABAP Objects," in the IntelligentERP feature archive for an excellent introductory article to ABAP objects by Jürgen Heymann and Horst Keller). These extensions will provide ABAP developers with a full range of object-oriented tools. Eventually, these new extensions will make BOR obsolete. However, the use of object-oriented development is sure to be an integral part of future SAP developments, regardless of where the world of e takes us.
    Reward points
    Regards

  • XMLType column based on XML Schema: several questions

    Hi,
    I've a table on an oracle db version 10.1.0.4 where I stage the xml files containing orders created on a third party's system using BizTalk.
    Although the storage I opted for is based on an XML Schema, defined by this third-party, I am facing big perfomance issues with files bigger than a few hundreds of kBs.
    For instance, a 32Mb file takes more than 2 hours to be processed.
    Now, after reading other threads in this forum and the documentation, my understanding of the problem is that the whole issue is with the correct indexing of the nested tables.
    Here is my current XML Schema definition:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
                   xmlns:xs="http://www.w3.org/2001/XMLSchema"
                   xmlns:xdb="http://xmlns.oracle.com/xdb"
                   elementFormDefault="qualified"
                   attributeFormDefault="unqualified"
                   xdb:storeVarrayAsTable="true">
         <xs:include schemaLocation="private/Types.xsd"/>
         <xs:element name="PickData">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ProdRun">
                             <xs:complexType xdb:maintainDOM="false">
                                  <xs:sequence>
                                       <xs:element name="Nr" type="xs:int"/>
                                       <xs:element name="Date" type="string8"/>
                                       <xs:element name="Final" type="xs:int"/>
                                       <xs:element name="PickWave" maxOccurs="unbounded">
                                            <xs:complexType xdb:maintainDOM="false">
                                                 <xs:sequence>
                                                      <xs:element name="Nr" type="string10"/>
                                                      <xs:element name="ProdLine" type="string2"/>
                                                      <xs:element name="TourSeq" type="xs:int"/>
                                                      <xs:element name="Tour" type="string20"/>
                                                      <xs:element name="Customer" maxOccurs="unbounded">
                                                           <xs:complexType xdb:maintainDOM="false">
                                                                <xs:sequence>
                                                                     <xs:element name="Seq" type="string20"/>
                                                                     <xs:element name="Cust" type="string10"/>
                                                                     <xs:element name="Mod" type="string30"/>
                                                                     <xs:element name="Tod" type="string30"/>
                                                                     <xs:element name="InvOrder" maxOccurs="unbounded">
                                                                          <xs:complexType xdb:maintainDOM="false">
                                                                               <xs:sequence>
                                                                                    <xs:element name="Nr" type="string20"/>
                                                                                    <xs:element name="Item" type="string20"/>
                                                                                    <xs:element name="Qty" type="xs:int"/>
                                                                                    <xs:element name="Priority" type="xs:int"/>
                                                                                    <xs:element name="Reordering" type="xs:int"/>
                                                                                    <xs:element name="DelDate" type="string8"/>
                                                                                    <xs:element name="HlOrder" type="string20"/>
                                                                               </xs:sequence>
                                                                          </xs:complexType>
                                                                          <xs:unique name="InvOrderKey">
                                                                               <xs:selector xpath="InvOrder"/>
                                                                               <xs:field xpath="Nr"/>
                                                                          </xs:unique>
                                                                     </xs:element>
                                                                </xs:sequence>
                                                           </xs:complexType>
                                                           <xs:unique name="CustomerKey">
                                                                <xs:selector xpath="Customer"/>
                                                                <xs:field xpath="Seq"/>
                                                           </xs:unique>
                                                      </xs:element>
                                                 </xs:sequence>
                                            </xs:complexType>
                                            <xs:unique name="PickWaveKey">
                                                 <xs:selector xpath="PickWave"/>
                                                 <xs:field xpath="Nr"/>
                                            </xs:unique>
                                       </xs:element>
                                  </xs:sequence>
                             </xs:complexType>
                             <xs:unique name="ProdRunKey">
                                  <xs:selector xpath="ProdRun"/>
                                  <xs:field xpath="Nr"/>
                             </xs:unique>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Here is the included sub-schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <xsd:simpleType name="string2">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="2"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string5">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="5"/>
    </xsd:restriction>
    </xsd:simpleType>
              <xsd:simpleType name="string6">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="6"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string8">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="8"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string10">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="10"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string15">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="15"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string20">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="20"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string30">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="30"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string40">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="40"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string50">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string250">
                   <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="250"/>
                   </xsd:restriction>
              </xsd:simpleType>
         </xsd:schema>
    The statement for creating my table is
    CREATE TABLE "XML_ORDERS"
    ("ID" NUMBER(7,0) NOT NULL ENABLE,
    "XMLFILE" "SYS"."XMLTYPE" ,
    "INSERTED" DATE DEFAULT sysdate,
    CONSTRAINT "XML_ORDERS_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
    ) XMLTYPE COLUMN XMLFILE STORE AS OBJECT RELATIONAL
    XMLSCHEMA "private/PickData.xsd" ELEMENT "PickData"
    Here is a simple instance document:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <PickData xsi:noNamespaceSchemaLocation="private/PickData.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ProdRun>
    <Nr>5</Nr>
    <Date>15112005</Date>
    <Final>1</Final>
    <PickWave>
    <Nr>IPW0000017</Nr>
    <ProdLine>01</ProdLine>
    <TourSeq>1</TourSeq>
    <Tour>00000043_078</Tour>
    <Customer>
    <Seq>5</Seq>
    <Cust>100000006</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000457</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000742</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000459</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000742</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>6</Seq>
    <Cust>100000013</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000461</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000743</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000463</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000743</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>2</Seq>
    <Cust>100000114</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000465</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000744</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000467</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000744</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>3</Seq>
    <Cust>100000140</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000469</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000745</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000471</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000745</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>7</Seq>
    <Cust>100000143</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000473</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000746</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000475</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000746</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>8</Seq>
    <Cust>100000145</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000477</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000747</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000479</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000747</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>9</Seq>
    <Cust>100000146</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000481</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000748</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000483</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000748</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>4</Seq>
    <Cust>100000147</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000485</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000750</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000487</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000750</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>10</Seq>
    <Cust>100000148</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000489</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000751</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000491</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000751</HlOrder>
    </InvOrder>
    </Customer>
    </PickWave>
    </ProdRun>
    </PickData>
    When I registered the XMLSchema, the following types and tables were automatically created and you can see the hierarchy below:
    (by the way, I could not find any xdb_utilities.printNestedTables mentioned elsewhere)
    XML_ORDERS
    |_PickData381_T
    |___ProdRun382_T
    |_____PickWave388_COLL
    |_______PickWave383_T
    |_________Customer387_COLL
    |___________Customer384_T
    |_____________InvOrder386_COLL
    These objects are then used in the following nested tables:
    TABLE_NAME     TABLE_TYPE_NAME     PARENT_TABLE_NAME     PARENT_TABLE_COLUMN
    SYS_NTaK/5zar5S0WitSsgu6OKPQ==     PickWave388_COLL     PickData389_TAB     "XMLDATA"."ProdRun"."PickWave"
    SYS_NTf6QvwVm8SFKz+K/YYWq+WQ==     Item408_COLL     ProdData409_TAB     "XMLDATA"."Item"
    SYS_NTtu05ilrRQqmuEN4k+07VDA==     Customer402_COLL     OutboundParty403_TAB     "XMLDATA"."Customer"
    SYS_NTK6fhWq5uTJ+vKcgBpNm1Fg==     InvOrder386_COLL     SYS_NTIIzv7bkXQSSS43igtfi5eg==     InvOrder
    SYS_NTIIzv7bkXQSSS43igtfi5eg==     Customer387_COLL     SYS_NTaK/5zar5S0WitSsgu6OKPQ==     Customer
    I enabled sql tracing and I got the following TKPROF output
    INSERT INTO IMP_ORDERS (PICK_INVORDERNR, PICK_ITEM, PICK_QTY, PICK_PRIORITY,
    PICK_REORDERING, PICK_HLORDER, PICK_DELDATE, PICK_CUST, PICK_MOD, PICK_TOD,
    PICK_SEQ, PICK_PICKWAVENR, PICK_PICKWAVEPRODLINE, PICK_PICKWAVETOUR,
    PICK_PICKWAVETOURSEQ, PICK_ORDKEY, PICK_RUNKEY) SELECT INVORDERNR, ITEM,
    QTY, PRIORITY, REORDERING, HLORDER, DELDATE, CUST, MOD, TOD, SEQ,
    PICKWAVENR, PICKWAVEPRODLINE, PICKWAVETOUR, PICKWAVETOURSEQ, ROWNUM AS
    PICK_ORDKEY, PRODRUNID FROM (SELECT /*+ cardinality(g 15)*/
    EXTRACTVALUE(VALUE(G), '/InvOrder/Nr') AS INVORDERNR, EXTRACTVALUE(VALUE(G),
    '/InvOrder/Item') AS ITEM, EXTRACTVALUE(VALUE(G), '/InvOrder/Qty') AS QTY,
    EXTRACTVALUE(VALUE(G), '/InvOrder/Priority') AS PRIORITY,
    EXTRACTVALUE(VALUE(G), '/InvOrder/Reordering') AS REORDERING,
    EXTRACTVALUE(VALUE(G), '/InvOrder/HlOrder') AS HLORDER,
    TO_DATE(EXTRACTVALUE(VALUE(G), '/InvOrder/DelDate'),'DDMMYYYY') AS DELDATE,
    F.CUST, F.MOD, F.TOD, F.SEQ, F.PICKWAVENR, F.PICKWAVEPRODLINE,
    F.PICKWAVETOUR, F.PICKWAVETOURSEQ, F.PRODRUNNR, F.PRODRUNDATE,
    F.PRODRUNFINAL, F.PRODRUNID FROM (SELECT /*+ cardinality(e 60)*/VALUE(E) AS
    CUSTOMERNODE, EXTRACTVALUE(VALUE(E), '/Customer/Cust') AS CUST,
    EXTRACTVALUE(VALUE(E), '/Customer/Mod') AS MOD, EXTRACTVALUE(VALUE(E),
    '/Customer/Tod') AS TOD, TO_NUMBER(EXTRACTVALUE(VALUE(E), '/Customer/Seq'))
    AS SEQ, D.PICKWAVENR, D.PICKWAVEPRODLINE, D.PICKWAVETOUR, D.PICKWAVETOURSEQ,
    D.PRODRUNNR, D.PRODRUNDATE, D.PRODRUNFINAL, D.PRODRUNID FROM (SELECT /*+
    cardinality(c 100)*/VALUE(C) AS PICKWAVENODE, EXTRACTVALUE(VALUE(C),
    '/PickWave/Nr') AS PICKWAVENR, TO_NUMBER(EXTRACTVALUE(VALUE(C),
    '/PickWave/ProdLine')) AS PICKWAVEPRODLINE, EXTRACTVALUE(VALUE(C),
    '/PickWave/Tour') AS PICKWAVETOUR, TO_NUMBER(EXTRACTVALUE(VALUE(C),
    '/PickWave/TourSeq')) AS PICKWAVETOURSEQ, A.PRODRUNNR, A.PRODRUNDATE,
    A.PRODRUNFINAL, A.PRODRUNID FROM (SELECT /*+ cardinality(b 1)*/VALUE(B) AS
    PRODRUNNODE, EXTRACTVALUE(VALUE(B), '/ProdRun/Nr') AS PRODRUNNR,
    TO_DATE(EXTRACTVALUE(VALUE(B), '/ProdRun/Date'),'DDMMYYYY') AS PRODRUNDATE,
    EXTRACTVALUE(VALUE(B), '/ProdRun/Final') AS PRODRUNFINAL, X.ID PRODRUNID
    FROM XML_ORDERS X, TABLE(XMLSEQUENCE(EXTRACT(X.XMLFILE,'/PickData/ProdRun'))
    ) B WHERE X.ID = :B1 ) A, TABLE(XMLSEQUENCE(EXTRACT(A.PRODRUNNODE,
    '/ProdRun/PickWave'))) C ) D, TABLE(XMLSEQUENCE(EXTRACT(D.PICKWAVENODE,
    '/PickWave/Customer'))) E ) F, TABLE(XMLSEQUENCE(EXTRACT(F.CUSTOMERNODE,
    '/Customer/InvOrder'))) G ORDER BY PICKWAVEPRODLINE, PICKWAVETOURSEQ,
    PICKWAVENR, SEQ )
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 4324.09 9994.65 0 57193 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 4324.09 9994.65 0 57193 0 0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 68 (recursive depth: 1)
    Rows Row Source Operation
    0 COUNT (cr=0 pr=0 pw=0 time=180 us)
    0 VIEW (cr=0 pr=0 pw=0 time=166 us)
    0 SORT ORDER BY (cr=0 pr=0 pw=0 time=152 us)
    40866 NESTED LOOPS (cr=54973 pr=0 pw=0 time=31065606 us)
    1363 NESTED LOOPS (cr=54937 pr=0 pw=0 time=11037183 us)
    1 NESTED LOOPS (cr=54889 pr=0 pw=0 time=10145883 us)
    1 NESTED LOOPS (cr=54841 pr=0 pw=0 time=9799012 us)
    1 TABLE ACCESS BY INDEX ROWID XML_ORDERS (cr=2 pr=0 pw=0 time=222 us)
    1 INDEX UNIQUE SCAN XML_ORDERS_PK (cr=1 pr=0 pw=0 time=126 us)(object id 58551)
    1 COLLECTION ITERATOR PICKLER FETCH (cr=54839 pr=0 pw=0 time=9798748 us)
    1 COLLECTION ITERATOR PICKLER FETCH (cr=48 pr=0 pw=0 time=346818 us)
    1363 COLLECTION ITERATOR PICKLER FETCH (cr=48 pr=0 pw=0 time=870830 us)
    40866 COLLECTION ITERATOR PICKLER FETCH (cr=36 pr=0 pw=0 time=18739302 us)
    Note that I cancelled this operation before it was over so I imagine that these figures refer to the statistics as of the time when the operation was interrupted.
    So, here are finally my questions.
    In order to create the constraints on the nested tables as shown in other threads, do I need to drop the existing xml_orders table and ancillary object types and recreate them or is there a way to add such constraints using the existing system generated object names?
    Secondly, the xml_orders table may contain severale documents, not just one and his current primary key is the column ID. So, in order to uniquely identify the deepest element in the xml document, I need first to select the relevant document by means of the id column.
    Would it be better to create the indexes containing this id column together with the nested_table_id and array_index?
    Thanks for you help.
    Flavio
    PS: I wrote a 10 lines xsl transformation that I passed on to Saxon together with the 32Mb file. It took less than 1 minute to produce a flat file that was loaded almost instantly by SQL*Loader. So, what I am looking for is a procedure loading this stuff in less than 2 minutes or possibly less.

    Does the following help
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:53 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool registerSchema_&4..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> declare
      2    result boolean;
      3  begin
      4    result := dbms_xdb.createResource('/home/&1/xsd/&4',
      5                                      bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
      6  end;
      7  /
    old   4:   result := dbms_xdb.createResource('/home/&1/xsd/&4',
    new   4:   result := dbms_xdb.createResource('/home/OTNTEST/xsd/GetaxTypes.xsd',
    old   5:                                    bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
    new   5:                                    bfilename(USER,'GetaxTypes.xsd'),nls_charset_id('AL32UTF8'));
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaURL => '&3',
      5      schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
      6      local     => TRUE,
      7      genTypes  => TRUE,
      8      genBean   => FALSE,
      9      genTables => &5
    10    );
    11  end;
    12  /
    old   4:     schemaURL => '&3',
    new   4:     schemaURL => 'private/GetaxTypes.xsd',
    old   5:     schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
    new   5:     schemaDoc => xdbURIType('/home/OTNTEST/xsd/GetaxTypes.xsd').getClob(),
    old   9:     genTables => &5
    new   9:     genTables => TRUE
    PL/SQL procedure successfully completed.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:55 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool registerSchema_&4..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> declare
      2    result boolean;
      3  begin
      4    result := dbms_xdb.createResource('/home/&1/xsd/&4',
      5                                      bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
      6  end;
      7  /
    old   4:   result := dbms_xdb.createResource('/home/&1/xsd/&4',
    new   4:   result := dbms_xdb.createResource('/home/OTNTEST/xsd/PickData.xsd',
    old   5:                                    bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
    new   5:                                    bfilename(USER,'PickData.xsd'),nls_charset_id('AL32UTF8'));
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaURL => '&3',
      5      schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
      6      local     => TRUE,
      7      genTypes  => TRUE,
      8      genBean   => FALSE,
      9      genTables => &5
    10    );
    11  end;
    12  /
    old   4:     schemaURL => '&3',
    new   4:     schemaURL => 'private/PickData.xsd',
    old   5:     schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
    new   5:     schemaDoc => xdbURIType('/home/OTNTEST/xsd/PickData.xsd').getClob(),
    old   9:     genTables => &5
    new   9:     genTables => TRUE
    PL/SQL procedure successfully completed.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:58 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool createTable.log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> CREATE TABLE "XML_ORDERS"
      2     ("ID" NUMBER(7,0) NOT NULL ENABLE,
      3      "XMLFILE" "SYS"."XMLTYPE" ,
      4      "INSERTED" DATE DEFAULT sysdate,
      5       CONSTRAINT "XML_ORDERS_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
      6     ) XMLTYPE COLUMN XMLFILE STORE AS OBJECT RELATIONAL
      7       XMLSCHEMA "private/PickData.xsd"
      8       ELEMENT "PickData"
      9           VARRAY XMLFILE."XMLDATA"."ProdRun"."PickWave" STORE AS TABLE PickWave_TAB
    10             (
    11                ( primary key (nested_table_id, array_index)
    12                ) organization index overflow
    13                VARRAY "Customer" STORE AS TABLE Customer_TAB
    14                  (
    15                    (primary key (nested_table_id, array_index)
    16                    ) organization index overflow
    17                    VARRAY "InvOrder" STORE AS TABLE InvOrder_TAB
    18                      (
    19                        (primary key (nested_table_id, array_index)
    20                        ) organization index overflow
    21                      )
    22                  )
    23            )
    24  /
    Table created.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:59 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool insertFile_&3..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> set long 10000
    SQL> --
    SQL> insert into XML_ORDERS (ID, XMLFILE) values (&4, xmltype(bfilename(USER,'&3'),nls_charset_id('AL32UTF8')))
      2  /
    old   1: insert into XML_ORDERS (ID, XMLFILE) values (&4, xmltype(bfilename(USER,'&3'),nls_charset_id('AL32UTF8')))
    new   1: insert into XML_ORDERS (ID, XMLFILE) values (10, xmltype(bfilename(USER,'testcase.xml'),nls_charset_id('AL32UT
    8')))
    1 row created.
    Elapsed: 00:00:00.11
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:59 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool testcase.log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> set long 10000
    SQL> set pages 0 lines 140
    SQL> --
    SQL> -- Testcase code here
    SQL> --
    SQL> set autotrace on explain
    SQL> --
    SQL> create or replace view PROD_RUN_VIEW
      2  (
      3    PRODRUNNODE,
      4    PRODRUNNR,
      5    PRODRUNDATE,
      6    PRODRUNID,
      7    PRODRUNFINAL
      8  )
      9  as
    10  select EXTRACT(XMLFILE,'/PickData/ProdRun'),
    11         EXTRACTVALUE(XMLFILE , '/PickData/ProdRun/Nr'),
    12         TO_DATE(EXTRACTVALUE(XMLFILE, '/PickData/ProdRun/Date'),'DDMMYYYY'),
    13         ID,
    14         EXTRACTVALUE(XMLFILE,'/PickData/ProdRun/Final')
    15    from XML_ORDERS
    16  /
    View created.
    Elapsed: 00:00:00.09
    SQL> create or replace view PICK_WAVE_VIEW
      2  (
      3    PICKWAVENODE,
      4    PICKWAVENR,
      5    PICKWAVEPRODLINE,
      6    PICKWAVETOUR,
      7    PICKWAVETOURSEQ,
      8    PRODRUNNR,
      9    PRODRUNDATE,
    10    PRODRUNID,
    11    PRODRUNFINAL
    12  )
    13  as
    14  select value(PW),
    15         extractValue(value(PW),'/PickWave/Nr'),
    16         TO_NUMBER(EXTRACTVALUE(value(PW),'/PickWave/ProdLine')),
    17         extractValue(value(PW),'/PickWave/Tour'),
    18         TO_NUMBER(extractValue(value(PW),'/PickWave/TourSeq')),
    19         PRODRUNNR,
    20         PRODRUNDATE,
    21         PRODRUNID,
    22         PRODRUNFINAL
    23    FROM PROD_RUN_VIEW, table(xmlsequence(extract(PRODRUNNODE,'/ProdRun/PickWave'))) PW
    24  /
    View created.
    Elapsed: 00:00:00.09
    SQL> create or replace view CUSTOMER_VIEW
      2  (
      3    CUSTOMERNODE,
      4    CUST,
      5    MOD,
      6    TOD,
      7    SEQ,
      8    PICKWAVENR,
      9    PICKWAVEPRODLINE,
    10    PICKWAVETOUR,
    11    PICKWAVETOURSEQ,
    12    PRODRUNNR,
    13    PRODRUNDATE,
    14    PRODRUNFINAL,
    15    PRODRUNID
    16  )
    17  as
    18  select value(CUST),
    19         EXTRACTVALUE(VALUE(CUST), '/Customer/Cust'),
    20         EXTRACTVALUE(VALUE(CUST), '/Customer/Mod'),
    21         EXTRACTVALUE(VALUE(CUST), '/Customer/Tod'),
    22         TO_NUMBER(EXTRACTVALUE(VALUE(CUST), '/Customer/Seq')),
    23         PICKWAVENR,
    24         PICKWAVEPRODLINE,
    25         PICKWAVETOUR,
    26         PICKWAVETOURSEQ,
    27         PRODRUNNR,
    28         PRODRUNDATE,
    29         PRODRUNFINAL,
    30         PRODRUNID
    31    from PICK_WAVE_VIEW, table(xmlsequence(extract(PICKWAVENODE,'/PickWave/Customer'))) CUST
    32  /
    View created.
    Elapsed: 00:00:00.10
    SQL>
    SQL> create or replace view INVOICE_ORDER_VIEW
      2  (
      3    INVORDERNR,
      4    ITEM,
      5    QTY,
      6    PRIORITY,
      7    REORDERING,
      8    HLORDER,
      9    DELDATE,
    10    CUST,
    11    MOD,
    12    TOD,
    13    SEQ,
    14    PICKWAVENR,
    15    PICKWAVEPRODLINE,
    16    PICKWAVETOUR,
    17    PICKWAVETOURSEQ,
    18    PRODRUNNR,
    19    PRODRUNDATE,
    20    PRODRUNFINAL,
    21    PRODRUNID
    22  )
    23  as
    24  SELECT EXTRACTVALUE(VALUE(INV), '/InvOrder/Nr'),
    25         EXTRACTVALUE(VALUE(INV), '/InvOrder/Item'),
    26         EXTRACTVALUE(VALUE(INV), '/InvOrder/Qty'),
    27         EXTRACTVALUE(VALUE(INV), '/InvOrder/Priority'),
    28         EXTRACTVALUE(VALUE(INV), '/InvOrder/Reordering'),
    29         EXTRACTVALUE(VALUE(INV), '/InvOrder/HlOrder'),
    30         TO_DATE(EXTRACTVALUE(VALUE(INV), '/InvOrder/DelDate'),'DDMMYYYY'),
    31         CUST,
    32         MOD,
    33         TOD,
    34         SEQ,
    35         PICKWAVENR,
    36         PICKWAVEPRODLINE,
    37         PICKWAVETOUR,
    38         PICKWAVETOURSEQ,
    39         PRODRUNNR,
    40         PRODRUNDATE,
    41         PRODRUNFINAL,
    42         PRODRUNID
    43   FROM CUSTOMER_VIEW, table(xmlsequence(extract(CUSTOMERNODE,'Customer/InvOrder'))) INV
    44  /
    View created.
    Elapsed: 00:00:00.13
    SQL> select * from INVOICE_ORDER_VIEW
      2  /
    IIO0000461           100000036                    20          1          0 CSO000743            15-NOV-05 100000013
    FO                             DDU                                     6 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000463           100000045                    20          1          0 CSO000743            15-NOV-05 100000013
    FO                             DDU                                     6 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000473           100000036                    20          1          0 CSO000746            15-NOV-05 100000143
    FO                             DDU                                     7 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000475           100000045                    20          1          0 CSO000746            15-NOV-05 100000143
    FO                             DDU                                     7 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000469           100000036                    20          1          0 CSO000745            15-NOV-05 100000140
    FO                             DDU                                     3 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000471           100000045                    20          1          0 CSO000745            15-NOV-05 100000140
    FO                             DDU                                     3 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000489           100000036                    20          0          0 CSO000751            15-NOV-05 100000148
    FO                             DDU                                    10 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000491           100000045                    20          1          0 CSO000751            15-NOV-05 100000148
    FO                             DDU                                    10 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000481           100000036                    20          0          0 CSO000748            15-NOV-05 100000146
    FO                             DDU                                     9 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000483           100000045                    20          1          0 CSO000748            15-NOV-05 100000146
    FO                             DDU                                     9 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000485           100000036                    20          0          0 CSO000750            15-NOV-05 100000147
    FO                             DDU                                     4 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000487           100000045                    20          1          0 CSO000750            15-NOV-05 100000147
    FO                             DDU                                     4 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000457           100000036                    20          1          0 CSO000742            15-NOV-05 100000006
    FO                             DDU                                     5 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000459           100000045                    20          1          0 CSO000742            15-NOV-05 100000006
    FO                             DDU                                     5 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000477           100000036                    20          1          0 CSO000747            15-NOV-05 100000145
    FO                             DDU                                     8 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000479           100000045                    20          1          0 CSO000747            15-NOV-05 100000145
    FO                             DDU                                     8 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000465           100000036                    20          1          0 CSO000744            15-NOV-05 100000114
    FO                             DDU                                     2 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000467           100000045                    20          1          0 CSO000744            15-NOV-05 100000114
    FO                             DDU                                     2 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    18 rows selected.
    Elapsed: 00:00:00.22
    Execution Plan
    Plan hash value: 1730223965
    | Id  | Operation                | Name              | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |                   |    18 | 10278 |   877   (0)| 00:00:11 |
    |   1 |  NESTED LOOPS            |                   |    18 | 10278 |   877   (0)| 00:00:11 |
    |   2 |   NESTED LOOPS           |                   |    18 |  8424 |   841   (0)| 00:00:11 |
    |   3 |    MERGE JOIN CARTESIAN  |                   |    18 |  4680 |   805   (0)| 00:00:10 |
    |   4 |     TABLE ACCESS FULL    | XML_ORDERS        |     1 |    67 |     3   (0)| 00:00:01 |
    |   5 |     BUFFER SORT          |                   |    18 |  3474 |   802   (0)| 00:00:10 |
    |   6 |      INDEX FAST FULL SCAN| SYS_IOT_TOP_64187 |    18 |  3474 |   802   (0)| 00:00:10 |
    |*  7 |    INDEX UNIQUE SCAN     | SYS_IOT_TOP_64185 |     1 |   208 |     2   (0)| 00:00:01 |
    |*  8 |     INDEX RANGE SCAN     | SYS_C008783       |     1 |       |     0   (0)| 00:00:01 |
    |*  9 |   INDEX UNIQUE SCAN      | SYS_IOT_TOP_64183 |     1 |   103 |     2   (0)| 00:00:01 |
    |* 10 |    INDEX RANGE SCAN      | SYS_C008785       |     1 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       7 - access("NESTED_TABLE_ID"="CUSTOMER_TAB"."SYS_NC0000800009$")
       8 - access("NESTED_TABLE_ID"="CUSTOMER_TAB"."SYS_NC0000800009$")
       9 - access("NESTED_TABLE_ID"="PICKWAVE_TAB"."SYS_NC0000800009$")
           filter("NESTED_TABLE_ID"="XML_ORDERS"."SYS_NC0001000011$")
      10 - access("NESTED_TABLE_ID"="PICKWAVE_TAB"."SYS_NC0000800009$")
    Note
       - dynamic sampling used for this statement
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    C:\oracle\xdb\otn\347125>You were sequencing the ProdRun node, which is a mistake. Only nodes which occur multiple times should be sequenced...

  • Is there any need to create schema in unvierse designer of business objects

    HI this is sridhar
    is there any need to create schema in unvierse designer of business objects xi r2,  when i integrated sap bi data into business objects,i,e i have fetched sap-bi/bw data to business objects universe
    please help me

    I don't see what is wrong with
    <jsp:useBean id="tabsConfigurator" class="com.mypackage.TabLayoutConfiguratorImpl"/>
    The class has a no-args constructor at least. The useBean tag will work with it. Probably.
    But still, some code just can't be translated into scriptless JSTL.
    Calling methods which take parameters is one of those things.
    In this case you probably want to write a custom tag to work with your tabs
    I would probably look at using custom tags like this:
    <%@ taglib prefix="tab" uri="/WEB-INF/TabLayout.tld"%>
    // tab to create the configurator.
    // either export it as a var, or use other tags only nested within this one
    // so you can get access to the configurator.
    <tab:configure var="configurator">
      <tab:render configurator="${configurator}" tab="${tab}">
    </tab:configure>I don't know exactly what the scriptlet code will be doing. But I think a custom taglib would be the only way to eliminate scriptlet code that you have here.

  • How to create XML string from BPM Business Object?

    Hello,
    I have a business object in my BPM project and I need to transform it in a XML string:
    From:
    Business Object: Customer
    Properties:          Name, Age
    To:
    "<Customer><Name>Robert</Name><Age>17</Age></Customer>"
    How can I do this?
    Thanks.

    Hello,
    I have a business object in my BPM project and I need to transform it in a XML string:
    From:
    Business Object: Customer
    Properties:          Name, Age
    To:
    "<Customer><Name>Robert</Name><Age>17</Age></Customer>"
    How can I do this?
    Thanks.

Maybe you are looking for