Query for finding Unpacked Item
Hi
I created a Sales Order and Manual Packing is completed.
Example :
In a Sales order , having different 25 items, I missed to pack one item in the sales order.
I wanted to write a query (report) to find the item which is packed and unpacked, group by the sales order.
Pls help me out in the table , column name, status of the column.
If you have a sample query,pls do share with me.
Regards
Yram
I don't have a , But you can join tables like this:
See delivery lines associated with order line (source_type=OE)
check respective parent delivery line (source_type=WSH) --This is delivery line created with respect to LPN
join given delivery with wms_license_plate_numbers to find LPN
Similar Messages
-
How to create ABAP Query for vendor open items
HI,
My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.Hello,
Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
For Query you can use SQ01.
USE BSID & BSAD for AR open/clear items...
LFA1, LFB1 are vendor master data tables
This is FYI
Hope this helps.
Rgds
Rajendra -
Write a query for finding STDDEV for OLAP Cube
Can anybody post a sample query which will find the standard deviation of sales for each month in the sample GLOBAL OLAP schema for Oracle 11g.
The OLAP option automatically generates a set of relational views on cubes, dimensions, and hierarchies in Oracle 11g. So how can i write a query for finding the Standard deviation on these views.The easiest way to do this is to do this directly within the AW using a custom calculated measure. In AWM11g you can use the 11g custom measure wrapper to execute the STDDEV function:
olap_dml_expression('function',data type)
For example
olap_dml_expression('STDDEV(cube_name, time_dimension_name)',number)
You can then simply expose this calculated measure as another column in your SQL View and then there is no need to use the SQL equivalent. This means the calculation is performed inside the AW (which is as close to the source data as you can get) ensuring performance of the whole query remains high.
If necessary you can take this a step further, if required, and wrap the STDDEV calculation within an OLAP DML program that would allow you to manipulate the status of time within the calculation. For example, you may want the STDDEV calc to only take into account the last 12 time periods rather than all time periods currently in status.
Hope this helps
Keith Laker
Oracle EMEA Consulting
OLAP Blog: http://oracleOLAP.blogspot.com/
OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
DM Blog: http://oracledmt.blogspot.com/
OWB Blog : http://blogs.oracle.com/warehousebuilder/
OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html -
Query For Finding Yearly Opening and Closing Balance for All the Items
Hi Experts,
I am working on Query Based Report for finding the Yearly Opening and Closing Stock for all the Items
i will give yearwise selection and I want opening and closing stock in between that years
Warm Regards,
Sandip Kokate
Edited by: Sandipk on May 20, 2011 1:58 PMHi,
Declare @SDate DateTime
Declare @EDate DateTime
Declare @Whse nvarchar(10)
Set @SDate= (SELECT min(F_RefDate) FROM OFPR T1 where T1.[Name] ='[1%]' )
Set @EDate= (SELECT max(T_RefDate) FROM OFPR T1 where T1.[Name] ='[%1]' )
Set @Whse=(Select Max(s2.Warehouse) from OINM S2 Where S2.Warehouse = '[%2]')
BEGIN
Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription) as ItemName,
sum(a.OpeningBalance) as OpeningBalance, sum(a.INq) as 'IN', sum(a.OUT) as OUT,
((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing ,
(Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
from( Select N1.Warehouse, N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
as OpeningBalance, 0 as INq, 0 as OUT From dbo.OINM N1
Where N1.DocDate < @SDate and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,
N1.Dscription Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance,
sum(N1.inqty) , 0 as OUT From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <= @EDate
and N1.Inqty >0 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription
Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance, 0 , sum(N1.outqty) as OUT
From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <=@EDate and N1.OutQty > 0
and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
where a.ItemCode=I1.ItemCode
Group By a.Itemcode Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0 Order By a.Itemcode
END
I hope this will work for you.
In above query you can also user OFPR.Code, OFPR, Category OFPR.Indicator instead of OFPR.Name.
Regards
Vaibhav Anharwadkar
Edited by: Vaibhav Ancharwadkar on May 24, 2011 9:23 AM -
Query for Finding the Daily Cumulative Production Total
Hi Experts,
I want Query based Report for finding Daily Cumulative i.e Running Production Total
Suppose Yesterdays Production for Item A0001 is 20 and Todays Prodction is 20 then it will show 50 but it shout be datewise selection.
Warm Regards,
Sandip KokateHello
Report Scenario as follow
Item Code Item name Todays Producion Yesterdays Production Total Productio
A001 Computer 20 20 40
A002 Mouse 10 05 15
A003 CPU 15 05 20
This is Exact Report
Regards,
Sandip Kokate -
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. -
Need helping in writing query for finding percentage of duration
Can any one please help in writing query for this.
The table is like this :-
ID Region Month Duration
I1 R1 Jan 80
I2 R2 Jan 70
I3 R1 Jan 70
I4 R3 Jan 40
I5 R1 Feb 80
I6 R2 Feb 30
I7 R3 Mar 100
I want to write a query to find
% of duration for each and every region against each and every month.
Please help in solving this query. I am in urgent need of this.
Thanks in advance.I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
Nicolas. -
Recursive query for finding parents and children against two tables
Hi I have two tables where the data is stored hierarchially.
I have found using connect_by, level and other oracle functions doing its job when the data is in one table.
Can I traverse against two tables by using the same oracle functions.
My Table A can go 2 levels deep in my hierarchy and level 3 and so forth has to be done against a different table.
Appreciate your insight..
Thanks in advanceThe number of levels that I can traverse in the first table is dynamic (sometimes 2 levels and sometimes 3 levels and actually no level limit) and then has to dynamically start looking at second table for finding any more levels in the other table.
I was able to implement them seperately and union them.
I was more looking for a comprehensive solution to reduce the number of lines that I have to maintain...
Thanks in advance
Edited by: user566193 on Jan 15, 2010 1:58 PM -
Query For Finding Revised PO Amout in Purchasing in Each Revisions
Can anybody please tell me how
can i write a query for Extracting
individual PO amounts in each revisions of a
PO from PO_LINES_ARCHIEVE_ALL..
ie FOR Each revisions of a PO What was the total PO Amount
Regards
BinuHi Geoff,
You can use the ROW_NUMBER and CASE Functions to acheive this. Here with , i have give u a small idea with an ex:
Qry :
B.ItemCode,SUM(B.PO1)[PO1],SUM(B.POQty1)[POQty1],SUM(B.PO2)[PO2],SUM(B.POQty2)[POQty2] From
select Itemcode
CASE when Sno=1 Then DocNum End [PO1]
CASE When Sno=1 Then Qty End [POQty1]
CASE when Sno=2 Then DocNum End [PO2]
CASE When Sno=2 Then Qty End [POQty2]
From(
Row_Number() Over (Order By Opor.Docnum) [Sno], Opor.DocNum,POr1.ItemCode,sum(POr1.Quantity)[Qty] from OPOR join Por1 on Opor.DocEntry=por1.DocEntry
ItemCode='20002' group by oPor.DocNum,por1.ItemCode
A where A.Sno<=2)B Group By B.ItemCode
Result :-
ItemCode PO1 POQty1 PO2 POQty2
20002 18 1.000000 19 10.000000
Thanks,
Karthikeyan.P -
Query for finding shortest path
I know nothing about Oracle Spatial. Just want to know if this query is possible using Spatial.
Given the following data for undirected weighted graph,
v1: vertex 1
v2: vertex 2
w: weight between vertices v1 and v2(or, distance of edge)
table name : wgraph
v1 v2 w
k a 2
m a 3
k c 1
k d 4
c b 2
h d 3
c h 3
h e 4
e b 4
m b 6Can I make a query which gives the shortest path from vertex 'a' to vertext 'e' using Spatial?
If this possible, that query gives the following result. (row-spanning form)
I think this is almost impossible using just a hierachical query.
Any method for this in Oracle Spatial?
spath
a
k
c
b
e
This is not a sort of homework or exam, just my interest.
Thx in advance.
Query Your Dream & Future at
http://www.soqool.comyes why not! in your case just create a logical network- called LRS Network and insert your vertices in node- table and additional information plus cost in the link table.
you can find ways using by dijkstra and A* -
Hi All,
Looking for a query that would return the top 5 sales items along with sales values, between a date range
Thanks
Ranjit KrishnanHi,
You may try this if Credit Memos do not need to be included:
SELECT TOP 5 T1.ItemCode, MAX(T1.Dscription) as 'Item Description', SUM(T1.LineTotal) as 'Amount(LC)'
FROM dbo.OINV T0
INNER JOIN dbo.INV1 T1 ON T1.DocENtry = T0.DocENtry
WHERE t0.docdate >= [%0\] and t0.docdate <= [%1\] AND t0.doctype = 'I'
GROUP BY T1.ItemCode
Order by SUM(T1.LineTotal) DESC
Thanks,
Gordon -
Dear Friends,
This following query,if I will attach it at PO in Item Code with formatted search , I get result as BOM child items as per project code, here project code is similar to item code.
But my limitation is that my item code is more than 8 character ,under accounting TAB BP project ,project I can define it up to 8 character only.
My requirement is that if I will put project name (which is 30 characteristic) as like as item code , shall I get child item list.
If yes , suggest necessary changes in above query.
Query :
WITH RECUR ( CODE) AS
SELECT ITT1.CODE FROM ITT1 INNER JOIN OITT ON OITT.Code=ITT1.Father WHERE ITT1.Father=$[$157.1.1]
UNION ALL
SELECT ITT1.CODE
FROM ITT1 INNER JOIN OITT ON OITT.Code=ITT1.Father
INNER JOIN RECUR ON RECUR.CODE =ITT1.Father
SELECT CODE FROM RECUR inner join OITM on OITM.ItemCode=RECUR.CODE --and OITM.PlaningSys='M' and OITM.PrcrmntMtd='B'
Thanxs & regards
Mahesh.Dear Mahesh,
I am not sure about your aim.
You would like to put a formatted search in the project code field of the sales order in order to get the children of the itemcode of that line in the document. The child codes will become the name of the project.
Your issue is the following:
As the project code field in the sales order (field called: rdr1, project) is long 8 characters only and the sum of the children codes will be too long for this field.
Am I correct?
If I am not correct, can you please tell me step by step what you are trying to do?
Thank you.
Marcella Rivi
SAP Business One Forums Team -
Query for Find Mode Fails-AutoGenerated WHERE clause missing quotation mark
Using Oracle JDev 10.1.3.2. In 'Find Mode' the query execution fails.
The error shown below is caused by the WHERE clause statement. The column name is quoted in the database but the code generated by the ADF framework does not use quotes. As a result the column name is illegal. Is there a way to hint to the ADF framework to ALWAYS use quotation marks?
(oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT "PLATE","WROW","WCOL","WFIELD","AVGNUC.NUC_CELL_INTENSITY","MEDNUC.NUC_CELL_INTENSITY","AVGORG.INCLUSION_BCKG_INTE","MEDORG.INCLUSION_BCKG_INTE","MEDORG.COUNT","MEDORG.SPACING","MEDORG.NEIGHBOR_COUNT" FROM ICSUMSTAS_1888_295) QRSLT WHERE ( ( (MEDORG.COUNT >0) ) )It is true that these are not the most column 'friendly' names, but they are what they are. In the database these columns are quoted and they must be so in order for the query to work correctly.
The suggestion of directly manipulating the View Criteria is a good one and I have implemented a solution based on it but it's cumbersome. Here is how it works:
First, use the default query mode UI to add new View Criteria. If you were to execute the query at this point it would fail due to the columns names not being quoted. So, instead, implemented my own execute query button that first uses the View Criteria to create a properly quoted WhereClause for the ViewObject.
I then reset the ViewCriteria (or they will interfere with the WhereClause), set the custom constructed WhereClause on the ViewObject, and re-execute the query. The cumbersome part is that I have to create my own parser for user input to write a valid WhereClause. And when the user uses query mode again the previously set ViewCriteria have been reset (which is annoying, and not the typical query mode behavior which might confuse the user)
below are some of my code snippets:
* This action is triggered by clicking the FIND button on the UI.
* It uses a combination of the ViewCriteria default UI and custom code that processes
* user input into a whereClause for the ViewObject
private void jbFind_actionPerformed(ActionEvent e) {
jbAddRow.setEnabled(false);
//reset old where clause
System.out.println("OLD WHERE:"+myView.getWhereClause());
myView.setWhereClause(null);
String customWhere=getCustomWhere();
/* The case for null and blank View Criteria is tested below
* when there are blank ViewCriteria the sequence (--) is generated from getCustomWhere
* Note the use of contains instead of equals
* The use of equalIgnoreCase etc for unexplained reasons seem to fail to detect when customWhere is (--)
if(customWhere==null||customWhere.contains("(--)")){
return;
}else{
/*remove ViewCriteria because they can not handle special Column names
* That's why we go into the trouble of creating our own find function
myView.getViewCriteria().removeAllElements();
myView.setWhereClause(customWhere);
myView.executeQuery();
jUNavigationBar1.doAction(JUNavigationBar.BUTTON_EXECUTE);
jTable1.revalidate();
private String getCustomWhere(){
StringBuffer custom=new StringBuffer();
ApplicationModule am = (ApplicationModule) panelBinding.getApplication().getDataProvider();
DCJboDataControl jbodc = new DCJboDataControl(am);
JUIteratorBinding iterBinding = new JUIteratorBinding(jbodc,myView );
int criteriaCount=iterBinding.getViewCriteria().getRowCount();
//Validation when no ViewCriteria are defined
if (criteriaCount==0){
System.out.println("ViewCriteria Count: "+criteriaCount);
return null;
}else{
System.out.println("ViewCriteria Count: "+criteriaCount);
int attr=iterBinding.getViewCriteria().getCurrentRow().getAttributeCount();
int criteriaRows=iterBinding.getViewCriteria().getAllRowsInRange().length;
String[] attrNames=iterBinding.getViewCriteria().getCurrentRow().getAttributeNames();
for (int r=0;r<criteriaRows;r++)
{custom.append("(");
for (int k=0;k<attr;k++){
if(iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)!=null){
custom.append("(\""+attrNames[k]+"\"");// LIKE '"+(String)iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)+"') AND ");
//trim white space
String attrK=((String)iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)).trim();
String qual=attrK.substring(0,1);
if(qual.equalsIgnoreCase(">")||qual.equalsIgnoreCase("<")||qual.equalsIgnoreCase("=")||qual.equalsIgnoreCase("!")){
custom.append(" "+qual+"'"+attrK.substring(1)+"') AND " );
}else{
custom.append(" LIKE '"+(String)iterBinding.getViewCriteria().getRowAtRangeIndex(r).getAttribute(k)+"') AND ");
}custom.append("--");
custom.append(")");
custom.append(" OR ");
}//end criteria rows
custom.append("--");
//now need to remove terminal AND and OR tagged with --
String cleanWhere=custom.toString().replaceAll("AND --","").replaceAll("OR --","");
System.out.println("NEW CUSTOM WHERE: "+cleanWhere);
return cleanWhere;
} -
Approval Query for Invoices with Items Onhand below zero.
Dear Experts,
I would like to make an approval procedure applicable on A/R Invoice.
When ever one of the Invoice items OnHand amount is below ZERO - I need the Approval Procedure to Popup and this way the Produce of the Invoice will be blocked.
Is there any way to write a query on Approval Template for that?
Thanks!
Regards,
D.MedalionHi D.Medalion
Please Follow some step
First Create Approval Stages in Administration ->Approval Procedures->Approval Stages
First -
Administration ->Approval Procedures->Approval Templates->Documents-> Click On A/R Invoice .
Second- Administration ->Approval Procedures- Approval Templates->Terms->When the Following Applies->Click Tick On Deviation from Commitment and ration Drop Down Choose Greater or Equal
Thanks & Regard
Khan Imran -
GREP query for find/change operation
Hi everyone,
In the following line, there's a comma after the first name. This type of formatting is repeated hundreds of times on a number of pages so I need to use a GREP find/change query to remove the comma after the first name and replace it with a space.
Firstname,Lastname,State
I wondered if something could tell me what the GREP code would be?
Appreciate any assistance.function(){return A.apply(null,[this].concat($A(arguments)))}
.. it's also doing it for the second comma
That's impossible. You must have entered something else than Scott's code.
Maybe you are looking for
-
Query related to Invoice Verification
Hello everybody, I want to post vendor invoice in the system for the month of August. November and December periods are open (MM periods) in the system. Finance periods are open from August to December. System does not allow to post the invoice since
-
Can we hide the select-option in a selection screen
Hi all, I have two radio buttons in my selection screen with 1 select-option criteria, now on choosing the other radio button I want that a different select-option criteria should appears. Thanks
-
Hello all, We have a problem with one of our processes. There is an instance which is stuck in one of the Interactive activities waiting for someone to login and execute it. The person who was suppose to execute it has left the organization. Now we h
-
Using the iPad with a projector.
Is it possible to use an iPad2 wirelessly with an Apple TV connected to a projector? Can the two devises communicate without being logged into the local wifi network? For example, in a hotel, doing a presentation.
-
Upgrading OBIEE to 11.1.1.7.1
I am guessing that when we upgrade OBIEE to 11.1.1.7.1 we also need to upgrade BI-Apps to 7.9.6.4, is that correct?. As far as ETL/DAC changes concerned Can I know what are the Informatica/DAC changes from 7.9.6.3 to .4. Regards Prasad