Query for dispatch details for BP SO
Hi experts,
I am new to the forum and would appreciate your help. I am trying to make a report about the pending and dispatched material for BP. The qurey is -
SELECT T0.[DocNum], T0.[CardName], T0.[NumAtCard], T0.[TaxDate], T0.[DocDueDate], T1.[ItemCode], T1.[Quantity], T1.[OpenQty], T2.[DocNum], T2.[DocDate], T2.[ShipToCode], T2.[TrackNo] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, OINV T2 INNER JOIN INV1 T3 ON T2.DocEntry = T3.DocEntry, OPOR T4 INNER JOIN POR1 T5 ON T4.DocEntry = T5.DocEntry, ODLN T6 INNER JOIN DLN1 T7 ON T6.DocEntry = T7.DocEntry WHERE T0.[CardName] = [%0] AND T3.[BaseRef] = T6.[DocNum] AND T7.[BaseRef] = T0.[DocNum] AND T1.[ItemCode] = T3.[ItemCode]
But i get an error message -
1). [Microsoft][SQL Native Client][SQL Server]The conversion of the nvarchar value '3700081929' overflowed an int column. Maximum integer value exceeded. 'User-Defined Values' (CSHS)
Pl help. Thanking you in advance.
Hi..........
Welcome to SAP Forum.......
Please try this....
SELECT Distinct T0.DocNum, T0.CardName, T0.NumAtCard, T0.TaxDate, T0.DocDueDate, T1.ItemCode, T1.Quantity, T1.OpenQty, T2.DocNum, T2.DocDate, T2.ShipToCode, T2.TrackNo FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, OINV T2 INNER JOIN INV1 T3 ON T2.DocEntry = T3.DocEntry, OPOR T4 INNER JOIN POR1 T5 ON T4.DocEntry = T5.DocEntry, ODLN T6 INNER JOIN DLN1 T7 ON T6.DocEntry = T7.DocEntry WHERE T0.CardName = '[%0]' AND T3.BaseRef = T6.DocNum AND T7.BaseRef = T0.DocNum AND T1.ItemCode = T3.ItemCode
Above query wont give any error.
But from your Subject the query report seems give wrong result......
Regards,
Rahul
Similar Messages
-
Query for dispatch details in Delivery
Hi all,
I require simple query which will display item wise dispatch details for delivery.
Query Output required based on delivery document is as follows
Doc Num, Doc Date,Card Name, Item Code, Item Description, Quantity, Batch Number, Comments
Input for query will be From date and To date.
Solution appreciableHi
Try this:
SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName,
T1.ItemCode, T1.Dscription, T2.Quantity, T2.BatchNum, T0.Comments
FROM ODLN T0
inner join DLN1 T1 on T1.DocEntry = T0.DocEntry
LEFT JOIN IBT1 T2 ON T2.BsDocEntry = T0.DocEntry and T2.BsDocType = 15 and T2.BsDocLine = T1.LineNum
WHERE T0.DocDate >= '[%0\]' and T0.DocDate <= '[%1\]'
Thanks,
Gordon -
Af:query for master detail
Hi Experts,
Can we have an af:query to show master detail data ?
What we generally have is af:query showing records of 1 table. What i want is for the records that get populated from af:query in the master table, i want to show the records in the detail table of the row selected
any idea ?
thnksThank you NewBee. It worked and am able to get the detail information from the master table. I am struggling with another implementation. I have 3 radio buttons in the global template which I am referencing in all my pages.
The template has 3 radio buttons. Contacts, Plans and Users. The three queries are completely different from one another.
On click of Contacts, I should display the respective af:query for Contacts, Plans and Users without displaying the resultant table. This query panel will be global to all the pages.
I have tried setting it as follows:
<af:panelGroupLayout layout="vertical"
id="pt_pgl3"
rendered="#{baseBean.searchContactsSelected == 'true'}"
visible="#{baseBean.searchContactsSelected == 'true'}">
<af:query id="qryId1" headerText="Search" disclosed="true"
value="#{bindings.GloablSearchByContactsVOCriteriaQuery.queryDescriptor}"
model="#{bindings.GloablSearchByContactsVOCriteriaQuery.queryModel}"
queryListener="#{bindings.GloablSearchByContactsVOCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.GloablSearchByContactsVOCriteriaQuery.processQueryOperation}"
resultComponentId="::contactSearch:md1"/>
<f:subview id="contactSearch">
<jsp:include page="/contactsSearchResults.jspx"/>
</f:subview>
<af:panelGroupLayout>
I have tried various implementations to the best of my knowledge but its not rendering. Is it possible to navigate to a different jspx on click of Search button of af:query. This will give me an opportunity to display different pages based on the Search action and keeping the search on a global level.
Hope I was clear in explaining the issue
Thanks! -
Query for invoice and distribution detail
hi 2 all
anybody have the query for getting invoice with distribution detail in oracle payable r12.
thanks
zulqarnainselect ass.SEGMENT1 vendor_number,
ass.VENDOR_NAME,
assa.VENDOR_SITE_CODE VENDOR_SITE,
aia.INVOICE_NUM,
aia.INVOICE_DATE,
aia.INVOICE_AMOUNT,
aia.INVOICE_TYPE_LOOKUP_CODE,
gcc.CONCATENATED_SEGMENTS distribution_account ,
gcc1.CONCATENATED_SEGMENTS liability_account,
to_char(aia.GL_DATE) GL_DATE,
AP_INVOICES_PKG.GET_APPROVAL_STATUS( AIa.INVOICE_ID,
AIa.INVOICE_AMOUNT, AIa.PAYMENT_STATUS_FLAG,
AIa.INVOICE_TYPE_LOOKUP_CODE) APPROVAL_STATUS_LOOKUP_CODE
from ap_invoices_all aia,
ap_suppliers ass,
ap_supplier_sites_all assa,
ap_invoice_distributions_all aid,
gl_code_combinations_kfv gcc,
gl_code_combinations_kfv gcc1
where aia.VENDOR_ID = ass.VENDOR_ID
and assa.VENDOR_SITE_ID = aia.VENDOR_SITE_ID
and ass.VENDOR_ID = assa.VENDOR_ID
and aid.INVOICE_ID = aia.INVOICE_ID
and aid.DIST_CODE_COMBINATION_ID = gcc.CODE_COMBINATION_ID
and assa.ACCTS_PAY_CODE_COMBINATION_ID = gcc1.CODE_COMBINATION_ID
--and aia.INVOICE_ID = 81000
and aia.GL_DATE between '01-JAN-12' and '31-MAR-12'
order by aia.GL_DATE
Thanks,
Atul -
Query For Purchase A/P Cycle Details
Hi
All export pls. provide me Query for Purchase A/P Cycle Details i.e Vendor Code Vendor Description doc. date posting date po date amount quantity unit price same as Grpo returns and invoice in singal screen
Thanks & RegardsHi,
What do you mean by Query for Purchase A/P Cycle . All Query for A/P Cycle , you can search in SDN.Any specific unsolved query for you can be posted here.Ok.
Check the details:
1.PO creation
http://e-mory.blogspot.com/2008/01/sap-me21n-create-purchase-order_30.html
2.Goods Receipt
http://e-mory.blogspot.com/2008/02/sap-migo-goods-receipt.html
3.Invoice Verification
http://e-mory.blogspot.com/2007/11/sap-miro-enter-invoice-verification.html
Regards,
Biju K -
Query for details of Sale order , Invoice and COGS
I Need the report cointing following based on month & Business partner
Sale order, Sale Amount, Due date, Invoice Amount, Last Invoice date, COGS amountHi Anantha,
Please check below link and modify according to your requirement.
Sales Order Query for in SAP B1
Query - Sales Orders linked to Deliveries
My Top SQL Queries for SAP Business One
Hope this helps
Regards::::
Atul Chakraborty -
Formatted search query for displaying invoice items details
hi all,
i need to display all the items in AP invoice.kindly suggest me a query for that.
in AP invoice
Ex. row items
code--descqtyprice--
total
I0001--XXXXXXX5--
100 -
500
query should display this row as
code--desc--
price
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
=================================
the query should display as the qty is 5 so it will display the same item 5 times
kindly suggest me some query for formatted search
its very urgent
regards
sandipHi Sandip,
DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
Hope its help for you
Give me reward points,
Regards,
G.Suresh. -
Query for Consolidated tax details
Dear All
I need an output through query in PO in the following format:
BASIC
FREIGHT
VAT
CST
EXCISE (should include cess & hecess)
I have the query for individual breakup. ex. vat,cst,bed,cess,hecess, bed on frieht,cess on freight,hecess on freight,vat on freight,cst on freight,vat on excise, cst on excise etc.,
But i need to have consolidated values for VAT,CST & EXCISE Amounts.
Can anyone help me on this asap
regards
KARTHIKYou can use dsquery and dsget at the command line of a Domain Controller for most of this. To get displayName, email address (mail attribute), and sAMAccountName (pre-Windows 2000 logon name) of all users:
dsquery user -limit 0 | dsget user -display -samid -email
If you want the Common Name, specify -dn for the distinguishedName. Getting the password expiration date takes more code. I have VBScript and PowerShell scripts for generic queries of AD linked on this page:
http://www.rlmueller.net/GenericADO.htm
You are prompted first for the base of the search. Enter nothing for the entire domain. Then you are prompted for the LDAP syntax filter. For all users use:
(&(objectCategory=person)(objectClass=user))
Finally you are prompted for the names of the attributes to retrieve. You can enter:
cn,displayName,mail,pwdLastSet
The pwdLastSet is a large integer, but the program converts this into the corresponding date (in the local time zone) when the password was last changed. Using the domain maximum password age policy, you can tell when the password will expire. The program
has an optional parameter to display results in comma delimited format. You would redirect the output to a text file.
There are scripts to determine the date the passwords will expire, but there is more code. See this example for just one user:
http://support.microsoft.com/kb/323750
Richard Mueller - MVP Directory Services -
Hello Experts,
I'm tryng to develop my first application for EP (v7 SP12) with NWDS (without NWDI).
This application has to read and write data in the EP DB (oracle v10).
I'm using:
<u>a Dictionary Project</u> (define the DB Tables)
<u>a Java Project</u> (define class as DAO, DBManager etc)
<u>a Library Project</u>
<u>an EJB Project</u>
<u>an EAR Project</u>
With these projects I can deploy a <u>webService</u> in my EP server.
BUT I have some problem with a query that I'm tryng to sent to my DB through a DAO Class called by my WebService.
The query is simple and correct but it does not work...
This is the error message returned (the query id in bold)
(column names: GIORNO, NOMEDITTA, NOMEAREA, NOMESETTORE)
<i>HTTP/1.1 500 Internal Server Error
Connection: close
Server: SAP J2EE Engine/7.00
Content-Type: text/xml; charset=UTF-8
Date: Fri, 21 Sep 2007 14:29:57 GMT
Set-Cookie: <value is hidden>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>java.sql.SQLException: com.sap.sql.log.OpenSQLException: The SQL statement <b>"SELECT NOMESETTORE, MIN(? - "GIORNO") AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE"</b> <u>contains the syntax error[s]: - 1:25 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</u></faultstring><detail><ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException xmlns:ns1='urn:GiorniSenzaInfortuniWSWsd/GiorniSenzaInfortuniWSVi'></ns1:getGiorniSettori_com.akhela.giorniSenzaInfortuni.ejb.exception.GiorniSenzaInfortuniException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope></i>
The variable '?' is the today date, the difference <b>"(?-GIORNO)"</b> is an int..
Moreover in my DAO class the query is <b>"SELECT NOMESETTORE, MIN(? - GIORNO) AS GIORNI FROM SRS_DATEINFORTUNI WHERE NOMEDITTA = ? AND NOMEAREA= ? GROUP BY NOMESETTORE ORDER BY NOMESETTORE</b>", instead in the error message is reported <b>MIN(? - "GIORNO")</b>...
We have tryed also with alternative query, for example we used <b>"MIN(SYSDATA - GIORNO)"</b> but <b>SYSDATA</b> was interpreted as column name and not found....
Any help???
Best RegardsHi, I found something about the Host Variable (http://help.sap.com/saphelp_nw70/helpdata/en/ed/dbf8b7823b084f80a6eb7ad43bdbb9/content.htm), there explain that if you want to use an host variable you have to put ':' as prefix..
My problem is that <u>I need to extract the minimum of the subtraction between two dates:</u>
Query <b>MIN(? - GIORNO)</b> --> <i>Error: the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
So I tried to use the ':' as indicated in the manual..
<b>MIN:(? - GIORNO)</b> --> - <i>SQL syntax error: the token ":" was not expected here
- expecting LPAREN, found ':'</i>
<b>MIN(:(? - GIORNO))</b> --> <i>- 1:25 - Open SQL syntax error: :PARAMETER not allowed
- 1:26 - SQL syntax error: the token "(" was not expected here
- 1:26 - expecting ID, found '('</i>
Then I tried to avoid the MIN() function and I tried to do just the subtraction:
<b>? - GIORNO</b> --><i> - 1:21 - the arithmetic expression >>? - "GIORNO"<< contains a host variable (parameter marker)</i>
<b>:(? - GIORNO)</b> --> <i>- 1:21 - Open SQL syntax error: :PARAMETER not allowed
- 1:22 - SQL syntax error: the token "(" was not expected here
- 1:22 - expecting ID, found '('</i>
<b>'2007-09-24' - GIORNO</b> --> <i>- 1:34 - SQL syntax error: first argument of operator "-" must be a number, date/time or interval
- 1:43 - SQL syntax error: arguments of operator "-" do not have correct types
- 1:43 - SQL syntax error: derived columns in SELECT list with AS must be values</i>
<b>GIORNO - GIORNO</b> --> <i>- 1:21 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated
- 1:30 - the group by list and the select list are inconsistent: the column >>"GIORNO"<< is neither grouped nor aggregated</i>
Why these parts of query are not accepted???
I don't understand why... I hope you can help me.
Best Regards
Alessandro -
Operations manager failed to run a wmi query for wmi events (0x800706ba)
Hi everyone,
I've been working on this issue for a while and I am still no closer to finding out what the problem is. If anybody can offer any other advice or things to check, I'm all ears.
I'm running SCOM 2012 R2 with UR2, and the Cluster Management Pack v6.0.7063.0
My problem is on one particular batch of cluster servers where I am getting the following error.
Name: Operations Manager failed to run a WMI query for WMI events
Alert Description:
Module was unable to enumerate the WMI data
Error: 0x800706ba
Details: The RPC server is unavailable
Workflow name: Microsoft.Windows.Cluster.Node.StateMonitoring
Instance Name: servername.domain.local
Instance ID: {instance_id}
Management group: SCOM_Management_Grp_Name
I am getting this alert regardless of whether I run the Windows Cluster Action Account as Local System, or as a domain user with full local admin privileges on all the cluster nodes.
When looking at the management pack and the workflow in particular (Microsoft.Windows.Cluster.Node.StateMonitoring), I can see that it's trying to access
MSCluster_Node in the root\MSCLUSTER WMI namespace.
This is the workflow for your information...
<UnitMonitor> ID="Microsoft.Windows.Cluster.Node.StateMonitoring" Accessibility="Public" Enabled="onEssentialMonitoring" Target="ClusLibrary!Microsoft.Windows.Cluster.Node" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="ClusLibrary!Microsoft.Windows.Cluster.CheckState" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Cluster.Node.StateMonitoring.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="ClusLibrary!Microsoft.Windows.Cluster.Node"]/ClusterName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Online" HealthState="Success" />
<OperationalState ID="Warning" MonitorTypeStateID="Partial" HealthState="Warning" />
<OperationalState ID="Error" MonitorTypeStateID="NotOnline" HealthState="Error" />
</OperationalStates>
<Configuration>
<ClusterObjectName>$Target/Property[Type='ClusLibrary!Microsoft.Windows.Cluster.Node']/NodeName$</ClusterObjectName>
<PollInterval>60</PollInterval>
<ClusterObjectClass>MSCLUSTER_Node</ClusterObjectClass>
<OnlineExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='EventNewState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</OnlineExpression>
<OnlineExpressionOnDemand>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</OnlineExpressionOnDemand>
<PartialExpression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='EventNewState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='EventNewState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">3</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</PartialExpression>
<PartialExpressionOnDemand>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">3</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</PartialExpressionOnDemand>
<NotOnlineExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='EventNewState']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='EventNewState']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='EventNewState']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">3</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</NotOnlineExpression>
<NotOnlineExpressionOnDemand>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='State']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">3</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</NotOnlineExpressionOnDemand>
<WMIFields>Name, State</WMIFields>
</Configuration>
</UnitMonitor>
I can confirm that I am able to browse the MSCluster_Node class locally, as well as remotely using WMIEXPLORER and WBEMTEST,
however it only works when I set the Authentication Level to
Packet Privacy. If I do not select Packet Privacy, a WMI event log error 5605 is logged on the remote servers application log that says...
The root\mscluster namespace is marked with the RequiresEncryption flag. Access to this namespace might be denied if the script or application does not have the appropriate authentication level. Change the authentication level to Pkt_Privacy
and run the script or application again.
I can confirm that all firewalls are turned off, and there are no firewalls between the management servers and the agents in question. AV exclusions have been done and appear to be in place. The nodes are all Windows 2008 R2 with SP1. As
far as I can tell there is plenty of memory available on each of the nodes in question (50%+) of RAM is available.
If I manually run the "Discover the Windows Server 2008 R2 Cluster Components" task in the Cluster Service State section of the management pack in the Monitoring Pane in the console, on the nodes in question - the discovery runs successfully.
Does anybody have any other ideas or suggestions I could try?
Many thanks in advance,
Noel.
http://www.dreamension.netHi,
Common causes of RPC errors include:
Errors resolving a DNS or NetBIOS name.
The RPC service or related services may not be running.
Problems with network connectivity.
File and printer sharing is not enabled.
For more information, please review the link below:
Windows Server Troubleshooting: "The RPC server is unavailable"
http://social.technet.microsoft.com/wiki/contents/articles/4494.windows-server-troubleshooting-the-rpc-server-is-unavailable.aspx#Identify
Troubleshooting RPC Errors
http://technet.microsoft.com/en-us/magazine/2007.07.howitworks.aspx
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Query for Price difference account when item is not sold but not on stock
Hi Experts!
One of my clients accountant requires a report which will help for what to do with the balance of the price difference account.
At the and of the year there are some postings on this account, but not every item that hadnt been on stock when A/P Invoice arrived were sold. Some item were waistrel and put into a waistrel warehouse, but not sold.Some item were sent back to the supplier, but not sold.
Is it possibble to make a query for knowing where to post the balance of the price difference account? Not all should be post to the Cost of goods sold.
Thank you in advance!Hi,
The query is possible. However, it is a complicated one. It is also need to involve detailed analysis to your transaction histories. You may start from OINM table to check.
Thanks,
Gordon -
OpenJPA is firing separate query for embedded class in the entity
Hello experts,
I have an Embedded class in my entity which has some common similar columns for all the tables.
e.g
@Entity
@Table(name = "MY_TABLE")
public class MyTable implements Serializable {
//... some specific fields here
@Embedded
@EagerFetchMode(FetchMode.JOIN)
private CommonRowDetails commonRowDetails;
//...getters and setter below
And the class CommonRowDetails contains some audit columns as
@Embeddable
public class CommonRowDetails implements Serializable {
@Column(name = "ROW_ADD_STP", updatable = false)
private Date rowAddStp;
@Column(name = "ROW_ADD_USER_ID", updatable = false)
private String rowAddUserId;
@Column(name = "ROW_UPDATE_USER_ID")
private String rowUpdateUserId;
@Column(name = "ROW_UPDATE_STP")
private Date rowUpdateStp;
//...getters and setter below
All above columns are part of same table "MY_TABLE"
So when I select the entity MyTable, I can see a separate query is getting executed for selecting (ROW_ADD_STP, ROW_ADD_USER_ID, ...) which is definitely not required. I also added the annotation @EagerFetchMode(FetchMode.JOIN) on field CommonRowDetails to select those with join/in same query.
Please help me to know, how to avoid OpenJPA firing a separate query.
ENV details
DATABASE
databaseProductName: DB2/LINUXX8664
databaseProductVersion: SQL09075
driverName: IBM DB2 JDBC Universal Driver Architecture
driverVersion: 3.58.81
OS-SERVER
WebSphere Platform 8.0.0.2 [BASE 8.0.0.2 cf021148.03]
Host Operating System is Windows XP, version 5.1
Java version = 1.6.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
OPENJPA- 2.1.2Hello Forum,
got a response in the SAP forum - Issue is a bug in the SAP NetWeaver
app. server.
Henning Malzahn -
Reg. Query for UDFs.
Hello All,
I've created a multiple UDFs Like, Vendor Name,Vendor Address,Vendor Excise Details like ECC No,Range, Division,VAT No,CST No. in Marketing Documents.
I want to write a query, for example if I select the Vendor Name, the vendor address and excise details should pick up automatically from that vendor master record. Please help.
Thanks,
Pratheeviraj.Dear Avijit,
Thanks for your reply.
I can't understand your solution. Can you please explain me in detail?
I'm giving the scenario in detail,
In the marketing document 'Outgoing Excise Invoice', I've created UDFs like vendor name, vendor address, vendor excise number, etc., my requirement is the moment I select the vendor in Vendor Name UDF, the address and excise number should get populated in the respective UDFs.
Thanks,
Pratheeviraj -
consider this situation,
Two or more productid will be accquired by same customerid, by same shipvia, on the same day of the week of shipped date. i want the simple query for this.
my tables are from northwind:
[orders] = OrderID, CustomerID, EmployeeID, OrderDate, RequiredDate, ShippedDate, ShipVia, Freight, ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry.
[orders details] = OrderID, ProductID, UnitPrice, Quantity, Discount.
i tried some but it is not exact, it gives wrong result.
select pd.CustomerID,pd.ProductID, pd.no_of_time_purchased, sd.ShipVia, sd.same_ship_count, shipped_day from
select ProductID,o.CustomerID,COUNT(productid) as no_of_time_purchased
from orders o join [Order Details] od on o.OrderID=od.OrderID group by ProductID,o.CustomerID
having count(od.ProductID) >1) pd
join
(select OrderID,customerid, shipvia, count(shipvia)as same_ship_count, DATENAME(DW,ShippedDate)as shipped_day from orders
group by customerid, ShipVia, ShippedDate having COUNT(ShipVia) > 1 ) sd
on sd.CustomerID=pd.CustomerIDHi,
I think I have a solution that will at least give you a clue how to go about it. I have simplified the tables you mentioned and created them as temporary tables on my side, with some fake data to test with. I have incldued the generation of these temporary
tables for your review.
In my example I have included:
1. A customer which has purchased the same product on the same day, using the same ship 3 times,
2. Another example the same as the first but the third purchase was on a different day
3. Another example the same as the first but the third purchase was a different product
4. Another example the same as the first but the third purchase was using a different "ShipVia".
You should be able to see that by grouping on all of the columns that you wich to return, you should not need to perform any subselects.
Please let me know if I have missed any requirements.
Hope this helps:
CREATE TABLE #ORDERS
OrderID INT,
CustomerID INT,
OrderDate DATETIME,
ShipVia VARCHAR(5)
CREATE TABLE #ORDERS_DETAILS
OrderID INT,
ProductID INT,
INSERT INTO #ORDERS
VALUES
(1, 1, GETDATE(), 'ABC'),
(2, 1, GETDATE(), 'ABC'),
(3, 1, GETDATE(), 'ABC'),
(4, 2, GETDATE() - 4, 'DEF'),
(5, 2, GETDATE() - 4, 'DEF'),
(6, 2, GETDATE() - 5, 'DEF'),
(7, 3, GETDATE() - 10, 'GHI'),
(8, 3, GETDATE() - 10, 'GHI'),
(9, 3, GETDATE() - 10, 'GHI'),
(10, 4, GETDATE() - 10, 'JKL'),
(11, 4, GETDATE() - 10, 'JKL'),
(12, 4, GETDATE() - 10, 'MNO')
INSERT INTO #ORDERS_DETAILS
VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 2),
(5, 2),
(6, 2),
(7, 3),
(8, 3),
(9, 4),
(10, 5),
(11, 5),
(12, 5)
SELECT * FROM #ORDERS
SELECT * FROM #ORDERS_DETAILS
SELECT
O.CustomerID,
OD.ProductID,
O.ShipVia,
COUNT(O.ShipVia),
DATENAME(DW, O.OrderDate) AS [Shipped Day]
FROM #ORDERS O
JOIN #ORDERS_DETAILS OD ON O.orderID = OD.OrderID
GROUP BY OD.ProductID, O.CustomerID, O.ShipVia, DATENAME(DW, O.OrderDate) HAVING COUNT(OD.ProductID) > 1
DROP TABLE #ORDERS
DROP TABLE #ORDERS_DETAILS -
Adhoc Query for Qualifications.
Hi Guys.
Can some body help me creating an Adhoc Query for the active employees whose Qualifications along with there Name reflects, can somebody guide me in this regard.
Regards,
Venkat.Hi Venky,
You can pull the qualification details using SAP quick viewer (Tcode SQVI) and using logical database PNP
-> Go to Tcode SQVI
-> give Query name and Create
-> In the data source field, select Logical database
-> In logical database give PNP or PNPCE
-> Then in basis mode u can find IT 0024 in Planning data header
-> and then select the list fields u need and the additional selection criteria also
-> Then execute the query.
With smile,
Venkatesh kumar -
Source, and Fix, for Event 8194 VSS "access denied" querying for the IVssWriterCallback
Friends I encountered this error, pasted intact below, just a couple of days ago on a ia64 architecture HP system running Windows 7 Ultimate x64
It appears that I may have a permissions issue somewhere but I do not know how to permanently root-cause-remedy it. I should note that I do not have any routine backup service running on this particular mule, and no such animal was working at the time
of the issue, so I'm baffled as to what invoked the process. To anticipate a question you may have: I did not use on this system a recent "registry cleanup" tool except that which Microsoft uses in a couple of automated packages: one to do
.NET cleanup, and another to resolve Uninstall/Install issues [this one succeeded... the .NET issue is another story].
This system is a Homegroup owner/creator, but is not on a domain. It is essentially a lab mule that I use for tech work - other windows 7 clients fetch files from it via a bridged wifi AP.
Thank you in advance for any direction you have for me.
Paste below
twest
Log Name: Application
Source: VSS
Date: 8/18/2012 6:36:49 PM
Event ID: 8194
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: BossHoss-PC
Description:
Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr = 0x80070005, Access is denied.
. This is often caused by incorrect security settings in either the writer or requestor process.
Operation:
Gathering Writer Data
Context:
Writer Class Id: {e8132975-6f93-4464-a53e-
1050253ae220}
Writer Name: System Writer
Writer Instance ID: {a2af3afe-afb1-4346-bfd6-380873f59328}
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="VSS" />
<EventID Qualifiers="0">8194</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-08-18T23:36:49.000000000Z" />
<EventRecordID>34091</EventRecordID>
<Channel>Application</Channel>
<Computer>BossHoss-PC</Computer>
<Security />
</System>
<EventData>
<Data>0x80070005, Access is denied.
</Data>
<Data>
Operation:
Gathering Writer Data
Context:
Writer Class Id: {e8132975-6f93-4464-a53e-1050253ae220}
Writer Name: System Writer
Writer Instance ID: {a2af3afe-afb1-4346-bfd6-380873f59328}</Data>
<Binary>2D20436F64653A20575254575254494330303030313236302D2043616C6C3A20575254575254494330303030313231342D205049443A202030303030313235322D205449443A202030303030313236382D20434D443A2020433A5C57696E646F77735C73797374656D33325C737663686F73742E657865202D6B204E6574776F726B53657276696365202020202020202D20557365723A204E616D653A204E5420415554484F524954595C4E4554574F524B20534552564943452C205349443A532D312D352D3230</Binary>
</EventData>
</Event>
Techwest ResourcesHi,
Firstly, would you please let us know what backup application you do use. Is it the build-in one?
Meanwhile, please refer to
Security Considerations for Requesters for details.
Hope this helps.
Jeremy Wu
TechNet Community Support
Maybe you are looking for
-
I have a Dell 964 printer and want to know if I can run it on my Mac pro book
-
Need help with Quizzes & Advanced Actions
Hi, I am relatively new to Captivate (v6) and I am looking for a way to force learners to respond to a question BEFORE navigating to the next page. On my question slides, I have a submit button and the next page button but no playbar. I want the subm
-
Connecting a pH sensor to an A/D converter then to computer via LPT1
Hello, I am new to Labview and am having some problems getting data from my sensor. I have my sensor connected to an a/d converter which is connected to my computer. I am now trying to build a VI to read the pH data from my sensor, however I have not
-
Time Machine doesn't manage the space on my external drive- no space left
I have a 500GB internal drive and have a 500Gb external firewire drive. I have around 200Gb of music and video files but had been happily letting TM get on with things. Today i started to get an error screen saying that the external drive was out of
-
Tape Consumption/Utilization on System Center Data Protection Manager 2012
Hi Guys, I have setup System Center DPM 2012 for Exchange 2010 Backup, the tape library that i am using is Dell TL4000 with 45 Slots and two LTO 5 Drives. The total size of Exchange backup is 33 TB but the no. of tapes used to backup are 16 LTO5 tape