How to create an XQuery for an XML type data source
Hi,
1.I have data contained in an XML format.
Hence I have created a physical data source for XML type data.
2.I have created a logical view to broker data from several disparate physical data sources.I have called this as UnifiedView.
3.I have created a function called getUnifiedView() to obtain data from all the physical sources
4.Upto this point, I have not faced any problems.
5.However when i try writing a simple XQuery for the physical XML datasource such as
$Sh-data/PublicIdentifiers/MSISDN="1234567"
I get result as (For example):
<HSS>
<MSISDN> 1234567 111111 222222 </MSISDN>
</HSS>
Could you please help me getting the where clause output?
I have attached the schema and XML files used for further information.
Regards
Vidya
Hi mReiche,
I later on resolved the previously mentioned error and try out the XQuery as suggested by you.
for $MSISDN in ns0:Sh-data()/PublicIdentifiers/MSISDN
where $MSISDN="1234567"
return
<HSS>
<MSISDN>{data($MSISDN)}</MSISDN>
</HSS>
It works! Thanks.
Now i am trying to retrieve data from 2 XML documents and an LDAP query.
I have the following data sources:
1.LDAP queried by Java Function
2.HSS xml
3.Presence xml
I want to match the telephoneNumber of the LDAP with MSISDN in the HSS.xml.
Next i want to match the SIP_URI in the HSS.xml with Contact of the Presence.xml
Given below is the XQuery which i have written to achieve the above:
for $x0 in ns5:FindDN($str_mailId)
for $Sh-Data in ns2:Sh-Data()
where $x0 = $Sh-Data/PublicIdentifiers/MSISDN
for $presence in ns3:presence()
where $Sh-Data/Sh-IMS-Data/SCSCFName = $presence/ns4:tuple/ns4:contact
return
On executing this XQuery i am getting the following error:
java.lang.NullPointerException: null
at weblogic.xml.query.types.XQueryAtomicType.commonSuperTypeOf(XQueryAtomicType.java:150)
at weblogic.xml.query.types.XQueryType.comparisonTypeOf(XQueryType.java:324)
at weblogic.xml.query.runtime.compare.GeneralAtomicComparison.compare(GeneralAtomicComparison.java:50)
at weblogic.xml.query.runtime.compare.ComparisonIterator.fetchNext(ComparisonIterator.java:50)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.logic.BoolEffValue.exec(BoolEffValue.java:51)
at weblogic.xml.query.runtime.logic.BoolEffValue.fetchNext(BoolEffValue.java:47)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:162)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:162)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.sequences.Exists.fetchNext(Exists.java:40)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:161)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:142)
at com.bea.ld.server.QueryInvocation.getResult(QueryInvocation.java:461)
at com.bea.ld.EJBRequestHandler.executeFunction(EJBRequestHandler.java:346)
at com.bea.ld.ServerBean.executeFunction(ServerBean.java:108)
Please find attached the XML documents which i am using.
Could you pls let me know how to resolve this.
Similar Messages
-
How to create a macro for a planning type in MC8b transaction
Hi,
I am presently working for a product allocation demand, which have a information structiure with characteristic and key field.
the characteristic are production allocation quantity, incoming order quantity, and open order quantity.
i have created a planning type in which the data updation takes from the excel file to the planning type in mc95.
but i need to create a macro for this planning type .
can any body give the details information how to create a Macro for a planning type.
Thanks and regards
GopalKrishnaDear Gopal
May be the link would be helpful to you.
[Planning Types and Macros|http://help.sap.com/saphelp_46c/helpdata/en/a5/631cc443a211d189410000e829fbbd/frameset.htm]
Drill down the left tab once you opened the link, for more information.
Thanks
G. Lakshmipathi -
How to create a datasource for 0COSTCENTER to load data in csv file in BI
how to create a datasource for 0COSTCENTER to load data in csv file in BI 7.0 system
can you emil me the picture of the step about how to loaded individual values of the hierarchy using CSV file
thank you very much
my emil is <Removed>
allenStep 1: Load Required Master Data for 0CostCenter in to BI system
Step 2: Enable Characteristics to support Hierarchy for this 0Cost Center and specify the External Characteristic(In the Lowest Node or Last Node) while creation of this Characteristic InfoObject
Step 3: On Last Node of Hierarchy Structure in the InfoObject, Right Click and then Create Hierarchy MANUALLY by Inserting the Master Data Value as BI dosent Support the Hierarchy load directly you need to do it manually....
Step 4: Mapping
Create Text Node thats the first node (Root Node)
Insert Characteristic Nodes
Insert the Last Node of the Hierarchy
Then you need to create a Open hub Destination for extracting data into the .csv file...
Step1 : Create the Open Hub Destination give the Master Data table name and enter all the fields required....and create the transformations for this Open Hub connecting to the External file or excel file source...then give the location on to your local disk or path of the server in the first tab and request for the data...It should work alright let me know if you need anything else...
Thanks,
Sandhya -
How to create outbound IDOC for Accounting document type RV
Hello All,
We have a requirement to create a downpayment request for a customer. We have copied the FAZ billing type and created a ZFAZ. For this the accounting document type generated is RV. This RV is a statistical document and does not contain any debits and credit entries. It is just to inform the customer to pay. We have to generate an IDOC for the same. I have configured FIDCC1 standard FI message type for this in ALE. But it does not seem to work.
Does anyone have any inputs on this ? May be RV does not use the message type FIDCC1 ? Anything in relation to RV or downpaymnts, please let me know..
Appreciate your responses.
Thanks
SH.Hello Alpesh,
I tried adding breakpoints to the following userexits and many other places where they occur..but while creating billing doc FAZ nor while generating accounting document RV they were triggered.
I have created a distribution model and created the partner profile with outbound for basic type INVOIC02 for message type INVOIC . What do you say?
Just a note that this is an outbound process and i cannot use process codes.
- EXIT_SAPLVEDF_001 User_Exit controll data IDoc_Output_Invoic
- EXIT_SAPLVEDF_002 User_Exit customer enhancement of segments outbound invoice
Thanks
Smitha
Edited by: Smitha H on Jul 25, 2008 7:56 AM -
How To Create Logical column For Lastyear To Till Date
Hi All,
I Have to calculate Lastyear to Till Date for Logical Column.
Ex:I have Time Dime and Fact column and Dimension columns.
jan 2011 to oct 2012.
Please Let me know.
Thanks,
AbhiLooks like you are not reading my messages
Since you are doing on logical columns getting this error.
Try this using physical columns then count from aggregate tab
CASE WHEN "Oracle Data Warehouse"."Catalog"."dbo"."Fact_W_SRVREQ_F_Open_Date"."OPEN_DT_WID" > 20110101 THEN "Oracle Data Warehouse"."Catalog"."dbo"."Fact_W_SRVREQ_F_Open_Date"."SR_WID" END
The same you can go with your variable
Or else the same can do by duplicating the existing Fact - CRM - Service Request"."# of SRs" and just add above code.
or just use the below you dont use sum since already aggregation is happend for # of SRs
CASE WHEN "Core"."Dim - Date"."Year" = VALUEOf("Warehouse Refresh Date Last Year"."CURRENT_CALENDAR_YEAR_LAST_YEAR") AND "Core"."Dim - Date"."Date" < VALUEOF("Warehouse Refresh Date Last Year"."LAST_REFRESH_DATE_LAST_YEAR") THEN "Core"."Fact - CRM - Service Request"."# of SRs" END
Hope this works, mark as correct -
How to change Selection Criteria for a Business Content Data Source
Hi Experts
I am extracting data using 0CO_OM_CCA_9 Datasource. I would like to be able to select a range of Company Code (BUKRS) to pull in, but I cannot find a way to make certain fields available as selection criteria. When I go into "Change DataSource", I can unselect fields, and even select certain fields, but the option for most is grayed out.
How can I make this field available as selection criteria in Infopackage?
Thanks for the help.Its not that simple to enable a new selection for a Business Content Datasource, if its not already provided by SAP. Enabling new fields for selection should be accompanied by corresponding extractor code changes to process those field selections and use those selections throughout the extraction process.
Solution for your problem would be create a custom extractor with all the logic of standard extractor (function module BWOMD_GET_CTRCSTA1 for 0CO_OM_CCA_9) and extra logic to process the new fields for selection.
Hope it helps! -
Multiple XML HTTP Data sources sequentially
Hi,
We are creating a report using multiple XML HTTP Data sources sequentially.
The Report uses multiple XML HTTP Data sources sequentially; the report creation fails or delayed. We would like to join the datasources after accessing from the HTTP Server.
At the same time the same XML files when locally accessing as data sources, the report is getting created.
Is there any alternate solution for XML HTTP Data Source Access. Or in which way I can proceed with this.
Thanks,
UnniI am not able to use datasets here.
The context is as below.
I am running an HTTP server (XML-RPC program),which will generate an XML output as defined with a local XML Schema.
Here I have multiple HTTP requests ,each will generate multiple XML outputs.
I am using XML and WebServices Connection where I will provide like below,
(Please note file1,file2 are normal text files with data corresponds to xsds.)
HTTP(s) XML URL : http://localhost:8002/ReadTable?name=file1
Local Schema File : E:\Test\file1.xsd
HTTP(s) XML URL : http://localhost:8002/ReadTable?name=file2
Local Schema File : E:\Test\file2.xsd
Like this I am able to create multiple XML outputs through HTTP requests.(only file1),which means while creating reports the sequential requests are not handling properly.
My report will join say two of theese files. But at the time of report creation it will ask of only runtime parameter of first request in the join.
Here The report will generate only with data from first text(data) file.(file1)
Hope you got a clarity about the proble. -
How to create PLD_Items table for Crystal Reports
Hi experts,
Im trying to use the variable 130 for a report but in crystal reports, in some SAP Standard Reports the table PLD_Items appears, my question is how to create this structure for my report, i know that is an ADO.NET connection based on an XML file, but i dont know from where i can take this value can any one help me please?
Best Regards
DaveIf this is CR for B1, please post to SAP Business One Application
Alternatively see the SCN Site Index for the correct SCN Space for your product / component.
- Ludek
SCN Moderator -
How to create custom infotype for training and event management
hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
PS No PA0000-> PERNR
Name - PA0001 -> ENAME
IS PS.No. PA0001-> PS no. of Immediate Superior
IS name PA0001 -> ENAME
thanx in advance
afzalHi,
Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
If you wish to create a PD infotype, use transaction PPCI to create the infotype.
But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
If you wish to create a PA infotype, use transaction PM01 to create the infotype.
But before that you may be required to create a strcuture PSnnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
Regards,
Srini -
How to create one TO for multiple TRs
Dear All,
how to create one TO for multiple TRs, kindly suggest me
Regards,
baluAs for your question: it is discussed in sAP online help:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/c6/f841f24afa11d182b90000e829fbfe/frameset.htm
Sorry I misunderstood your question.
The above mentioned solution won't create one single TO from multiple TR.
Edited by: Csaba Szommer on Aug 11, 2010 9:46 AM -
How to create one checksum for 264 vis
Hi,
How to create "one Checksum" for 264 Vis.These 264 Vis are Interlinked if i change code for any .vi the checksum Should be update.This checksum is shown on the main window.
Regards
Ravindranath
Solved!
Go to Solution.Here's a slightly simplified version (saved in 8.6). There's no need for the Get/Set File Position. The file position is already being incremented with the read.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Multiple File MD5 Checksum (Version 8.6).vi 23 KB -
How to create new scope for SharePoint calendar?
How to create new scope for SharePoint calendar?
I have a calendar list to which I want to create following scopes-
Annual View
Half Year 1 (Jan-June)
Half Year 2 (Jul-Dec)
Quarter 1 (Jan-Mar)
Quarter 2 (Apr-Jun)
Quarter 3 (Jul-Sep)
Quarter 4 (Oct-Dec)
How this can be created. Any help appriciated. Thanks.Hi Pratima,
Can you please see below link and code snippet for how to
format date in gridview.
http://www.aspdotnet-suresh.com/2011/05/how-to-set-date-format-in-gridview.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Gridvew Date format</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView runat="server" ID="gvdetails" DataSourceID="dsdetails" AllowPaging="true" AllowSorting="true" AutoGenerateColumns="false">
<RowStyle BackColor="#EFF3FB" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="Date1" HeaderText="Date1" HtmlEncode="false" DataFormatString="{0:s}" />
<asp:BoundField DataField="Date2" HeaderText="Date2" HtmlEncode="false" DataFormatString="{0:D}" />
<asp:BoundField DataField="Date3" HeaderText="Date3" HtmlEncode="false" DataFormatString="{0:m}" />
<asp:BoundField DataField="Date4" HeaderText="Date4" HtmlEncode="false" DataFormatString="{0:d}" />
<asp:BoundField DataField="Total" HeaderText="Total" HtmlEncode="false" DataFormatString="{0:C2}" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="dsdetails" runat="server" SelectCommand="select * from DateFormat" ConnectionString="<%$ConnectionStrings:dbconnection %>"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
Hope this will help you.
Regards
Soni K -
How to create a PR for each Maintenance Order
Dear All,
Please guide me how to create a PR for each Maintenance Order.
I test on Ides, I have some Maintenance Orders, all of them require the same stock material. When I run MRP, system always create one PR for all requirements. I don't know how to change.
Regards,
QuangDDHi,
As you planning for Stock Items, by running MRP, system will create single PR only. If it is non stock items, then it would be possible to create different PR based on Orders.
Regards,
Maheswaran. -
How to create t-code for a table and how to create transaction variant???
Hi,
I have created a custom table zsark.
Now my requirement is : I have to create a transaction variant zsark_var for sm30 and table zsark. I have to disable the output of the first screen. I have to assign the transaction variant to the transaction code of table zsark.
Now,
1. how to create transaction code to a table. Can any one give me the
staps??
2. how to create transaction variant for the above requirement???
Thanks & Regards,
SarkarHi
1 Goto SE93 transaction
2 Choose 5th option Transaction with parameters
3 Give transaction : SM30, Check Skip Initial Screen Press Enter
4 Goto Bottom left corner, click F4 select viewname, on right hand side give table name
5 Press one more time F4, choose update , mark it X on right side.
6 save the transaction.
Thanks
sandeep
reward if helpful -
How to create transaction code for a Z-table
How to create transaction code for a Z-table?
Se93 --> then which radio button to be selected? and what is the program nam e to be givenHi Sam,
<b>Procedure to create a TCODE for ZTABLE:</b>
Create a table maintainance/View for the Z* Table.
Once you create the view goto SE93>Select Parameter transaction and give the short desc.>
Give the transaction as SM30(Skip the first screen-optional)>Check all check boxes under GUI support>In the default values(grid)section first row give the VIEWNAME as you created initially and the second row UPDATE as X.
<u><i>Se93 --> then which radio button to be selected</i></u>
Select the parameter transaction as a radio button.
<u><i>what is the program nam e to be given</i></u>
no need to give any program name. Instead you have to give the transaction code name as SM30.
Pls mark the helpful answers.
Thanks
Eswar
Maybe you are looking for
-
How to read pdf files using java.io package classes
Dear All, I have a certain requirement that i should read and write PDF files at runtime. With normal java file IO reading is not working. Can any one suggest me how to proceed probably with sample code block Thanks in advance.
-
How to filter the data in a table UI/
hi all, I have to put filter and sort functions in my table UI.can ayone please help me how to do this with a code. regrads, Sharan
-
Using Flash Catalyst Custom Component in Flash Builder
I created a custom component in Flash Catalyst that is intended to be used in the way that one would use a BorderContainer in Flex/Flash Builder. Can anyone advise me how I might go about doing this? many thanks, Mark
-
I have a big problem in my account in Game Center .. I have been an account before in the game center and i change it to another one ... when i play any game its change by itself to the last account not still to the new one and i lost my update in my
-
How to create a system restore point in cmd
We team's server can't work before patched We patched every firday. So,I want to create a task to run 'bat' for creating restore point 研小艾