Query that displays number of orders shipped in state of Texas
Hello experts,
I would need a report that displays the following
Deliver doc Number,Posting date,Item Number,Item Description and the ship to state to be "Texas".
If possible we also need a date selection range parameter that would help filter the report.
Thanks
Edited by: Sheena Lin on Apr 14, 2011 9:39 PM
Edited by: Sheena Lin on Apr 14, 2011 9:41 PM
Hi,
Try this:
SELECT T0.DocNum, T0.DocDate, T1.ItemCode, T1.Dscription
FROM ODLN T0
INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
WHERE T0.Address2 LIKE '%TX%' AND T0.DocDate > [%0]
AND T0.DocDate < [%1]
Thanks,
Gordon
Similar Messages
-
SCCM report query that displays count of cpus per host and if host is physical or virtual
Hello,
I have this query that displays the count of CPUs per host. How can I add a column to show if the host a physical or virtual?
SELECT
DISTINCT(CPU.SystemName0) AS [System Name],
CPU.Manufacturer0 AS Manufacturer,
CPU.Name0 AS Name,
COUNT(CPU.ResourceID) AS [Number of CPUs],
CPU.NumberOfCores0 AS [Number of Cores per CPU],
CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
FROM [dbo].[v_GS_PROCESSOR] CPU
GROUP BY
CPU.SystemName0,
CPU.Manufacturer0,
CPU.Name0,
CPU.NumberOfCores0,
CPU.NumberOfLogicalProcessors0I see that you have posted this exact question in another forum for CM12, however this is an CM07 forum.
Are you CM07 or CM12?
If you are CM12, use my answer here.
http://www.systemcentercentral.com/forums-archive/topic/sccm-report-query-for-cpu-cores/
If you are CM07, this is NOT a simple how exactly do you detect that a computer is a VM? You can guess by looking at the manufacturer name but it is only a guess.
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
Report to display number of items sold by state
Hello experts,
I would need a report with the following paramters:
Deliver doc number,posting date,ship to state,item number,item desc,quantity.Is it possible to have the selection for the date range?
ThanksHello Gordon,
This is what I noticed.
This query shows the ship to state for the order if they are not on the User defined fields on a delivery document.
Let me be more clear
This query is displaying only the customers where the ship to address is entered in the BP master data.If the ship to address is entered at the sales order level it is not displaying the ship to state.
I hope this makes sense
Thanks -
How display number of row in select statement
How can I display number of row in select statement?
Table
data1 data2
xxx ccd
wss qwe
qws uij
I need get from SELECT statement:
1 xxx ccd
2 wss qwe
3 qws uijuser13734495 wrote:
Thank you from answer.
Statement
select rownum rn, data1, data2 from table
is good.
And what have I do went I use
select rownum rn, data1, data2 from table order by data1
and I get
3 qws uij
2 wss qwe
1 xxx ccd
I need
1 qws uij
2 wss qwe
3 xxx ccdhence the importance of describing the complete problem.
select
rownum,
data1,
data2
from(
select
data1,
data2
from
table
order by
data1) -
Query to display in particular order
create a query that willl display the total no of employees and that of total number who were hired in 1980, 1981,1982 with column headings .
The output shoudl be like this
Total 1981 1982 1983
13 5 5 3SQL> select (sum(yr_97)+sum(yr_98)+sum(yr_99)) total,
sum(yr_97) yr_97,
sum(yr_98) yr_98,
sum(yr_99) yr_99
2 from
3 (select count(1) yr_97 ,0 yr_98,0 yr_99 from employees
4 where to_char(hire_date,'YY') = '97'
5 union
6 select 0 yr_97,count(1) yr_98,0 yr_99 from employees
7 where to_char(hire_date,'YY') = '98'
8 union
9 select 0 yr_97, 0 yr_98,count(1) yr_99 from employees
10 where to_char(hire_date,'YY') = '99')
11 /
TOTAL YR_97 YR_98 YR_99
69 28 23 18
Above query retrieves the total record from employees table based on the
year of hire_date -
Need a report that display number of SR without Activities
If I want to show number of SR without activity, is there any good solution?
my solution:
Report 1: Service Request History
Owner, service number
put advanced filter : that service number is not equal to any SR in Report2
Report 2:Activity History
Service Number , Activity subject(it will show those SR with activities)
then Report1 will show those detail SR without activity
but the performance is so bad, it costs lot of time to run it.......
anybody has any idea?
Thanks
AmandaHi,
Take a look at Combined analysis.
In Step 1 of the the reports designer - (Siebel Answers), Expand the Advanced Section.
Select the combine with Similar Analysis.
You then do the first report for All SR's. The second report for All SR's with Activities.
Then use the "minus" to only return the SR's without Activities.
I will warn you though, combined analysis is quite complex and challenging.....GOOD LUCK
Regards
Minesh Patel
Innoveer Solutions -
How to write sql query that display comma suppurated result using Group by
Hi,
I am having data like bellow ,
Above result got from joining two tables VMTAGroupClient,VMTAipNames .
Query i have written to display above result is,
select vgc.VMTAGroupId,vn.VMTAName from VMTAGroupClient vgc inner join VMTAipNames vn
on vgc.VMTAID=vn.VMTANameID group by vgc.VMTAGroupId,vn.VMTAName
using the VMTAGroupId column how to write query to display result result like,
VMTAGroupID VMTAs
1 VMTA1,VMTA3
2 VMTA2,VMTA4,VMTA5
Regards,
Anwar ShaikSatheesh,
Here in my case data need to read from two tables VMTAGroupClient, VMTAipNames.
VMTAGroupId is in one table and VMTAName column in some other table.Iin both the tables VMTAID is common.
Please check the above result displayed data from two tables.
can we write same query using join?
Anwar Shaik -
Query to display one row per group based on highest value
I have the following table and I want to be able to create a query that displays only the highest number based on a group. (see below)
Acode
aname
anumber
a
Jim
40
a
Jim
23
a
Jim
12
b
Sal
42
b
Sal
12
b
Sal
3
Acode
aname
anumber
a
Jim
40
b
Sal
42Multiple ways
using aggregation
SELECT Acode,aname,MAX(anumber) AS anumber
FROM table
GROUP BY Acode,aname
using subquery
SELECT Acode,aname,anumber
FROM table t
WHERE NOT EXISTS (
SELECT 1
FROM table
WHERE Acode = t.Acode
AND aname = t.aname
AND anumber > t.anumber
using analytical function
SELECT Acode,aname,anumber
FROM
SELECT *,ROW_NUMBER() OVER (PARTITION BY Acode, aname ORDER BY anumber DESC) AS Rn
FROM table
)t
WHERE Rn = 1
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Query for Alert on production order to be released
Dear all users and experts,
I need a query for getting an alert on production orders to be released (from planned status to release status) by whether reading the release date of production orders created from 'order recommendation window' or by reading the due date of production order and substract the lead time(days) of the item from its due date or by any means you know best.
Thanks and best regards,
Farhan SufiHi Gordon and Joseph,
Thanks to both of you for giving me queries.
Gordon, I made 3 production orders for testing from MRP order recommendation window from which 2 production orders has release date of today 9th July, 2010 (due date 12th July monday) and the 3rd one has release date of after weekend i.e. 12th July 2010 (due date is 13th July). release dates are calculated by MRP acording to the items' lead time and due date.
Gordon, when I applied your query It gave me msg 'no data was found as a result of this selection criteria' Can you explain what your query will give me in result?
where as Joseph, when I applied your query on alert, it gave me all 3 production orders as an alert to be released. I was expecting it will give me alert for 2 production order for today as their release date in MRP is today(9th July, 2010) and the alert for 3rd production order should come on 12th July and not today.
what I understood your query is displaying all production orders which have status 'planned' regardless of their release date.is it?
Joseph can you edit this query in such a way that It should consider the release date (calculated from due date and lead time in MRP order recommendation window) and display only those production orders which should be released today and exclude those which have release date in future. so that I can get alert for only those production orders which should be released today.
I hope good response from both of you
Thanks and best regards,
Farhan -
Query to display data monthwise and calculate total for first 12 months
Hi All,
I have a query that displays forecast data monthwise.
This has been achieved by adding 0CALMONTH on top of key figure structure.
Eg: -
APR 2011 MAY 2011 JUNE 2011 ....... NOV 2013
Forecast Forecast Forecast Forecast
PRODUCT 1 10 15 20 25
Now there is a requirement to include new column that displays total of first 12 months data only.
How can I achieve this without repeating the total value for every value of 0CALMONTH?
Eg: -
APR 2011 MAY 2011 JUNE 2011 ....... MAR 2011 TOTAL of APR 2012 ....... NOV 2013
Forecast Forecast Forecast Forecast 12 months Forecast Forecast
PRODUCT 1 10 15 20 25 300 10 30
Any inputs will be appreciated.
Thanks & Regards
ManishaHi,
As far as i understand your requirement is to make a new keyfigure which has to be total of 12 months and that keyfigure should not get splitted based on calmonth which you have kept above the key figure structure in columns.
I dont think it will be possible to achieve it that way.You need to make a fixed structure which will dispaly data for say next 12 months or whatever your user requirement is and you need to make a seperate keyfigure with month offsets and then you can make a seperate total keyfigure(of 12 months).
With the help of text variable type replacement path you can get the seperate month names for all your forecasted keyfigures.
I had the same requirement but my user wanted to see the next six months data only so i made it with the help of month offsets.
If you get any other work around to achieve your requirement then please do share the solution with us.
Hope it helps.
Regards,
AL
Edited by: AL1112 on Sep 6, 2011 9:34 AM -
Currently working on SAP B1 v8.82
I'm looking to generate a query that will give an overall report for a given customer that shows Sales Order No, Invoice No, Sales Order Total, Invoice Total, Amount Paid on Invoice, Amount Remaining on Invoice, Down Payments Available, Open on Sales Order.
I'm not sure what the best way to select the columns in bold above. Invoice Total should be self-explanatory. Amount Paid should be any down payments or applied payments on the invoice. The balance due on the invoice (which seems to be T0.DocTotal if I'm not mistaken) should = 'Invoice Total' - 'Amount Paid on Invoice'. In the Down Payments Available column I want the total amount of money on the account or on down payments that aren't tied to a Sales Order. If a client overpaid in the past for instance and there's a credit on their account, then it should contribute to this sum. Open on Sales Order should be pretty easy. I guess it's just the sum of everything that is still open on the Sales Order. I'm just not sure what the best way to sum all the un-delivered freight, tax, and line items is. Here's what my query looks like so far.
SELECT DISTINCT T4.[DocNum] [Sales Order No],
T0.DocNum [Invoice No],
T4.DocTotal [Sales Order Total]
T0.DocTotal [Amount Outstanding],
FROM OINV T0
INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN DLN1 T2 ON T1.BaseEntry = T2.DocEntry AND T1.BaseLine = T2.LineNum
INNER JOIN RDR1 T3 ON T2.BaseEntry = T3.DocEntry AND T2.BaseLine = T3.LineNum
INNER JOIN ORDR T4 ON T3.DocEntry = T4.DocEntry
INNER JOIN OSLP T5 ON T4.SlpCode = T5.SlpCode
WHERE T0.CardName Like '%%[%0]%%'
GROUP BY T4.DocNum, T0.DocNum, T0.DocTotal, T4.DocTotal
I tried doing a little searching around for queries similar to what I need, but I could find exactly what I was looking for and I'm very unfamiliar with OJDT, JDT1, and ITR1 tables which I think might be important to finding unapplied payments...Thanks. There's a few problems though.
1) It seems that OINV DocTotal != Balance Due. I'm seeing a number of invoices where there was a balance due, but we applied additional money (either we took another incoming payment and applied it or applied money from the account balance, etc.) and yet it still shows a total.
2) It's pulling incoming payments from different customers. I think this is because the table was joined based on "RCT2 T4 on T4.[DocEntry] = T3.[DocNum] and T4.[InvoiceId] = T2.[LineNum]" In one example I have 2 incoming payments 446 and 614. Both have the DocEntry 542, but one relates to A/R Invoice 542 (for a different client) while the other relates to Down Payment Invoice 542. *I was able to fix this by adding WHERE T5.CardCode = [%0]*
3) I'm going to work with this a little bit and see if I can alter it to make it work for me. Basically this query falls a little short on the following:
- Doesn't include incoming payments that aren't linked to a down payment invoice.
- Does not give the Invoice Total (I'd like to know how much of the SO was invoiced. DocTotal seems to give me Amount Invoiced - Down Payments. I'm not sure the best way to get this number. Maybe I could do the sum of each line * tax + freight)
- Does not give the outstanding amount on an invoice. The ARtotal [DocTotal] column gives me how much was owed when the invoice was created, but it doesn't tell me what is currently owed.
- Lastly it may complicate the query too much and could be left off, but it would be nice to see if they have any money from credits or incoming payments that has not been applied. Perhaps this would be easily accomplished by simply pulling in their account balance. -
The shippment form didn't like it when I included the apartment and building number on the same line (ex: 123-46 Downtown st.), So I wrote the apartment number on the next line, which is designated for that. However, in the shipping information I've recieved after having ordered the product, the building address is correct, but instead of the apartment number underneath it says the name of the building. Is there any way to deal with this? Also, If I'm not there to personally answer the door for the UPS employee twice, the package goes back to apple? If that happens, do I get all my money back?
it is still there just not visible on the email
login to the apple store and look at your order there, you will see the full address or if you're still worried, call apple directly and verify it -
Count of Number of Orders in BEX query
Hi,
for Count number of Orders, have created a KF calculated on Order Quantity and then, in property, have inserted in Exception Aggregation the counting of All values of characteristic Sales Document and then on the KF calculated I do an KF restricted on the orders rejected. For order cancelled (Recordmode = R) the calculation it is different if I make a FULL or a FULL and then a delta, according to if the order has more items and only one item annulled or if the order has only one item and then it comes cancelled.
How can I count the orders in these cases?
Many thanks.
CharlyHi Parth,
following the example of the query:
1) Only document 220062675 with Reverse (cancelled) without drilldown Document
Calendar Year/Month----# Orders AVG--Counter for Orders-----# Orders
05.2011--00--
0
Overall Result--00--
0
2) Only document 220062675 with Reverse (cancelled) with drilldown Document
Calendar Year/Month-----Sales document# Orders AVG--Counter for Orders-----# Orders
05.2011--22006267500--
0
Overall Result--00--
0
With only this document the calculated is good.
3) Two document: 220062675 with Reverse (cancelled) and 220062675 (Normal) without drilldown Document
Calendar Year/Month----# Orders AVG--Counter for Orders-----# Orders
05.2011--11--
2
Overall Result--11--
2
The problem here is that # Orders (Counter for Orders / # Orders AVG) is 2 and not 1.
4) Two document: 220062675 with Reverse (cancelled) and 220062675 (Normal) with drilldown Document
Calendar Year/Month-----Sales document# Orders AVG--Counter for Orders-----# Orders
05.2011--22006267500--
0
05.2011--22006267611--
1
Overall Result--11--
1
In this case, the count of orders is different if drilldown or not.
Charly
Edited by: Charly1 on Jun 2, 2011 4:56 AM -
Creditreport that displays Sales Orders with Material Availability Date as
Hi
I need input if the following requirement can be met in FSCM credit mgmnt.
Currently In FDK43 there is a total sales figure that represents the Sales that are consuming the Credit Limit assigned to the customer, unfortunately there is no drill down on this number to see which sales orders are responsible for the consumption of credit
Do we have any sales report that displays Sales Orders with Material Availability Date as an output in conjunction with Credit limit .Not in standard provided. Custom program is required.
Regards
Hein -
Display number of entries per sort order
G'day all.
Does anybody know how I can display number of entries per sort order in
ALV grid.
i.e. ABC 2000
2000
2000
3 (entries) 6000
DEF 1000
HIJ 2000
2 (Entries) 3000
5 (Total Entries) 9000Hi,
The way I did it I used "AT END OF " statement and added my amount to a
variable and then move my variable in work area and then modified your
internal table from work area transporting that field or depending on
your requirement that you need to add a separate line for totals append
the internal table which you are going to use it for first display. Then
after the set_table_for_first_display I added the alv_build_sort
criteria. And call method alv_list->set_sort_criteria exporting the
internal table i_sort.
Cheers,
Chaitanya
Maybe you are looking for
-
Can I delete all of the images in "All Images" without losing any originals?
Can I delete all of the images in "All Images" without losing any original photos? Thank you.
-
To upload a flat file into BW using a variable entry in web application
hi guys, how to upload a flat file into the web browser using a a variable entry in the wad application. Thanks, your help will be duly appreciated Message was edited by: Vj.R T
-
Hi All, I am using SharePoint List Connectors to load the data from Sharepoint list to Sql server. I have created an ssis package and attached to the SQL agent job in works fine SharePoint Source dev url : http://company.dev.com (working fine)(http)
-
Acrobat Pro: Can't select an item
Hello, I'm new to editing PDFs and I'm unable to select an item unless I click-and-drag a box around it. This wouldn't normally be a big problem, but the item I want to remove is below some text elements and vector drawings. I'm trying to remove the
-
Get the current client-user password
Hello, I implement the following code: IWDClientUser user = WDClientUser.getCurrentUser(); String name = user.getFirstName() + " " + user.getLastName(); that works without any problems. But I need also the password of the current client-user. Is