XPATH - navigating to a specific repeatable elements value

Hi out there!
Currently I have a problem in evaluating some XPath for a bunch of corresponding node sets. Maybe someone can help me.
I would like to get the field value of the bold market field ( 2 ) in just that CargoSet.
The only things I will know from the start are, as the file will be generated automatically:
- name: OverallSet
- name: CargoSet
- name: field1
I dont know how to cope with it yet.
There are just 4 things, u should keep in mind:
* Segment1 is repeatable n times
* CargoSet can be repeated in Segment1 n times
* Every CargoSet contains field1 exactly 1 time
* the name of Segment1 is unknown
I would be glad, if someone could help me going on... Or is XPATH totally underpowered for that demands, as there can be no iterative processes build in XPATH?
Thanks in advance!
Jens
<?xml version="1.0" encoding="UTF-8"?>
<OverallSet>
                <Segment1>
                                <CargoSet>
                                               <field1>1</field1>
                                               <field2>Y</field2>
                                               <field3>X</field3>
                                               <field4/>
                                </CargoSet>
                                <CargoSet>
                                               <field1>2</field1>
                                               <field2>A</field2>
                                               <field3>B</field3>
                                               <field4/>
                                </CargoSet>
                                <CargoSet>
                                                <field1>3</field1>
                                                <field2/>
                                                <field3>Q</field3>
                                                <field4/>
                               </CargoSet>
               </Segment1>
               <Segment1>
                                <CargoSet>
                                                <field1>1</field1>
                                                <field2>L</field2>
                                                <field3>M</field3>
                                                <field4/>
                               </CargoSet>
                                <CargoSet>
                                                 <field1>2</field1>
                                                 <field2>K</field2>
                                                 <field3>A</field3>
                                                 <field4>S</field4>
                               </CargoSet>
               </Segment1>
</OverallSet>

//Specify the variable Segment1
String Segment1=argv[0];
the field 1 in the second CargoSet of the first Segment1
String xpath="/OverallSet/"+Segment1+"[1]"+"/CargoSet[2]/field1";

Similar Messages

  • Values not populated in S_ALR_87012806 for a specific cost element

    Hi all,
    Postings made to specific cost element are not populated in report S_ALR_ 87012806. Can anyone throw some light on this?
    Thanks
    Shravan

    Hi Krishna
    I dont think "Cost Accounting > LIne Item" would work for Master Data
    You can use exit COOPA_01 (SMOD) > Include ZXAUFU08 (Part of EXIT_SAPLKOAU_002)... I have used this for similar purposes in the past
    Regards
    Ajay M
    Edited by: Ajay Maheshwari on Nov 12, 2010 12:45 PM

  • Identify individual elements in repeated elements in an XML document

    Hello,
    I'd like to identify individual elements in repeated elements in an XML document.
    For example a table 'dataXML' which has a column 'sample' (XMLType). If I have an XML document such as,
    <ELEMENT>
    <PO>
    <PONO>100</PONO>
    <PONO>200</PONO>
    </PO>
    </ELEMENT>
    I can use //PONO[1] to identify the first "PONO" element (with value 100) and //PONO[2] to identify the second "PONO" element in the document.
    If I write this query:
    select L.sample.extract('ELEMENT/PO/PONO/text()')).getStringVal()"SAMP"
    from dataXML L
    I'll receive this result:
    SAMP
    100200 (the first row)
    And if I write this query:
    select L.sample.extract('ELEMENT/PO/PONO[1]/text()')).getStringVal()"SAMP"
    from dataXML L
    I'll receive this result:
    SAMP
    100 (the first row)
    But I'd like the following result:
    SAMP
    100 (the first row)
    200 (the second row).
    Could you help me, please?
    Thank you very much.
    Melissa Lemos

    you have to use something like this.
    select extractvalue(xmltype_column, '/Name/@attributename')
    from table_name
    For more details see
    XMLDB Developers Guide (Oracle 9i)
    Chapter - XPATH and namespace Primer
    Table C2 - Location Path Examples Using Abbreviated Syntax.
    Page Number 907/1044
    Hope this helps.

  • Hide Repeated Key Values

    Dear BW experts,
    In the query properties >> on Display Tab within Display options, there is a check box to check or uncheck for "Hide Repeated Key Values".
    However to reflect these changes on portal, it is suggested on the following help.sap link that the query iview properties have to changed as well. (please see the note below the link)
    I just looked at the query's iview properties but couldnt find a particular property that seems to reflect this change.
    Which property on the iview needs to be changed to reflect the "Hide Repeated Key Values" property in BEx.
    Please advise...
    http://help.sap.com/saphelp_nw04s/helpdata/en/5b/30d43b0527a17be10000000a114084/frameset.htm
    Note: that the setting made to hide repeated key values when using the query as a data provider in Web applications is not evaluated. <b>You need to make the settings again in the property dialog box of the query view.</b> When the query is used in the BEx Analyzer, the settings you make here are taken into consideration.
    Thank you...

    Hi A.H.P,
    In the template, as u suggested, i noticed that the 'Suppress Repeated Texts' under 'Specific'tab <u><b>had</b></u> a checkmark already.
    I also tested it by removing the checkmark, still it's not giving the expected results.
    Current result:
    Sales ID_____Comp Code____Division code
    xxx_______________aaa_________111
    ______________________________000
    __________________yyy_________123
    ______________________________345
    Expected result:
    Sales ID_____Comp Code____Division code
    xxx_______________aaa_________111
    xxx_______________aaa_________000
    xxx_______________yyy_________123
    xxx_______________yyy_________345
    I got this in the BEx, but it's not reflecting the change in the portal. Please advise with any suggestions...
    Thank you....
    Message was edited by: Newyorker

  • Suppress Repeated Key Values in EP

    Hi Experts,
    In BEx, i am able to "Suppress Repeated Key Values" via Query Properties > Display Options.
    However, when i execute the same report in EP, and in the context menu (right click) of the query, choose Enhanced Menu > Query Property, there is no option for "Suppress Repeated Key Values". Why is this so? Is there a way for such?
    My client is requiring it, but their access is limited to EP.
    Kindly, provide assistance.
    Thank you very much.
    julius

    Hi Julius
    In the WAD, if you use the properties pane web item and set data binding to the analysis web item, when you run the report on the portal you should see the settings of the analysis (table), under Data Specific setting you can toggle the "Display Repeated Texts" option, this functionality is also available in the setting link in the 0ANALYSIS_PATTERN default web template.
    Hope this helps
    Josh

  • Help with XMLSEQUENCE and repeating elements

    I need help with the following XML extraction (note this is on Oracle9i). I have the following XML structure. There are multiple <Reading> elements
    <MeterReadings>
    <MeterReading>
    <Meter>
    <id>0004128190</id>
    <idType>METER_X_UNIVERSAL_ID</idType>
    </Meter>
    <Premise>
    <id>PREM4128190</id>
    <idType>X_CLIENT_PRMSE_ID</idType>
    </Premise>
    <Reading>
    <value>11111</value>
    <readingTypeId>CKWH</readingTypeId>
    </Reading>
    <Reading>
    <value>22222</value>
    <readingTypeId>KWHP</readingTypeId>
    </Reading>
    </MeterReading>
    </MeterReadings>
    I want to return one row for each <reading> element, including all its sub-elements - <value> and <readingTypeId>
    So, for the above data set, I would like to get back something like this. The parent elements can be repeated.
    <meter/id>,<Premise/id>,<Reading/value>,<Reading/readingTypeId>
    0004128190,PREM4128190,11111,CKWH
    0004128190,PREM4128190,22222,KWHP
    I have tried to use the XMLSequence function like this:
    select extractvalue(i.xml_message,'MeterReadings/MeterReading/Meter/id'),
    extractvalue(value(p),'value'), extractvalue(value(p),'readingTypeId')
    from myTable i,
    table(XMLSequence(
    extract(i._xml_message, '//Reading/*' ))) p
    But then I get results like this, where each sub-element results in a new row:
    0004128190     11111     null
    0004128190     null     CKWH
    0004128190     22222     null
    0004128190     null     KWHP
    What would be the proper XQuery?
    Thanks!

    This may help:
    http://www.dreamweaverresources.com/tutorials/pagebackgrounds/examplevert.htm
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    http://www.csstemplates.com.au
    http://www.perrelink.com.au
    CSS Tutorials for Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/css.html
    "teamkombat" <[email protected]> wrote in
    message
    news:ept196$d1g$[email protected]..
    > Hi I am trying to create a very simple effect where my
    page casts a
    > shadow. If
    > you take a look at
    http://www.timberland.com/home/index.jsp
    the left and
    > right
    > side of the page has a very light shadow. I would like
    to use a similar
    > effect. What I was thinking was to create 2 small .gifs
    with the shadow
    > effect
    > (1 for the left side and 1 for the right side) maybe
    10px long. Then
    > create 1
    > table with 3 columns: The middle collumn will be the
    main column for the
    > content and 2 thin/small columns on the left and right
    to attach the
    > shadow
    > .gifs.
    >
    > I was wondering how do I repeat this shadow .gif image
    for the length of
    > the
    > main column?
    >
    > Also if there is a better solution to the above problem
    please let me
    > know. I
    > have read about faux columns and using CSS for repeating
    images, but don't
    > really grasp the ideas yet. Thanks everyone for their
    time and help.
    >
    >

  • How to repeat elements within a xsl for multiple mapping

    Hi,
    My input xml is :
    <POC_XML xmlns="http://www.aaa.com/esb/abc/Item/POC/1.0">
    <POC_HEADER>
    <EVENT_NAME></EVENT_NAME>
    <EVENT_TYPE></EVENT_TYPE>
    <EVENT_KEY></EVENT_KEY>
    <SOURCE_SYSTEM></SOURCE_SYSTEM>
    <TARGET_SYSTEM></TARGET_SYSTEM>
    </POC_HEADER>
    <POC_DETAILS>
    <ITEM></ITEM>
    <GTIN></GTIN>
    <ITEM_</ITEM_SERIAL_NO>
    <UDI></UDI>
    <PRINTER_NAME></PRINTER_NAME>
    </POC_DETAILS>
    </POC_XML>
    The expected output xml is:
    <ns1:printSynch>
    <jobRequest>
    <printRequests>
    <templatePath>lib://poc/formats/material.btw</templatePath>
    <printData>
    <entry>
    <key>ITEM</key>
    <value>item1</value>
    </entry>
    <entry>
    <key>GTIN</key>
    <value>0123343T5432000A</value>
    </entry>
    <entry>
    <key>ITEM_SERIAL_NO</key>
    <value>S123345</value>
    </entry>
    <entry>
    <key>UDI</key>
    <value>U98765</value>
    </entry>
    </printData>
    <printQuantity>1</printQuantity>
    <duplicates>0</duplicates>
    </printRequests>
    <printerName>SamplePrinter</printerName>
    </jobRequest>
    <reference>abc:U98765</reference>
    </ns1:printSynch>
    Where as currently the target system has their xml exposed with only one of the <entry><key><value> instance but we need to repeat this instance and map as per the structure above. The <entry> node is capable of handling multiple values but how to tranform it within xsl.
    Please help

    Hi,
    Try using the below logic in xsl. It should work.
    <entry>
    <key>
    <xsl:value-of select="string('ITEM')" />
    </key>
    <value>
    <xsl:value-of select="Xpath corresponding to ITEM from source xsd"/>
    </value>
    </entry>
    <entry>
    <key>
    <xsl:value-of select="string('GTIN')" />
    </key>
    <value>
    <xsl:value-of select="Xpath corresponding to GTIN from source xsd"/>
    </value>
    </entry>
    <entry>
    <key>
    <xsl:value-of select="string('item serial no')" />
    </key>
    <value>
    <xsl:value-of select="Xpath corresponding to item serial no from source xsd"/>
    </value>
    </entry>
    Let me know incase any issues.
    Regards,
    Dhanumjay

  • Exception in assigning XML elements value in Workshop

    Hi ,
    I tried creating a variable of type XML object(OrderREsponse). I have one MB Publisher control which sends in a variable of type OrderResponse. Before sending it , I try setting the individual XML elements value in it. So, for all the individual elemtns , I set accordinglly in both the formats.
    responseXML.addNewOrderResponse().setOrderNumber("N12121212");
    responseXML.getOrderResponse().setOrderNumber("N12121212");
    where responseXML is a variable of type OrderResponse document.
    This place while executing I'm getting an exception.
    Here is the exception I'm getting.
    <Jan 4, 2005 10:51:11 AM MST> <Warning> <WLW> <000000> <Id=top-level; Method=com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration()
    ; Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Jan 4, 2005 10:51:12 AM MST> <Warning> <WLW> <000000> <A message was unable to be delivered from a WLW Message Queue. Attempting to deliver
    the onAsyncFailure event>
    Let me know if the approach is the right one... or how can i set the individual XML elements value from a XML variable.
    Thanks
    Ramesh

    Hi ,
    I tried creating a variable of type XML object(OrderREsponse). I have one MB Publisher control which sends in a variable of type OrderResponse. Before sending it , I try setting the individual XML elements value in it. So, for all the individual elemtns , I set accordinglly in both the formats.
    responseXML.addNewOrderResponse().setOrderNumber("N12121212");
    responseXML.getOrderResponse().setOrderNumber("N12121212");
    where responseXML is a variable of type OrderResponse document.
    This place while executing I'm getting an exception.
    Here is the exception I'm getting.
    <Jan 4, 2005 10:51:11 AM MST> <Warning> <WLW> <000000> <Id=top-level; Method=com.bea.wli.bpm.runtime.ProcessState.processNodeOrchestration()
    ; Failure=com.bea.wli.bpm.runtime.UnhandledProcessException: Unhandled process exception [ServiceException]>
    <Jan 4, 2005 10:51:12 AM MST> <Warning> <WLW> <000000> <A message was unable to be delivered from a WLW Message Queue. Attempting to deliver
    the onAsyncFailure event>
    Let me know if the approach is the right one... or how can i set the individual XML elements value from a XML variable.
    Thanks
    Ramesh

  • How to search and delete repeated elements in a vector

    Hi again,
    In a class of my application, it needs to check in a vector (A), if there are repeated elements, if it founds one, then it is replaced for a *. then the elements different from * are copied into a new vector(Aa). the code is the following:
    //here are defined the components Textfield, etc
    public void Bconj_Action(Object target)
              int idx = 0;
              int tokenCount;
              String var="";
              String var2="";
              String A[] = new String [50];
              String Aa[] = new String [50];
              String message = (TxtA.getText());
              StringTokenizer st = new StringTokenizer(message,",");
              tokenCount = st.countTokens();
              while (st.hasMoreTokens())
                   A[idx] = st.nextToken();
                   idx++;
              //Recorre vector A en busca de repetidos     
              for(int n=0;n<tokenCount-1;n++)
              for(int m=n+1;m<tokenCount;m++)
              if (A[m]==A[n] && A[n]!="*")
                   A[n]="*";
              //Recorre nuevamente el vector A buscando los diferente a * que seran copiados al vector Aa
              int o = 0;
              for (int n=1;n<tokenCount;n++)
              if(A[n]!="*")
              Aa[o]=A[n];
                   o++;
              for (int i=0;i<tokenCount; i++)
                        if (i==0){
                        var=Aa;}
                                  else{
                                  var = var + "," + Aa[i];}
                   TxtA.setText("");
                   TxtU.setText(var);
    when I run it, and I enter to the prog 1, it don't show me nothing, when I enter 1,1 it shows me 1,null and so on.
    do you have any ideas of what is happening.
    Thanks in advance.

    Two things I would point out to you:
    Its possible that the way you are comparing the Strings is causing a problem for you.
    if (A[m]==A[n] && A[n]!="*")
    A[n]="*";
    }A[m] and A[n] are two Strings so you should compare them using
    A[m].equals(A[n]).So the if statement should look like this:
    if (A[m].equals(A[n]) && !A[n].equals("*"))
    A[n]="*";
    }And second:
    When you copy the unique elements over to array Aa you may be copying less that tokenCount elements. You are actually copying o elements.
    The final for loop could be modified like this:
    for (int i=0;i<o; i++)
    if (i==0){
    var=Aa;}
    else{
    var = var + "," + Aa[i];}
    TxtA.setText("");
    TxtU.setText(var);
    } Thus it prints only the unique elements found rather than the whole array which may contain nulls.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem with ParseEscapedXML with " " in element value

    I'm having trouble with using getContentAsString, manipulating using a translate in a java embed, and then converting back using ParseEscapedXML. The trouble is occuring when there are "<" and ">" as element values. I'm not sure of a good way to convert the ">" to an escape value for only element values.
    I haven't been able to get the xsl:character-map function to work.
    Any tips would be greatly appreciated.

    HL7 is a flat file old style pipe and bar format for healthcare messaging. It has a section that lists the delimeters, which usually looks something like:
    MSH|^~\&|PMS|ASF|||200704200000||ADT^A04|1177045234.756.19114|P|2.4|||AL|AL
    Where the "&" is designated at the subcomponent separator. When Oracle's B2B tool parses the message and sticks it into an XML format it would break up the fields incorrectly if I had the customer put & lt ; in the flat file. I'm also trying to build a solution that is able to deal with this kind of issue without effecting the source feed.

  • Container element value late update in ECC6

    Hi All,
    I have a problem with container element "RECEIVED" which has incomplete value. I'm using function SAP_WAPI_READ_CONTAINER (simple container) in my custom object ZBUS2081 method priceapproval. When 2nd person want to approve the workitem, the container value of element name "RECEIVED" only has previous approval person instead of table that has 2 line values (previous person who has already approved and 2nd person who want to approve this workitem).
    We have upgrade our SAP version from 4.7 into ECC6/ERP6, which in 4.7 version this container element returned table of 2 line values.
    Since the container element value has late to update the value, then it did not recognise as a final approval at the end of workflow step and raise an error for agent determination. If there is any related SAP note, please let me know.
    Thanks,
    Charlie

    Hello Charlie !
                Your RECEIVED container stores approver details.
                Please check the binding between method container to task container to workflow container.Imperfect binding could be a reason why approver details are not populated properly.It seems your container is multiline container.Make sure the method,task and workflow containers are multiline enabled. 
               Check at SWO1, whether the PRICEAPPROVAL method behaves as expected and if you are using rule for agent determination, you have to check the rule at PFAC as well as binding details.Also check at workflow log.
                Hope you have delegated ZBUS2081.
    Regards,
    S.Suresh

  • How to call pl/sql function from element values

    EBS 11.5.10.2
    XMLP 5.6.3
    Hello,
    I noticed that the output of the rdf-to-data template conversion process makes use of an undocumented feature of data templates, and I would like to get input from experts as to which situations this feature is usable.
    The closest thing I can find in the documentation is a sample in the user guide. There is a "General Ledger Journals Data Template Example" that has a <dataStructure> section that contains <element> nodes which are NOT children of a <group> node. I can't find any explanation of this in the user guide.
    I've noticed from converted templates that in these un-grouped elements you can make calls to PL/SQL functions in the "value" attribute, like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>Has anyone had any success being able to call PL/SQL functions from grouped elements? Whenever I try, it doesn't seem to work.
    When I try something like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
        <element name="some_calculation"   value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
        <element name="some_calculation_b" value="XX_CUSTOMPROCS.SOME_FUNCTION_B(:Line_Num)"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>The <SOME_CALCULATION/> and <SOME_CALCULATION_B/> nodes come out empty in the output data xml file, but <C_CALCULATED_VALUE> would have a value as desired.

    ah - perfect. That makes sense. Thank you for the response!
    But what about when we need to pass parameters to those functions whos values are the results of aggregate element values?
    This happens a lot in the converted data templates, where pl/sql package functions are meant to replace formula columns from the original Oracle Report. Take this example from the conversion of ARXAGMW.rdf (Aging Report, 7 Buckets):
    (note the function call in the value of "Set_Percent_Inv_Inv" is using aggregate results from subgroups)
      <group name="G_INV_INV" dataType="varchar2" source="Q_Invoice">
        <element name="Total_Inv_Inv_Amt" function="sum" dataType="number" value="G_Invoice.C_Amt_Due_Rem_Inv"/>
        <element name="Total_Inv_Inv_B0" function="sum" dataType="number" value="G_Invoice.C_Inv_B0"/>
        <element name="Total_Inv_Inv_B1" function="sum" dataType="number" value="G_Invoice.C_Inv_B1"/>
        <element name="Total_Inv_Inv_B2" function="sum" dataType="number" value="G_Invoice.C_Inv_B2"/>
        <element name="Total_Inv_Inv_B3" function="sum" dataType="number" value="G_Invoice.C_Inv_B3"/>
        <element name="Total_Inv_Inv_B4" function="sum" dataType="number" value="G_Invoice.C_Inv_B4"/>
        <element name="Total_Inv_Inv_B5" function="sum" dataType="number" value="G_Invoice.C_Inv_B5"/>
        <element name="Total_Inv_Inv_B6" function="sum" dataType="number" value="G_Invoice.C_Inv_B6"/>
        <element name="Set_Percent_Inv_Inv"  dataType="number"  value="XX_CUSTOMPROCS.XXC_ARXAGMW.set_percent_inv_invformula(:Total_Inv_Inv_Amt, :Total_Inv_Inv_B0, :Total_Inv_Inv_B1, :Total_Inv_Inv_B2, :Total_Inv_Inv_B3, :Total_Inv_Inv_B4, :Total_Inv_Inv_B5, :Total_Inv_Inv_B6)"/>
        <element name="Sum_Percent_B0_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B0_Inv_p"/>
        <element name="Sum_Percent_B1_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B1_Inv_p"/>
        <element name="Sum_Percent_B2_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B2_Inv_p"/>
        <element name="Sum_Percent_B3_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B3_Inv_p"/>
        <element name="Sum_Percent_B4_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B4_Inv_p"/>
        <element name="Sum_Percent_B5_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B5_Inv_p"/>
        <element name="Sum_Percent_B6_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B6_Inv_p"/>
        <group name="G_Cust_Inv" dataType="varchar2" source="Q_Invoice">
          <group name="G_Site_Inv" dataType="varchar2" source="Q_Invoice">
            <group name="G_1" dataType="varchar2" source="Q_Invoice">
              <group name="G_Invoice" dataType="varchar2" source="Q_Invoice">
                <element name="C_Amt_Due_Rem_Inv" dataType="number" value="C_Amt_Due_Rem_Inv"/>
                <element name="C_Inv_B0" dataType="number" value="C_Inv_B0"/>
                <element name="C_Inv_B1" dataType="number" value="C_Inv_B1"/>
                <element name="C_Inv_B2" dataType="number" value="C_Inv_B2"/>
                <element name="C_Inv_B3" dataType="number" value="C_Inv_B3"/>
                <element name="C_Inv_B4" dataType="number" value="C_Inv_B4"/>
                <element name="C_Inv_B5" dataType="number" value="C_Inv_B5"/>
                <element name="C_Inv_B6" dataType="number" value="C_Inv_B6"/>
              </group>
            </group>
          </group>
        </group>
      </group>
      ...All of these groups and sub-groups are based on one single query, so I am not sure how I would move the function call into the query without changing the results of the function.
    In the example above, elements Sum_Percent_B0_Inv through Sum_Percent_B6_Inv grab the results of the calculation done in set_percent_inv_invformula. Here is the essence of that function:
      sum_percent_b0_inv := ROUND ((total_inv_inv_b0 / total_inv_inv_amt) * 100, 2);
      sum_percent_b1_inv := ROUND ((total_inv_inv_b1 / total_inv_inv_amt) * 100, 2);
      sum_percent_b2_inv := ROUND ((total_inv_inv_b2 / total_inv_inv_amt) * 100, 2);
      sum_percent_b3_inv := ROUND ((total_inv_inv_b3 / total_inv_inv_amt) * 100, 2);
      sum_percent_b4_inv := ROUND ((total_inv_inv_b4 / total_inv_inv_amt) * 100, 2);
      sum_percent_b5_inv := ROUND ((total_inv_inv_b5 / total_inv_inv_amt) * 100, 2);
      sum_percent_b6_inv := ROUND ((total_inv_inv_b6 / total_inv_inv_amt) * 100, 2);The only solution I can think of is to have separate queries, one for each subgroup, that do the "sum" in sql; but that seems terribly inefficient.

  • Hide Repeated Key Values Setting Not Saved

    Hi Experts,
    We are working on BI7. Currently we are changing the Query Properties to display Repeated Key Values. However, whenever we execute the reports, all repeated key values are still hidden. When we return to BEx Designer, the setting is reverted back. Please advise on why this is happening. I am pretty sure we have saved then execute the query.
    Any help is greatly appreciated.
    Thanks,
    Juice

    Its some problem with Bex I guess.
    Go to RSRT, give your query name and do "Generate report".
    Execute it in RSRT and check if its fine.
    If its fine in RSRT it should reflect in your analyzer too.
    Hope this helps.

  • How can I get the element value with namespace?

    I tried to get a element value in xml has namespace but i can't.
    I removed the namespace, i can get a element value.
    How can i get a element value with namespace?
    --1. Error ----------- xml ------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    *<TaxInvoice xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 http://www.kec.or.kr/standard/Tax/TaxInvoiceSchemaModule_1.0.xsd">*
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    --2. sucess ----------- xml ---------remove namespace---------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <TaxInvoice>
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    ---------- program ------------
    procedure insert_table
    l_clob clob,
    wellformed out boolean,
    error out varchar2
    is
    l_parser dbms_xmlparser.Parser;
    xmldoc xmldom.domdocument;
    l_doc dbms_xmldom.DOMDocument;
    l_nl dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    l_root DBMS_XMLDOM.domelement;
    l_node DBMS_XMLDOM.domnode;
    l_node2 DBMS_XMLDOM.domnode;
    l_text DBMS_XMLDOM.DOMTEXT;
    buf VARCHAR2(30000);
    xmlparseerror exception;
    TYPE tab_type is Table of xml_upload%ROWTYPE;
    t_tab tab_type := tab_type();
    pragma exception_init(xmlparseerror, -20100);
    l_node_name varchar2(300);
    begin
    l_parser := dbms_xmlparser.newParser;
    l_doc := DBMS_XMLDOM.newdomdocument;
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    l_n := dbms_xmldom.makeNode(l_doc);
    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');
    FOR cur_tax In 0..dbms_xmldom.getLength(l_nl) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl, cur_tax);
    t_tab.extend;
    t_tab(t_tab.last).ed_id := '5000000';
    dbms_xslprocessor.valueOf(l_n, 'IssueID/text()', t_tab(t_tab.last).tid_issue_id);
    dbms_xslprocessor.valueOf(l_n, 'TypeCode/text()', t_tab(t_tab.last).tid_type_code);
    END LOOP;
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO xml_upload VALUES t_tab(i);
    COMMIT;
    dbms_xmldom.freeDocument(l_doc);
    wellformed := true;
    exception
    when xmlparseerror then
    --xmlparser.freeparser(l_parser);
    wellformed := false;
    error := sqlerrm;
    end insert_table;

    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');try to change as follow
    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');Edited by: AlexAnd on Aug 17, 2011 12:36 AM

  • Show Repeated key values in Reports and Export Into Excel

    Hi Experts,
    Currently I am working on the BW3.5 version. Our client requirement to display the repeated key value in web and export same into excel. I have followed the steps in web template which mentioned below to achieve the requirement.
    1) In my web template, add the following line to the Template Properties object tag (the tag at the very top of the web template in HTML mode):<param name="SUPPRESS_REPETITION_TEXTS" value=""/>
    After the change web template change, Myself execute the report in web, Its fine web. But I export into excel, again the key values are suppressed. So I have followed the steps in query. Then its fine. I mean, I can export into excel with repeated key values.
    2) In my query, in Properties and on the Display tab, unchecked "Hide Repeated Key Values".
    But do we have any other option without changing query properties to achieve the requirement.. I am fine with the web template change("SUPPRESS_REPETITION_TEXTS"). But I do not want to change the query properties.
    Please help me to fix the issue. Thanks in advance.
    Thanks,
    RR

    Hi Experts,
    I have come across one of the suggestion in the below location. Could you plz help me to implement it.
    http://www.sapfans.com/forums/viewtopic.php?f=16&t=118185
    Suggestion:
    You can do exactly what you want, but it will take either a button changing the properties of the web item or a javascript function added to the context menu getting the properties of the table item and changing it to "X" or "". These are just two examples, there are other ways to do this. This is the actual code that sets the suppression for the repeated texts. Hope this helps.
    SAP_BW_URL item=âu20ACu2122TABLE_1âu20ACu2122 SUPPRESS_REPETITION_TEXTS=âu20ACu2122Xâu20ACu2122
    Thanks,
    RR

Maybe you are looking for