Query on certificate of analysis
Hi gurus,
I'm trying to wirte a query to retrive the information of the "Certificates of Analysis" according to PO no. and Batch No. Anybody can point me which tables that i should relate together to get the result.
Thanking you in advance
see if Tables CHVW, CHVW_PRE are of any help to your requirement.
Similar Messages
-
Query for Sales Order Analysis
Dear Experts
I have written a Query for Sales Order Analysis and would like to have help on this.
The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum] ORDER BY T0.[DocNum]
where U_Total_GP is a UDF for storing the GP of each order.
After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. However, the query does not calculate column total for total amount and total GP. Although I know the total for each column can be displayed by pressing "Ctrl" + Click on the column title, it would have to be done from time to time.
Therefore, I would like to modify my query in order to calculate the column totals when executed. Are there any suggestions for this?
Thank you
Regards
EltonHi Elton,
Try this:
SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
Union ALL
SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0]
ORDER BY T0.[DocNum]
Thanks,
Gordon -
Dear Experts
I have written a Query for Sales Order Analysis and would like to have help on this.
The query is used for generating daily report for Sales Order on number of documents (Sales Order), total amount of sales orders and total GP of Sales Order. The query is written as below:
SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
Union ALL
SELECT '', SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0]
After executing the query, a selection criteria of date appears and after a date is selected, the report shown information required. Everything is fine with this query except I would also like to incdude the total number of Sales Order (per day) right below the column "DocNum".
Is it possible to achieve this?
Thank You
Regards
EltonTry this:
SELECT T0.[DocNum], SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] GROUP BY T0.[DocNum]
Union ALL
SELECT count(DocDate), SUM(T0.DocTotal) AS 'Total', SUM(T0.U_Total_GP) AS 'Total GP'
FROM ORDR T0 WHERE T0.[DocDate] =[%0] -
New document, query drill, scope of analysis, buttons disabled
Hi,
i have many reports, as part of develepment, we are planning to use drill down in some reports, but,when i edit the report in infoview, it is possible to create new document but not in rich client, and it is not posible no edit query in rich client, the button is greyed out, also the drill button, and even the create new document is grayed out.
I read another post that says, is not posible to use scope of analysis if the universe is from BI,so i tought it could be the reason that scope of analysis was greyed out, but did another test with universe e-fashion and it´s exactly the same problem, the buttons -create new query edit query, drill, scope of analysis, are disabled.
I have all the rights in infoview and cmc i have tha administrator account, Could be the problem ..........that we have a temporary license?
Thanks for your help hope to solve it quicklyHi,
Copy the report from Public folders to your favourites and tryfor drill down or creating a new document. May be your admin team can restrict in QA or PROD generally.
Cheers,
Suresh babu Aluri. -
Transfer posting and Certificate of Analysis (BWUL)
Moderator note: I broke this off from discussion Transfer posting and Certificate of Analysis (BWUL)
Please refer to the discussion for any background.
This has been an interesting thread, and it's circling around the issue I am having, but I can't tell if this thread answers my question or not. I'll ask here so as not to proliferate duplicate threads:
I am in an environment where the business produces and tests finished goods in satellite plants and then moves them to a central DC via STO. When I try to create COAs from the central DC, the COA program cannot find the results or specifications.
I had the idea to change the profile to look at the production chain (thinking the batch in the production plant was part of the production chain of the identical batch in the DC). When I did this, the program could not find the correct specifications. I have been messing with the configuration around the results and specification origins with no success.
I feel like this should be possible, but I can't figure out what I am missing. Is SAP able to create a COA from a central DC for a material/batch that was produced in a satellite plant and sent via STO?
Message was edited by: Craig S1) in the BWUL make sure in configuration setup it is set to include stock transports.
2) You don't indicate where you maintain your specs. In operations like this you should try to be reporting specs and results from the batch. But I'm guessing you might be keeping the spec in the inspection plans only.
3) in the COA profile, you can create your own custom FM for "results origin" and for "results specs". You may need to create them if you keep your specs in the plans and not in the batch records.
Craig -
Issue while query execution on web analyser.
Hi,
I am getting an error message while query execution on web ie Record set too large , data retrieval restricted by configuration .I am able to run the same query in bex analyser without any issue .Any idea what could be the reason and solution for this issue .
Regards,
Neetika.Hi Neetika,
The Query is exceeding the set limits,i suggest you to Reduce the time LIne for the Query, as it may be having more number of Cells in terms of Rows and Columns.
Execute the Query for Less number of Days,if u r executing it for 1 Month then execute it for 10 Days.
Rgds
SVU123 -
How to get Query Results based on Analysis Authorization Ranges????
Hi Experts,
I have gone through the lot of SDN Links, however not able to find the answer to my question.
I have an Authorization Issue, NO Authorization
Error : EYE 007 ( Insufficient Authorizations )
<b>Here is the issue:</b>
Need to see the complete query result when I gave the range in Analysis Authorization for Controlling Area 001-005. Controlling Area is auth relevant and right now a variable is inserted in the query for it. If I select Controlling Area 001, the result for Controlling Area 001 is displayed in query. If 002 then also displayed. If I do not enter anything, then I get the <b>Eye 007 error message</b>.
I am not sure how do I display/authorize the entire result in the query for all the Controlling Areas, I have authorized user to see??
<b>Its really urgent, please help..!</b>
Here are the logs:
Authorization Check Log
Date and Execution Time (Local Server)
Execution Date: 06.09.2007
Execution Time: 14:48:41
Executed Query: 0CCA_C11/GBCCA_MP01_Q0002_AP
Executed by User ZBI_TEST_001
Executed with Analysis Authorizations of Another User ZBI_TEST_001
InfoProvider Check
Building the Buffer...
...Buffer Built
Are there authorizations for accessing InfoProvider 0CCA_C11 with activity 03?
Authorization exists for general access to InfoProvider 0CCA_C11 with activity 03
InfoProvider Check
Authorization exists for general access to InfoProvider 0CCA_C11 with activity 03
Relevant Characteristics for Detailed Authorization Check
(Characteristics with Full Authorization Are Not Listed!)
List of Effective Authorization-Relevant Characteristics for InfoProvider 0CCA_C11:
0CO_AREA
0TCAACTVT
Relevant Characteristics for Detailed Authorization Check
(Characteristics with Full Authorization Are Not Listed!)
List of Effective Authorization-Relevant Characteristics for InfoProvider :
List Is Empty:
There Are No Characteristics That Have to Be Checked in Detail
Authorization Check
Detail Check for InfoProvider 0CCA_C11
Preprocessing:
Selection Checked for Consistency, Preprocessed and Supplemented As Needed
Subselection (Technical SUBNR) 1
Check Node Definitions and Value Authorizations...
Node- and Value Authorizations Are OK
End of Preprocessing
Filling the Buffer...
...Buffer Filled
Main Check:
Subselection (Technical SUBNR) 1
Supplementation of Selection for Aggregated Characteristics
No Check for Aggregation Authorization Required
Following Set Is Checked Comparison with Following Authorized Set Result Remaining Set
Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
CO_AREA = '0003'
AND TCAACTVT = '03'
Characteristic Contents
0CO_AREA I BT 0001 0005
0TCAACTVT I EQ 03
I EQ 16
Authorized
Subselection (SUBNR) Is Authorized
Authorization Check Complete
Authorization Check
Detail Check for InfoProvider 0CCA_C11
Preprocessing:
Selection Checked for Consistency, Preprocessed and Supplemented As Needed
Subselection (Technical SUBNR) 1
Check Node Definitions and Value Authorizations...
Node- and Value Authorizations Are OK
End of Preprocessing
Filling the Buffer...
...Buffer Filled
Main Check:
Subselection (Technical SUBNR) 1
Supplementation of Selection for Aggregated Characteristics
No Check for Aggregation Authorization Required
Following Set Is Checked Comparison with Following Authorized Set Result Remaining Set
Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
TCAACTVT = '03'
Characteristic Contents
0CO_AREA I BT 0001 0005
0TCAACTVT I EQ 03
I EQ 16
Partially or Fully Authorized (Intersection) Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
( CO_AREA < '0001'
OR CO_AREA > '0005' )
AND TCAACTVT = '03'
Value selection partially authorized. Check of remainder at end
Following Set Is Checked Comparison with Following Authorized Set Result Remaining Set
Characteristic Contents
0CO_AREA
0TCAACTVT
SQL Format:
( CO_AREA < '0001'
OR CO_AREA > '0005' )
AND TCAACTVT = '03'
Characteristic Contents
0CO_AREA I BT 0001 0005
0TCAACTVT I EQ 03
I EQ 16
Not Authorized
All Authorizations Tested
Message EYE007: You do not have sufficient authorization
No Sufficient Authorization for This Subselection (SUBNR)
Following CHANMIDs Are Affected:
184 ( 0CO_AREA )
Authorization Check CompleteHi,
Have you defined the vaule for 0CO_AREA as BT 001-005 in you Authorization for 0CO_AREA.Also how have you defined your Authorization Variable on the query? Have you define as select options or interval? I thing you need to define it as interval or select options.
Hope it helps,
Cheers,
Balaji -
Query to match Sales Analysis output exactly
Hello,
I have tried several queries to match the output of the Sales Analysis report. I have done so by customer and by sales employee. I have failed to create a query that always matches the outcome of the Sales Analysis query exactly. I would greatly appreciate it if someone could provide such a query even if it just matches net A/R invoice total by date range so that it can be compared with Sales Analysis tool. From there I can use joins to see other results, e.g., net sales by sales employee by customer.
Thank you,
LangThanks for your response. Yes, we need to account for credit memos and have already done so. I had not thought to check for canceled state on invoices though, so thanks for that. I did a quick query and there were no canceled invoices in the database, however, it will be good to incorporate regardless. My annual net is close to being correct, but must be exact. I don't need any other information to be output except net balance, i.e., balance after credit memos, document discounts, miscellaneous expenses recorded in freight field, and ?. Using doctotal on documents takes into account the document discounts and miscellaneous expenses. Another way to go is work at the line item level, e.g., INV1 or JDT1, and then account for the document discount and freight (totalexpns). Approaches that use INV1 linetotal naturally fail on their own since they don't account for document discounts and freight expenses. At the risk of being redundant, any approaches that don't include credit memos will naturally fail as well. Here is a few approaches I have tried (that have been almost correct, but not exact, i.e., off by hundreds or a few thousand with net being in the single digit millions):
Approach #1:
declare @start datetime
declare @end datetime
set @start = '01/01/2008'
set @end = '12/31/2008'
select sum(t2.subtotal) from (select t0.doctotal as subtotal
from oinv t0
where t0.docdate between @start and @end
union all
select -1*t0.doctotal as subtotal
from orin t0
where t0.docdate between @start and @end) t2
Note: this approach was off by a couple hundred dollars or so. I would like to run this query in B1, but it summarizes a union and that seems to cause B1 to not be able to handle it. It runs fine in any other SQL Server client. I would rather run it in B1 with dynamically selectable start and end dates, via '[%0]' etc. The same is true for Approach #2 below.
Approach #2:
declare @start datetime
declare @end datetime
set @start = u201801/02/2008u2019
set @end = u201812/31/2008u2019
Select sum(t5.subtotal) from (Select SUM as subtotal
From INV1 T0
Inner JOIN OINV T1 ON T1.DocEntry = T0.DocEntry
Where T1.DocDate BETWEEN @start AND @end
Union All
Select -SUM as subtotal
From RIN1 T0
Inner JOIN ORIN T1 ON T1.DocEntry = T0.DocEntry
Where T1.DocDate BETWEEN @start AND @end
union all
select sum(t0.totalexpns) as subtotal
from oinv t0
where t0.docdate between @start and @end union all
select sum(t0.totalexpns) as subtotal
from orin t0
where t0.docdate between @start and @end) t5
Note: the outcome of this is identical to Approach #1.
Approach #3:
SELECT SUM as u2018Net Balanceu2019
from JDT1 T0
Inner Join OJDT T1 ON T1.TransId = T0.TransID and
(T1.TransType = u201813u2019 or T1.TransType = u201814u2019)
Inner Join OCRD T2 ON T2.CardCode = T0.ShortName
LEFT JOIN OINV T3 ON T3.TransId = T1.TransId
LEFT JOIN ORIN T4 ON T4.TransID = T1.TransId
Where T1.refdate Between u2018[%0]u2019 and u2018[%1]u2019 and T2.CardType = u2018Cu2019
Note: This query fails because it does not account for miscellaneous expenses recorded in the freight field of invoices and credit memos. Adding those in is possible, but fails due to the 'Inner Join OCRD T2 ON T2.CardCode = T0.ShortName. This is because in the case of freight expense journal line items the shortname does not match the cardcode of the BP, but rather the system account it references. I haven't spent more time to rework the logic of the join to overcome this, but it could possibly be added back in via a union which is subsequently totaled.
I think I tried a few other approaches as well, but to no avail.
A related question/annoyance: I have noticed that certain queries in B1 cannot be executed correctly (they throw an error or have strange behavior like returning only the first row returned) though they can run fine in SQL Server Manager or other SQL Server clients. Why is that? It is annoying and unrealistic to have clients have to use another tool for certain queries. Examples of such queries are those involving cursors, certain summarizing selects that work on a union as input, and queries that contain certain elements of TSQL, like variable declarations (not sure about this last one, but it seems to sometimes cause the query to fail in B1). I wish I knew how to overcome this so that all queries could run in B1.
Edited by: Lang Riley on Jan 22, 2009 8:08 PM
Edited by: Lang Riley on Jan 22, 2009 8:15 PM -
User Query - Expanding the Sales Analysis report
Dear All,
I have to make a Sales Analysis Report for a client, but groupping by Countries, which is not possible with the built in Sales Analysis Report. I have tried many ways to complete a user query but always failed. I have to aggregate the Sales Invoices, decreased by the amounts on related target Credit Memos (if there are ones) and group by Countries (taken from CRD1.Country).
Please help me out, if you can.
Thank you very much,
Balazs BartaHi
Please search the forum with Sales Analysis Report .
Lots of thread are discussed and queries are given,.
Hope this helps to solve your problem
Here is one of the thread
Sales analysis
Thank you
Bishal
Edited by: Bishal Adhikari on Feb 24, 2009 1:20 PM -
How can I avoid query result overlapping in Analysis for Office?
Hello everybody
I have a question relating to Analysis for Office. If I've a workbook with for example two queries, how can I avoid that the query above the other one overlaps the query results of the lower query?
The lower query result should adapt according the the query results of the first query.
Does anybody have an idea? In Bex Analyzer I have the Option to insert a scrollbar for a workbook- is this function available in Analysis für Office? (But that way isn't the way I prefer).
Thank you in advance.
Kind regards
HeikeNot sure about this - could you take a look at this thread that suggests VBA Placing two tables in Analysis for office without overlap
I am wondering if the next release might help? See Figure 1 of Analysis Roadmap Update - Beta Preview, Part 2 -
How to disable GLOBAL query variants in Portal (ANALYSIS Template)
Hello Experts,
Does anybody know how to disable the saving of global query variants on the selection screen?
Currently if anybody goes in and saves the variant with Description and puts something in the Technical Name, it saves that variant as global, so that everybody can see it. If they put something in the description only and leave the technical name blank, then it saves the variant as local. Therefore, how would I go about disabling the saving of global query variants?
Thank you,
Andrei
Message was edited by:
AGThis object S_ALV_LAYOgoverns the way ALV layouts are saved.
For more info see the OSS Note 601803.
Hope This Helps
Anand Raj -
MICs duplicated in COA (Certificate For Analysis) for Finish Product.
Hi, Champions,
I have problem in printing COA:
We are using TL type "Q" inspection plan.
Operation:1 Chemical Test
MIC:0010 Test-1
MIC:0020 Test-2
Operation:2 Physical Test
MIC:0010 Test-1
MIC:0020 Test-2
MIC:0030 Test-3
Manageing individual COA profile for each Material.
We have customized COA report.
When we are trying to take printout from it, it is printing the COA for all the Operations two times. Means one more time then it is there in the Task List.
The parameters for the COA Profile are as below.
1. Level for Result Selection: - Summarized
2. Origin of the Characteristic Result on the Certificate: - Inspection Result.
3. Origin of Characteristic Short Text: - Master Inspection Charecteristic.
4. Origin of Inspection Specifications: - Inspection specfication from QM.
5. Output Strategy for Skip Characteristics: - Text from text element of function group.
Pls let me know, where is the possibility of cause for this descipancy in COA.
Regards,
ShyamalHi Craig,
Thanks for your involvement.
The layout that is generated by QC21 was no where meeting the requirement. So layout was configured. Then data was there in big number of verity hence all the detrails was requried to be fatched from Inspection plan itself. Not from MICs (QS21,,as STD report does).
These were the circumstances. And it was propoerly tested and is working fine also.
But recently we had SAP GO LIVE for, two more mfg facility(Plant) and it is showing this bug overhere only.
But any ways thank you all for kind support.
Regards,
Shyamal -
Query reagrding certificates for J2ME applications
Hello frnds,
I have completed my J2ME application. Now can anybody tell me what is the procedure to take certificates for J2ME applications? And also can u suggest names of vendors who provides certificates for J2ME application & which of them are cost effective?
Can anybody plz provide me this info?
Thanks in advanceI am not sure if I understood your point.
MIDlet can receive SMS from outside and it can be started on incoming SMS.
You can also get an phone call while the MIDlet is running and take proper action. I am not sure if you can do all the Phone Call controls you mentioned though. -
Long Text Missing In COA(Certificate of Analysis) Report
Hi Friends,
We have a case where Long text entered in the results recording is missing in the COA Report for only certain Batches .
For same MICs and COA Profile,the Long text is displayed correctly in the report for the different batches.
I have investigated this and text element been used in the MIC is 0024 Code short text with results long text.
We have checked the COA Profile for this MIC and material has been assigned ,so profile find to be correct.
The SAP form used for COA Print is a standard and MIC is of Qualitative.
Could you please help on this .
Thank you.
Regards
SiddarthaNo idea really but look at this:
Any chance the user was logged in with a differnt language when they created the long text? If they logged in as ES for instance, the long text might be stored as ES. But the COA is bring printed in EN so the ES long text is not found.
Do you see an entry in table STXH for the long text for the batches that don't display it? (Text ID is QMEP).
I'd compare the entries in STXH for a long text that prints and one that doesn't and see if you notice any differences.
Craig -
Dear Experts,
Want to Sales Analysis Query same as Sales Analysis in SAP
In standard SAP when we run report with anual slection criteria for eg, 01/04/2010 To 31/03/12
it's show in one column not display in compare with Quaterwise & Monthwise report.
Result for query is
Customer Code, Customer Name, Year2010 (Sales), Year2011 (Sales), Year2012 (Sales)
Please help me.
BR
DeepOk........
It was my query mistake.......
Please try this......
SELECT Distinct T0.CardCode,T0.CardName,
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2006%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2006',
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2007%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2007',
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2008%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2008',
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2009%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2009',
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2010%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2010',
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2011%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2011',
(isnull((SELECT SUM((case when SUBSTRING((CONVERT(VARCHAR(11),T4.DOCDATE,106)),8,11) like '2012%' then T4.LineTotal else 0 end))
FROM INV1 T4 WHERE T4.ItemCode=T1.ItemCode ),0)) '2012'
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
Group By SUBSTRING((CONVERT(VARCHAR(11),T0.DOCDATE,106)),8,11), T1.ItemCode, T0.CardName, t0.CardCode
Regards,
Rahul
Maybe you are looking for
-
Premiere Elements 8/9 Windows 7 64bit
History.... I was running Premiere Elements 8 on Windows 7 32 bit with little to no problems. I recently Upgraded my system primarily for more RAM to use with video editing and upgraded to the 64 bit version of Windows 7. I re-installed elements 8 an
-
External HArd Drive not recognized by MAcBook Air
Hi, I bought an external hard drive(from LaCie) few months ago and plugged it once to my Macbook Air. I tried to plug it again last month and my MacBook Air didn't recognize it. I also tried to plug it in a PC and not recognized as well. I've been to
-
Use Adobe Forms in F110 and Cash Journal Receipt
Hello, I'm trying to change the standard Sapscript with the news standards in Adobe Forms, but seems that this two transactions don't want to change :P I search in the Support Portal, and found the note 774207, I made all the modifications and progra
-
I have just found out my 10 year old has spent £721.77 on my iTunes account in the last 6 days. My bank can't help me and there is no one available from Apple to help me at all. What on earth am I going to do? Am in tears here. I am a single mother a
-
FCPX crashes the entire system when applying Ken Burns
When applying Ken Burns to an image, when repositioning the start and/or end frame the entire system locks up, not just FCPX. The cursor can still be moved, but other than that the entire system is unresponsive and the only solution is turning off my