Unable to Count Nodes using ora:countNodes , the count is always 0
B2B is connected to BPEL , the xsd used for the given xml is :
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.example.org"
targetNamespace="http://www.example.org"
elementFormDefault="qualified">
<xsd:element name="Root">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Batch">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Warehouse" type="xsd:string"/>
<xsd:element name="BatchDate" type="xsd:integer"/>
<xsd:element name="Revision" type="xsd:string"/>
<xsd:element name="OnHand" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ItemCode" type="xsd:string"/>
<xsd:element name="SOH" type="xsd:integer"/>
<xsd:element name="Quarantine" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Count nodes function used by me is :
ora:countNodes('receive_InventoryReconcilliation_receive_InputVariable','body','/ns2:Root/ns2:Batch/ns2:OnHand/ns2:ItemCode')
or
ora:countNodes('receive_InventoryReconcilliation_receive_InputVariable','body','/ns2:Root/ns2:Batch/ns2:OnHand/ns2:ItemCode')
I have tried using countNodes in above two ways.
Inspite of that i always get count of nodes as 0.
How should i resolve this issue ?
Thanks in advance,
Sasmit
Edited by: Sasmit on Jun 6, 2011 6:09 AM
Hi Sasmit...
i was facing a same problem recently...i can see the B2B adaptor giving the file as input to my BPEL process but the count is coming as zero...then what i did was..i tried copying the value of an element in the input variable...i cannot copy the value too...So, then i figured out that when i defined the document definition in B2B console, we will be giving the XSD file right...that schema file is not in sink with the file being picked up...may be i might have done amistake while generating the XSD file for a particular document in B2B Editor...then later i created the document definition i mean the xsd file in B2B Editor and used that new XSD file in my document definition...then i could access all the data in my BPEL process...
Just try this..,may be it helps.
Thanks,
Similar Messages
-
Unable to use ora:countNodes in OBPM 11g
Hi,
I have a BPM Data Object 'solutionProposal' which has the following value after picking up the response from a service call.
<?xml version="1.0" encoding="UTF-8" ?>
<solutionProposal xmlns="http://agreement.pdom.nordea.com/solutionproposal/object/v2">
<initiatedByCustomer xmlns="">53273267</initiatedByCustomer>
<solutionProposalId xmlns="">12787382</solutionProposalId>
<!--Zero or more repetitions: -->
<tailoredPSO xmlns="">
<productServiceOfferGroupId>DEPOSIT</productServiceOfferGroupId>
<tailoredItemId>12</tailoredItemId>
</tailoredPSO>
<tailoredPSO xmlns="">
<productServiceOfferGroupId>NCL</productServiceOfferGroupId>
<tailoredItemId>12</tailoredItemId>
</tailoredPSO>
</solutionProposal>
As can be seen, "TailoredPSO" is directly defined under "SolutionProposal" and can have a repetition of 1 til 20. The schema definition is as below.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:sp="http://agreement.pdom.nordea.com/solutionproposal/object/v2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://agreement.pdom.nordea.com/solutionproposal/object/v2">
<xsd:element name="solutionProposal" type="sp:SolutionProposal"/>
<xsd:complexType name="SolutionProposal">
<xsd:sequence>
<xsd:element name="initiatedByCustomer" type="sp:GenericId"/>
<xsd:element name="solutionProposalId" type="sp:GenericId"/>
<xsd:element name="tailoredPSO" type="sp:TailoredPSO" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="TailoredPSO">
<xsd:sequence>
<xsd:element name="productServiceOfferGroupId" type="sp:GenericId"/>
<xsd:element name="tailoredItemId" type="sp:GenericId"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="GenericId">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="22"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
I have not been able to use ora:countNode expression in OBPM 11g (Patch Set 2) while trying to evaluate how many "TailoredPSO" element are there is the response. Any help will be appreciated.
Following are the various permutations I have tried out but all of them return a response of 1 only instead of expected 2.
ora:countNodes('solutionProposal','solutionProposal','//solutionProposal/tailoredPSO')
ora:countNodes('solutionProposal','//solutionProposal/tailoredPSO')
ora:countNodes('solutionProposal','//*:solutionProposal/*:tailoredPSO')
ora:countNodes('solutionProposal','TailoredPSO','//solutionProposal/tailoredPSO')
ora:countNodes('solutionProposal','tailoredPSO','//solutionProposal/tailoredPSO')
Nothing seems to return a value of 2.
Previously we have only used OBPM 10g and ALBPM 6.0 SP4 and there were other ways of working with this problem.
Thanks
Edited by: user9019487 on Jan 31, 2011 7:09 AMHi,
To access the number of nodes within a list you can do as follows:
instead of using ora:countNodes('solutionProposal','//solutionProposal/tailoredPSO') choose "simple function" instead of "XPath" and, in your case:
solutionProposal.tailoredPSO.length() will give you the size of the array you're trying to get.
Hope it helps.
Pablo -
Problem in using ora:countNodes
Hi i am trying to poll database and receive the records using receive activity.
later i am trying to count the number of record polled each time.
i am using ora:countNodes function.
But i am getting the below error :
Error while processing xpath expression, the expression is "ora:countNodes(bpws:getVariableData('Receive_Data_receive_InputVariable','EmpCollection','/ns2:EmpCollection/ns2:Emp'))", the reason is FOTY0001: type error.
Please verify the xpath query.
the schema file created by the AdapterConfigurator was:
<?xml version = '1.0' encoding = 'UTF-8'?>
<xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBA4GettingData" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBA4GettingData" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EmpCollection" type="EmpCollection"/>
<xs:complexType name="EmpCollection">
<xs:sequence>
<xs:element name="Emp" type="Emp" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Emp">
<xs:sequence>
<xs:element name="empno" type="xs:int"/>
<xs:element name="ename" minOccurs="0" nillable="true"/>
<xs:element name="job" minOccurs="0" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
i am trying to count the nodes of EMP ...
Could you please tell me the solution...
Thanks in advance
chandraIt should look like:
ora:countNodes('Receive_Data_receive_InputVariable','EmpCollection','/ns2:EmpCollection/ns2:Emp')
I typically use the expression builder to identify the element then replace the bpws:getVariableData with ora:countNodes. Works every time. -
SQL*Loader-128: unable to begin a session ORA-28000: the account is locked
Hi everyone,
I am migrating from a SQL Server 2000 DB to Oracle 10g. I followed the migration tutorial and got all the way till the data migration process. The DB data capture scripts capture the data from the SQL Server successfully but i encounter the following error while i run the oracle_ctl.bat file on the Oracle side:
SQL*Loader: Release 10.2.0.1.0 - Production on Tue Jun 9 14:08:27 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-28000: the account is locked
I checked the account and its unlocked and the user name/password combination is the correct one. All the log files have the same error messages. The user has all the required privileges.
Any ideas why this might be happening ?
Thanks,
Amo.Hello,
there may be several causes for this:
1) account in grace period, it can login to sqlplus but could not logn with sqlldr
2) kind of user being specified (sys as sysdba for example)
Could you please paste first lines of modified batch file and
output from select user and status in dba_users ?
Try anyway to run the unlock command
ALTER USER username ACCOUNT UNLOCK;
Thanks
Regards,
Marcello
Edited by: MGILIBER on Jun 12, 2009 3:02 AM -
Inventory: Movement after count with post date before the count date.
Hi,
We have stock movements all the days of the week.
We conduct physical inventories on Sunday mornings. There are not stock movements on Sunday mornings (stock movements on Sunday starts at night).
Usually we create the SAP Physical Inventory Document on Fridays, assigning Saturday as the Planned Count Date.
We enter the SAP Physical Inventory Count on Sunday (at the end of the count) or on Monday.
How you recommend us to use SAPu2019s Physical Inventory feature in order to calculate the Book Inventory considering all stock movements with posting date less than or equal to Saturday?
Please, suggest us a solution that If we register a movement after we enter the count but with post date before the count date (and the count is not posted yet), the Book inventory is modified accordingly.
Thanks in advance for your support!!SAP takes the book inventory in the moment you enter the count.
Best you set block movements , this block will be removed automatically when you enter the count. So you can prevent users from posting until you have entered the count.
If you set the freeze book inventory, then SAP takes the book inventory in the moment you create the document.
This is not a good way if you still have movements after inventory document creation and actual count.
You have to make sure - organisational wise, outside SAP - that all movements that happened before inventory count are posted before you start entering the count. There is nothing in SAP that can help you in this case. -
I need the Count to display "0" when the count = 0
I'm creating a report that is run weekly. Each week, one or more of the categories may turn up 0. As this is being used as a sub report in another report, I need the count to show "0" when there is no data for the week as it is aligned with another sub report listing all the categories possible.
The following is the formula I am currently working on:
if(IsNull(Count ({UV_HRSRespClnByAreaDetail.SubType},{UV_HRSRespClnByAreaDetail.Stat})))
then u201C0u201D
else Count ({UV_HRSRespClnByAreaDetail.SubType},{UV_HRSRespClnByAreaDetail.Stat})
This will not turn up 0, it still gives me a blank. Any thoughts?Hi Aneisha
You can check if the following formula works for you:
numberVar cnt;
cnt=(Count ({UV_HRSRespClnByAreaDetail.SubType},{UV_HRSRespClnByAreaDetail.Stat})
if (IsNull(cnt)) then u201C0u201D
else cnt;
Hope this helps you.
Regards
Ashwini Yadav -
Unity cluster with one node using name and the other using iP
Hey Guys,
I have two unity connection boxes setup in a cluster, one is know by name and the other by IP address. I'd like to change so that both are using the IP address. The node in the cluster that is using the node name is the publisher. Can I simply go into the cluster settings and change that to an IP address or will that cause big issues.
Thanks,
BRHi Brent,
Is there any specific reason why you would want to do this kind of configuration? (Just Curious to know)
I tried doing the same on my Unity Connection cluster (version 8.5(1) SU2 ) in lab.
After making the change in the cluster settings page for the Pub , I did the following :
1)Switch the Primary Role back and forth between the Pub and the Sub : SUCCESS
2)Checked the service status on the pub and sub using "utils service list" : ALL GOOD
3)Rebooted the Pub followed by the Sub and performed test 1 and 2 again : SUCCESS
4)Checked the output of "show cuc cluster status" on the Pub and Sub again: SUCCESS
However, I could not find any document that says this change is really required under any circumstances.
I hope that helps!!!
Regards,
Saurabh Agnihotri -
I use a web based software for work. I go to a web page listing all employees as links (Window A). When I click an employee link a new window opens (Window B). Window B contains links, i.e. Add Client, Change Address, Change Phone Number, Change Name, Upload Photo, etc... When I hold CTRL and left click the links in Window B, the new tab opens in Window A. I don't understand why this has changed, as I've been using this method to open new tabs in my current window in both of the previous versions of Firefox.
That didn't work, but thank you very much for the offer of help. I had already tried that option.
To give you an example of what I'm speaking, I found this page that recreates the scenario.
1. Goto [http://www.kirupa.com/developer/mx/centered_popup.htm http://www.kirupa.com/developer/mx/centered_popup.htm]
2. Click the GO in the center of the box on their page (This creates a pop-up window with links to other programming pages)
3. CTRL+left click any of those links. The page opens in the background/original window, not the pop up window where you are currently working. And, with your solution takes me back to that window and the new tab. -
Unable to print Report. Printout dispays the first record always
My application generates a HTML Report which displays to the user in the browser. Since it was a requirement from the client We have used a scrolling div to display the desired records all at the same time. Thus the user can scroll through the div and view all the records.
We have provided a Print Report functionality in our report. It uses the window.print() built in functionality of javascript.
The problem is that the print out put is not having the same look and feel as the Page. Moreover if i scroll down the div to display hidden records and then click on the print report link it always prints from the 1st record onwards.
Can someone please help me resolve the issue?
Regards
NirmalI am experiencing a similar problem. I have two reports I need to print. The first must come from tray 1 and the second from tray 2. However, if my default printer is not capable of having more than one tray even though I set the printer name of the reportDocument object to a multi-tray printer and the papersource is set properly for the given report all reports print from the same try. I am using CR 9 and C# with Visual Studio 2005. Does anyone know of a way to dynamically specify the printer and tray that will stop the default printer from interfering with the report I am trying to print?
-
Problem with ora:countNodes...
Hi i am trying to poll database and receive the records using receive activity.
later i am trying to count the number of record polled each time.
i am using ora:countNodes function.
But i am getting the below error :
Error while processing xpath expression, the expression is "ora:countNodes(bpws:getVariableData('Receive_Data_receive_InputVariable','EmpCollection','/ns2:EmpCollection/ns2:Emp'))", the reason is FOTY0001: type error.
Please verify the xpath query.
the schema file created by the AdapterConfigurator was:
<?xml version = '1.0' encoding = 'UTF-8'?>
<xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBA4GettingData" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBA4GettingData" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EmpCollection" type="EmpCollection"/>
<xs:complexType name="EmpCollection">
<xs:sequence>
<xs:element name="Emp" type="Emp" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Emp">
<xs:sequence>
<xs:element name="empno" type="xs:int"/>
<xs:element name="ename" minOccurs="0" nillable="true"/>
<xs:element name="job" minOccurs="0" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
i am trying to count the nodes of EMP ...
Could you please tell me the solution...
Thanks in advance
chandraHi,
Have you tries using the standard xpath function count(<nodeset>) instead?
See reference: http://www.w3.org/TR/xpath#function-count.
Usage would be something like:
bpws:getVariableData('Receive_Data_receive_InputVariable','EmpCollection','count(/ns2:EmpCollection/ns2:Emp)')
Hope this helps you further.
Kind regards,
Harm -
How to know the count of record in CR XI?
Post Author: Liu ming
CA Forum: Deployment
Hi All,
I create a report by CR XI release 2. The report is viewed in ASP.Net. So, I would like show a message when the report have no record. My question is how to know the count of record?
Thanks.I was able to do this by using
ora:countNodes('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500') -
Hello Guys,
I am finding it difficult to increase my counter in XSLT program.
The counter is being calculated inside the template POHeader inside the PART Node set.I would like to increase this counter for
each every haeder as expained in the example.
Can someone suggest how to increase my counter?
For Eg :
Expected output:
850HD20102010122100000001 0095AAF52C, , * // 00001 before 009
850H1000115 1012210095A AS
850H4
850H7
850N1 0095A
850N2AFL HUNGARY D02RG
850D1 00000100000000015EA 96FG 10374 AA
850D6Seal
850HD20102010122100000002 0095AAF52C, , * // 00002
850H1000115 1012210095A SS
850H4
850H7
850N1 0095A
850N2VALEO AUTOSYSTEMY SP.Z.O.O. EBECA
850D1 00000100000001202EA DSFSDF SDF
850D6WIRE ASSY
850D1 00000200000002118EA TEST
850D6ARM-WIPER
850HD20102010122100000003 0160AAF52C, , * // 00003
850H1000115 1012210160A SS
850H4
850H7
850N1 0160A
850N2VALEO AUTOSYSTEMY SP.Z.O.O. EBECA
850D1 00000100000000016EA V97FB 17526 BD
850D6Arm Assy - Wiper
But i am getting it as :
850HD201020101221000000010095AAF52C, , *
850H1000115 1012210095A AS
850H4
850H7
850N1 0095A
850N2AFL HUNGARY D02RG
850D1 00000100000000015EA 96FG 10374 AA
850D6Seal
850HD201020101221000000010095AAF52C, , *
850H1000115 1012210095A SS
850H4
850H7
850N1 0095A
850N2VALEO AUTOSYSTEMY SP.Z.O.O. EBECA
850D1 00000100000001202EA DSFSDF SDF
850D6WIRE ASSY
850D1 00000200000002118EA TEST
850D6ARM-WIPER
850HD201020101221000000010160AAF52C, , *
850H1000115 1012210160A SS
850H4
850H7
850N1 0160A
850N2VALEO AUTOSYSTEMY SP.Z.O.O. EBECA
850D1 00000100000000016EA V97FB 17526 BD
850D6Arm Assy - Wiper
The below is the XSLTcode:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--Correction V2.0 23.11.2010 -->
<!-- POtype added-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY linefeed "<xsl:text>
</xsl:text>">
<!ENTITY tab "<xsl:text> </xsl:text>">
<!ENTITY space "<xsl:text> </xsl:text>">
<!ENTITY space5 "<xsl:text> </xsl:text>">
<!ENTITY space10 "<xsl:text> </xsl:text>">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:n0="urn:-com:fcsd:btr:eu:sapscm:schedAgrRels">
<xsl:output method="text"/>
<xsl:param name="inputparam"/>
<xsl:template match="n0:COMMONFORMAT_MT">
<xsl:variable name="SHIPFROM" select="//Entity/ShipFrom"/>
<xsl:for-each select="//Entity">
<xsl:for-each select="Part">
<xsl:if test="SupplierCode = 'Y'">
<xsl:call-template name="RoutingHeader"/>
<xsl:call-template name="POHeader"/>
<xsl:call-template name="PODetails"/>
</xsl:if>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<!-- Stock Order Header Record-->
<xsl:template name="RoutingHeader">
<xsl:variable name="SHIPFROM" select="../ShipFrom"/>
<xsl:variable name="SHIPTO" select="../ShipTo"/>
<!-- HD Primary Routing Record-->
<xsl:text>850HD2010</xsl:text>
<xsl:value-of select="/n0:COMMONFORMAT_MT/Header/CreationYear"/>
<xsl:value-of select="format-number(/n0:COMMONFORMAT_MT/Header/CreationMonth,'00')"/>
<xsl:value-of select="format-number(/n0:COMMONFORMAT_MT/Header/CreationDay,'00')"/>
<xsl:text>0000</xsl:text> <!-- TIME ZERO-->
<xsl:value-of select="format-number(position(),'0000')"/>
<xsl:value-of select="substring($SHIPTO,1,5)"/>
<xsl:text>AF52C</xsl:text>
<xsl:text>,</xsl:text>
&space5;
<xsl:text>,</xsl:text>
&space5;
<xsl:text>*</xsl:text>
&linefeed;
</xsl:template>
<xsl:template name="PODetails">
<xsl:variable name="SHIPFROM" select="../ShipFrom"/>
<xsl:variable name="SHIPTO" select="../ShipTo"/>
<!-- H4 Contacts-->
<xsl:text>850H4</xsl:text>
&linefeed;
<!-- H7 FoB Other Items-->
<xsl:text>850H7</xsl:text>
&linefeed;
<!-- N1 Buying name address-->
<xsl:text>850N1</xsl:text>
<xsl:value-of select="substring(../ShipToName,1,30)"/>
<xsl:variable name="LEN1" select="string-length(../ShipToName)"/>
<xsl:value-of select="substring(' ',1,30-$LEN1)"/>
<xsl:value-of select="substring($SHIPTO,1,5)"/>
&linefeed;
<!-- N2 Supplier Name address-->
<xsl:text>850N2</xsl:text>
<xsl:value-of select="substring(../ShipFromName,1,30)"/>
<xsl:variable name="LEN2" select="string-length(../ShipFromName)"/>
<xsl:value-of select="substring(' ',1,30-$LEN2)"/>
<xsl:value-of select="substring($SHIPFROM,1,5)"/>
&linefeed;
<!-- N3 Ship-To addresses-->
<xsl:choose>
<xsl:when test="$SHIPFROM = 'AF52M'">
<xsl:text>850N3 59791</xsl:text>
&linefeed;
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="POHeader">
<xsl:variable name="SHIPFROM" select="../ShipFrom"/>
<xsl:variable name="SHIPTO" select="../ShipTo"/>
<xsl:variable name="POTYPE" select="POType"/>
<!Primary Contorl Record>
<xsl:text>850H1</xsl:text>
<xsl:variable name="PONR" select="../ReleaseNumberPrimary"/>
<xsl:variable name="LEN" select="string-length($PONR)"/>
<xsl:value-of select="$PONR"/>
<xsl:value-of select="substring(' ',1,18-$LEN)"/>
&space10;&space5;&space;&space;&space;
<xsl:value-of select="substring(/n0:COMMONFORMAT_MT/Header/CreationYear,3,2)"/>
<xsl:value-of select="format-number(/n0:COMMONFORMAT_MT/Header/CreationMonth,'00')"/>
<xsl:value-of select="format-number(/n0:COMMONFORMAT_MT/Header/CreationDay,'00')"/>
<xsl:value-of select="$SHIPTO"/>
&space10;&space10;&space10;&space5;
<!<xsl:text>SS</xsl:text>>
<xsl:value-of select="$POTYPE"/>
&linefeed;
</xsl:template>
<xsl:template match="Part">
<!-- D1 Part Record-->
<xsl:text>850D1</xsl:text>
&space5;&space;
<xsl:variable name="POS" select="position()"/>
<xsl:value-of select="format-number(count(preceding-sibling::Part) + 1,'000000')"/>
<xsl:variable name="QTY" select="ScheduleLines[1]/Quantity"/>
<xsl:value-of select="format-number($QTY,'00000000000')"/>
<xsl:text>EA</xsl:text>
&space10;&space5;&space;
<xsl:call-template name="FormatPartNumber"/>
<xsl:if test="string-length(VendorPart/VendorPartID) > 0">
&space10;&space10;&space10;
<xsl:value-of select="VendorPart/VendorPartID"/>
</xsl:if>
&linefeed;
<!-- D6 Part Description -->
<xsl:text>850D6</xsl:text>
<xsl:value-of select="substring(Description,1,80)"/>
&linefeed;
</xsl:template>
<!Formatting PartNumber>
<xsl:template name="FormatPartNumber">
<xsl:if test="../ShipFrom = 'FI05M'">
<xsl:variable name="T1" select="substring-before(EPNCode,' ')"/>
<xsl:variable name="T2T" select="substring-after(EPNCode,' ')"/>
<xsl:variable name="T2" select="substring-before($T2T,' ')"/>
<xsl:variable name="T3" select="substring-after($T2T,' ')"/>
<xsl:if test="$T3 != ''">
<xsl:choose>
<xsl:when test="$T3 != '-'">
<xsl:variable name="PN" select="concat($T1,'/',$T2,'/',substring($T3,1,2),'/',substring($T3,3))"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="PN" select="concat($T1,'/',$T2,'/','/')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="LEN" select="string-length($PN)"/>
<xsl:value-of select="$PN"/>
<xsl:value-of select="substring(' ',1,30-$LEN)"/>
</xsl:if>
<xsl:if test="$T3= ''">
<xsl:choose>
<xsl:when test="$T2T != '-'"> <xsl:variable name="PN" select="concat(substring($T1,1,1),'/',substring($T1,2),'/',substring($T2T,1,2),'/',substring
($T2T,3))"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="PN" select="concat(substring($T1,1,1),'/',substring($T1,2),'/','/')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="LEN" select="string-length($PN)"/>
<xsl:value-of select="$PN"/>
<xsl:value-of select="substring(' ',1,30-$LEN)"/>
</xsl:if>
</xsl:if>
<xsl:if test="../ShipFrom != 'FI05M'">
<xsl:value-of select="substring(concat(EPNCode,' '),1,30)"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
My input XML data :
<?xml version="1.0" encoding="utf-8"?>
<n0:COMMONFORMAT_MT xmlns:n0="urn:nord-com:fcsd:btr:eu:sapscm:schedAgrRels" xmlns:prx="urn:sap.com:proxy:A8D:/1SAI/TAS00000000000000000025:700:2009/02/10">
<Header>
<EDIFormat>CIF850</EDIFormat>
<CreationYear>2010</CreationYear>
<CreationMonth>12</CreationMonth>
<CreationDay>21</CreationDay>
</Header>
<Details>
<Entity>
<ShipFrom>D02RG</ShipFrom>
<ShipTo>0095A</ShipTo>
<BillTo>0095A</BillTo>
<ReleaseNumberPrimary>000115</ReleaseNumberPrimary>
<ShipToInternal>PLDE11</ShipToInternal>
<ShipToName>nord-Werke GmbH</ShipToName>
<ShipFromName>AFL HUNGARY</ShipFromName>
<Part>
<FinisCode>TST_1004285</FinisCode>
<EPNCode> 96FG 10374 AA </EPNCode>
<SupplierCode>Y</SupplierCode>
<Description>Seal</Description>
<APNType>EN</APNType>
<CumQuanRec>60.000 </CumQuanRec>
<PurchasingUOM>EA</PurchasingUOM>
<PartHorizons>
<ProductGoAheadQty>0 </ProductGoAheadQty>
<MaterialGoAheadQty>0 </MaterialGoAheadQty>
<MaterialEndDate>101220</MaterialEndDate>
<FabEndDate>101220</FabEndDate>
<LastASNNo>KRISHNA</LastASNNo>
<LastASNDate>100929</LastASNDate>
<LastASNQty>20 </LastASNQty>
<LastASNCumQty>0 </LastASNCumQty>
</PartHorizons>
<PurchasingInformation>
<ReleaseID>JGxc9pCi0QhX08004sv34m</ReleaseID>
<PurchasingNumber>5500000039</PurchasingNumber>
<ReleaseNumber>0000018</ReleaseNumber>
<ReleaseIssueDate>101220</ReleaseIssueDate>
<HorizonEndDate>111220</HorizonEndDate>
<ReconciliationDate>100101</ReconciliationDate>
<BookNumber>180</BookNumber>
</PurchasingInformation>
<ScheduleLines>
<Quantity>15 </Quantity>
<Date>101220</Date>
<Time>0007</Time>
<TransportMethod>0001</TransportMethod>
</ScheduleLines>
<ShipCode>XX</ShipCode>
<POType>AS</POType>
</Part>
</Entity>
</Details>
<Details>
<Entity>
<ShipFrom>EBECA</ShipFrom>
<ShipTo>0095A</ShipTo>
<BillTo>0095A</BillTo>
<ReceivingDock>12</ReceivingDock>
<ReleaseNumberPrimary>000115</ReleaseNumberPrimary>
<ShipToInternal>PLDE11</ShipToInternal>
<ShipToName>nord-Werke GmbH</ShipToName>
<ShipFromName>VALEO AUTOSYSTEMY SP.Z.O.O.</ShipFromName>
<Part>
<FinisCode>1007257</FinisCode>
<EPNCode>DSFSDF SDF </EPNCode>
<SupplierCode>Y</SupplierCode>
<Description>WIRE ASSY</Description>
<APNType>EN</APNType>
<CumQuanRec>0.000 </CumQuanRec>
<PurchasingUOM>EA</PurchasingUOM>
<PartHorizons>
<ProductGoAheadQty>0 </ProductGoAheadQty>
<MaterialGoAheadQty>0 </MaterialGoAheadQty>
<MaterialEndDate>101221</MaterialEndDate>
<FabEndDate>101221</FabEndDate>
<LastASNNo>00000000000</LastASNNo>
<LastASNDate>000000</LastASNDate>
<LastASNQty>0 </LastASNQty>
<LastASNCumQty>0 </LastASNCumQty>
</PartHorizons>
<PurchasingInformation>
<ReleaseID>JGyw4Tf30QhX08004sv34m</ReleaseID>
<PurchasingNumber>5500023416</PurchasingNumber>
<ReleaseNumber>0000002</ReleaseNumber>
<ReleaseIssueDate>101221</ReleaseIssueDate>
<HorizonEndDate>111221</HorizonEndDate>
<ReconciliationDate>091005</ReconciliationDate>
<BookNumber>730</BookNumber>
</PurchasingInformation>
<ScheduleLines>
<Quantity>1202 </Quantity>
<Date>101220</Date>
<Time>0007</Time>
</ScheduleLines>
<ShipCode>11</ShipCode>
<POType>SS</POType>
</Part>
<Part>
<FinisCode>1008781</FinisCode>
<EPNCode> TEST </EPNCode>
<Description>ARM-WIPER</Description>
<APNType>EN</APNType>
<CumQuanRec>0.000 </CumQuanRec>
<PurchasingUOM>EA</PurchasingUOM>
<PartHorizons>
<ProductGoAheadQty>0 </ProductGoAheadQty>
<MaterialGoAheadQty>0 </MaterialGoAheadQty>
<MaterialEndDate>101217</MaterialEndDate>
<FabEndDate>101217</FabEndDate>
<LastASNNo>00000000000</LastASNNo>
<LastASNDate>000000</LastASNDate>
<LastASNQty>0 </LastASNQty>
<LastASNCumQty>0 </LastASNCumQty>
</PartHorizons>
<PurchasingInformation>
<ReleaseID>JGkW33ND0PxX08004sv34m</ReleaseID>
<PurchasingNumber>5500023075</PurchasingNumber>
<ReleaseNumber>0000001</ReleaseNumber>
<ReleaseIssueDate>101217</ReleaseIssueDate>
<HorizonEndDate>111217</HorizonEndDate>
<ReconciliationDate>100101</ReconciliationDate>
<BookNumber>180</BookNumber>
</PurchasingInformation>
<ScheduleLines>
<Quantity>2118 </Quantity>
<Date>101213</Date>
<Time>0007</Time>
</ScheduleLines>
<ShipCode>XX</ShipCode>
<POType>SS</POType>
</Part>
</Entity>
</Details>
<Details>
<Part>
<FinisCode>1049328</FinisCode>
<EPNCode>V97FB 17526 BD</EPNCode>
<SupplierCode>Y</SupplierCode>
<Description>Arm Assy - Wiper</Description>
<APNType>EN</APNType>
<CumQuanRec>11183.000 </CumQuanRec>
<PurchasingUOM>EA</PurchasingUOM>
<PartHorizons>
<ProductGoAheadQty>0 </ProductGoAheadQty>
<MaterialGoAheadQty>0 </MaterialGoAheadQty>
<MaterialEndDate>110201</MaterialEndDate>
<FabEndDate>110102</FabEndDate>
<LastASNNo>ADRIAN 17.1</LastASNNo>
<LastASNDate>091117</LastASNDate>
<LastASNQty>133 </LastASNQty>
<LastASNCumQty>0 </LastASNCumQty>
</PartHorizons>
<PurchasingInformation>
</PurchasingInformation>
<ScheduleLines>
<Quantity>16 </Quantity>
<Date>101129</Date>
<Time>0007</Time>
</ScheduleLines>
<ShipCode>XX</ShipCode>
<POType>SS</POType>
</Part>
</Entity>
</Details>
</n0:COMMONFORMAT_MT>Don't see an attachment.
You could use a shift register to store an array.
Each button would map to an array index. For each button pushed you would index the array, +1 the value, replace the array element and pass back out to the shift register.
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
How to get the count of each minutes
Oracle 10 DB
Hi All
I using this query to get the count of records fetched by the concurrent program per min,
select count (distinct b.attribute2)
from oe_order_headers_all a,oe_order_lines_all b
where a.header_id=b.header_id
and b.flow_status_code ='AWAIT_QUINTIQ_BOOK'
and to_Char(b.last_update_date,'DD-MON-YYYY HH24:MI:SS') between '19-JAN-2011 02:00:01' AND
'19-JAN-2011 02:00:02'
This is used to get the count of records fetched at one mins
How to find the count of last 10 mins ie 1 mins count 2.00 to 2.10
Thanks & Regards
Srikkanth.MTry this:
SELECT TRUNC(b.last_update_date, 'mi') time_mins, COUNT(DISTINCT b.attribute2)
FROM oe_order_headers_all a,
oe_order_lines_all b
WHERE a.header_id = b.header_id
AND b.flow_status_code = 'AWAIT_QUINTIQ_BOOK'
AND b.last_update_date >= to_date('19/01/2011 02:00:00', 'dd/mm/yyyy hh24:mi:ss')
AND b.last_update_date < to_date('19/01/2011 02:10:00', 'dd/mm/yyyy hh24:mi:ss')
GROUP BY TRUNC(b.last_update_date, 'mi');I'm not sure why you're bothering with the join to the oe_order_headers_all table, since you're not referencing that in the where clause or the selected columns list. I think you could probably do away with it.
I've changed your code to take the last_update_date and truncate it to the minute level, and added that as a column, so you can see which count goes with which minute. Obviously, this has to be in the group by.
I've also changed your date comparisons so that you're actually comparing dates to dates, rather than strings to strings - why would you deliberately take information away from the optimizer? Oracle does not treat strings the same as dates, and forcing it to use strings rather than dates could lead you to have a vastly differing execution path, which will most likely be less performant.
Not to mention, coding like that leads you to assume that you can compare dates in strings without any problems, and that is just not the case. '19-FEB-2011' is counted as being earlier than '19-JAN-2008', as strings sort alphabetically. -
What function can be used to give a "count of occurrences of values" ?
I would be very appreciative if someone in the user community could save me a few months of work....I've already been neck deep in my old statistics and calculus manuals. What function can be used to get the count of occurrences of the value of an item. Ex: Item is Status and possible values are "Published", "In Production", "Construction". In one report, I want to report all records of a table and list the Status (among other items) but at the total, I would like to see a count of each value for the item Status....something like Sum(Count(Status = "Published")) Sum(Count(Status = "In Production")) Sum(Count(Status = "Construction")). I know I could run the report 3 times counting a unique value, but I'm trying to be more efficient in my reporting. Thanks all for any help given.
Hi
In addition to John's answer, inside Discoverer you can do this:
Let's assume you have a Status item and it has the values you mention. If you create the following new calculation SUM(ROWNUM) and name it Status Count you only need to include the Status and the Status Count in the worksheet. You will now see a count for each status.
Best wishes
Michael -
Use Variance for Distinct Count of Group Results
Post Author: Judith
CA Forum: Crystal Reports
Hi there,
I am new to CR. I am using CR 2008. I am stuck (every two minutes) and it would be great, if you could help me with this one:
I have a list of people who are talking to each other:A to B, B to A, C to D, D to A etc. Then I wanted to see, who has most friends and I have created Groups to have a Distinct Count on how many people are talking to A, and to B, and to C etc. that worked fine. What I would like to do is to find out is who of these has most people they are talking to. Or even better, what is the variance of the resulting subtotals. Simply using Variance or Maximum doesn't seem to work on the DistinctCount Summary.
I would very much appreciate any help on this.
JudithPost Author: Jagan
CA Forum: Crystal Reports
I understand the issue, I don't understand why you think DistinctCount at two different levels should total up. Consider this sample data:Facility, EmployeeA, 1A, 2B, 1B, 3
Facility A's distinct count => 2Facility B's distinct count => 2Report's distinct count => 3
Use DistinctCount() at the group level and create a formula to sum these counts yourself and print that in the report footer.
Maybe you are looking for
-
TouchSmart IQ816 can no longer play Blu Ray discs
For the last 5 months or so my TouchSmart has not been able to play my blu ray movies. I was told that this was a problem with an update of the MediaSmart DVD program. I had this same issue on my HDX18; I uninstalled MediaSmart DVD and reinstalled it
-
Error: Suite Color Management is not enabled | Bridge CS6
When i go to Edit > Creative Suite Colour Settings in Adobe Bridge, I am receiving the following error: "Suite Colour Management is not enabled. Suite Colour Management requires that a qualifying product has been launched at least once to enable thi
-
S cable vs. av cable vs. cheapos from radio shack
I just got my ipod video and am trying to connect it to the front av ports on my tv with no luck. i am using a working cable from radio shack that has 2 audios and one video from a headphone jack. i don't have the dock. this does not work. is apple's
-
I am trying to get to a specific spot on a website. I have signed on and can get to all other sections, but when I try to get to this one section I get a message back saying Safari cannot get to that page, too many redirects? Help?
-
Hi Team, Im getting alerts like User logon time(msec) is 4007.29 secs & Session 291 is blocking other 13 sessions via OEM. Im unable to find out the SID 291,to check which process has blocked the resources. Please suggest us on above two quires. Data