User Query
Hi All,
I have a basic query returning header information from open purchase orders. The parameters used is for a user-defined field created on the header level. I have recently upgraded from 2005 to 2007 and since then, the query takes approximately 7 minutes for the selection criteria choose from list to open compared to about 5 seconds when on version 2005.
Any suggestions to help resolve would be greatly appreciated.
Thanks in advance,
Kiran
Hi Kiran,
Try this Query, it will be retrieve the Year based(Period Indicator) Document Details.
SELECT T0.DocNum AS 'GRPO No.',
T0.DocStatus AS 'Doc. Status',
T0.DocDate,
T0.PIndicator,
T0.CardCode,
T0.DocTotal,
T0.U_purchase_order,
T1.ItemCode, T1.Dscription, T1.Quantity, T1.Price, T1.LineTotal, T1.OpenCreQty, T1.TrgetEntry
FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OPID T2 ON T0.PIndicator = T2.Indicator
WHERE T0.U_purchase_order >= '[%0]' AND T0.U_purchase_order <= '[%1]' AND T2.[Indicator]='[%2]'
SELECT T0.DocNum AS 'GRPO No.',
T0.DocStatus AS 'Doc. Status',
T0.DocDate,
T0.PIndicator,
T0.CardCode,
T0.DocTotal,
T0.U_purchase_order,
T1.ItemCode, T1.Dscription, T1.Quantity, T1.Price, T1.LineTotal, T1.OpenCreQty, T1.TrgetEntry
FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OPID T2 ON T0.PIndicator = T2.Indicator
WHERE T0.U_purchase_order >= '[%0]' AND T0.U_purchase_order <= '[%1]' AND T2.[Indicator]='[%2]'
GROUP BY
T0.DocNum, T0.DocStatus, T0.DocDate,T0.PIndicator, T0.CardCode, T0.DocTotal, T0.U_purchase_order,
T1.ItemCode, T1.Dscription, T1.Quantity, T1.Price, T1.LineTotal, T1.OpenCreQty, T1.TrgetEntry
Regards,
Madhan.
Similar Messages
-
In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?
The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.
-
Hello, I have the following User Query:
SELECT T.USERID As EmpID, OHEM.FIRSTNAME' 'OHEM.LASTNAME, OHEM.U_RATE AS GeneralRate, T.CARDCODE As CardCode, T.CARDNAME As CardName, SUM(ISNULL(T.APPROVED_HOURS,0)*ISNULL(T.RATE,0)) As BilledAmount, T.GENCHECK AS CheckNumber, OVPM.[CheckSum], OVPM.DOCDATE
FROM SCCG_WB_TIME AS T LEFT JOIN OHEM ON OHEM.EMPID=T.USERID LEFT JOIN OVPM ON T.GENCHECK = OVPM.DOCNUM
WHERE ISNULL(T.GENCHECK, 0)<>0 AND <b>T.USERID =[%0]</b>
GROUP BY T.USERID, OHEM.FIRSTNAME' 'OHEM.LASTNAME, OHEM.U_RATE, T.CARDCODE, T.CARDNAME, T.GENCHECK, OVPM.[CheckSum], OVPM.DOCDATE
I get an error because of the variable I have. When I press Execute I just get '' (SEWSY) error message in red. Without the variable is working fine. Please help me!
Thank you,
IrinaHi Irinca,
I think (can't test it) the problem is the not-system-nor-usertable-but-yours table created in SBO that you're passing the variable (SCCG_WB_TIME, just in case).
Try something like,
DECLARE @UserId int
SET @UserId = (SELECT TOP 1 T0.INTERNAL_K FROM [dbo].[OUSR] T0 WHERE T0.U_NAME = '[%0]')
...(your query....)... T.USERID = @UserId...
HTH,
Ian -
Terms user query Changes in unit price in purchase order and a/p invoice
Dear sir
please give me a term user query for , if any changes in unit price in purchase order and a/p invoiceHi,
Try this:
SELECT Distinct ' true'
FROM adoc T2
JOIN ado1 T0 ON T2.docentry = T0.docentry AND T2.Objtype = '22'
JOIN por1 T1 ON T1.docentry = T0.docentry AND T1.Linenum=T0.Linenum
WHERE $[$38.14.number] != T0.Price
Thanks & Regards,
Nagarajan -
Is it possible to use parameter in a user query with subquery ?
Hi ,
i need to use parameter ( [%0] ) in user query using a subquery , but i have errors message when i execute the query
example :
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] =N'[%0]'
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] =N'[%0]'
works fine
but ( exactly the same query in the subquery )
Select t2.Docnum ,t2.cde , t2.fact from
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] =N'[%0]'
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] =N'[%0]'
) t2
return an error message
the same query without parameter works fine too :
Select Docnum ,cde , fact from
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] ='C1'
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] ='C1'
) t2
Is it possible to use parameter in a subquery ?
thanksTry this one:
declare @cc nvarchar(20)
set @cc=/*Select c.cardcode from OCRD c where c.cardcode=*/'[%0]'
Select Docnum ,cde , fact from
SELECT T0.[DocNum] as docnum, T0.[DocTotal] as cde , 0 as fact FROM ORDR T0 WHERE T0.[CardCode] =@cc
union all
SELECT T0.[DocNum], 0 as cde,T0.[DocTotal] as fact FROM OINV T0 WHERE T0.[CardCode] =@cc
) t2 -
Viewlink between Custom VO "Cannot set user query to view"
We have an application where we have extended custom VO and EO’s to get data from flat files. It all looks fine till we create a viewlink for a LOV with two related VO’s. The viewlink VO fails we get message of the form -Cannot set user query to view "CustomVO1" because it is a destination in a view link”. Are there any methods to override in the custom VO/EO or any parameter to be added to configs. Has someone tried this out
Thanks for the update and for sharing the solution!
Regards,
Hussein -
How to create a parmetarized user query
Hi all
i want to create a user query with parameters so that when activated the user will have to fill those parmeters.
question is how do i create these parameters by code?
appreciate the help
YoavHi Yoav,
If you are running a query from within Query Generator then you can use the [%0], [%1] etc syntax and SBO will prompt the user when the query is run. If you are going to execute a query through code then you could create a little user form that contains fields for each of the parameters (ie write your own parameter window) and then run the query based on the values the user enters in your form.
Kind Regards,
Owen -
Link user query to required print layout
Hi all,
I tried linking my user query to a required print layout for user reports.
I have followed the same procedure as given in (Query PLD.pdf ) but when I try to save ,
I get the following error
Items were found with the same exclusive no [Message 101-19 ]
Can anybody help me with this
Thanks
Nirmala B.finally got it
-
Cannot set user query to view "{0}" because it is a destination in a view link
Hi
11.1.1.7 - I have 2 programatically view objects. I have created a viewLink between them and I am getting the error:
Cannot set user query to view "MyView2" because it is a destination in a view link.
Does anyone know what are the methods I need to implement? I have follow the Frank Nimphius Post: Oracle ADF: Service, Please! and it is working fine. However, after seeing this example: Decompiling ADF Binaries: Building programmatically managed business components - Part 2 - I realised that I am missing some other stuff to make the view link work. There are too many methods and its quite difficult to understand and digest all classes and methods etc.
Anyone can please point me in the right direction?
RegardsWhich version are you using? Could you maybe turn on logging (http://blog.goverco.com/p/psmalogging.html) and post content of log file if you still have the issue...
Also, remember that even though you set credentials in the PARAM section, these values are overwritten by the ones specified on the properties of the MA - so make sure that you specify correct creds on the MA. Specifying creds directly in the script makes
for an easy way of testing from the PowerShell prompt, but not for running the script from the MA / Run Profiles
Regards, Soren Granfeldt
blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt -
Can I run a User Query using SDK?
Hi I am new to SDK development.
Can I run a user query using SDK? what I am after is, when the user clicks a button on my screen, I want to run the user query already in the system.
If this can be done, does anyone know how to do this? I have not been able to find a way of doing this so far. appreciate any help here.
Thanks,
Indika.Hi,
I have an additional question to this thread. Does anyone know a way how to run an user query, and how to pass some parameters to it, so the user doesn't have to write them down manually?
For example, I add a button on a Bussines partner form and when this button is clicked, I want a query to be started with parameter %1 = businnes partner's code...
Is there some way how can I do this?
Thanks
Bohous -
Running an arbitrary User Query from a menu
Hello all,
Is it possible in SBO2007 to create a custom menu that would run a user query, analogously to:
Reports -> Financials -> Accounting -> Locate Journal Transaction by Amount Range?
Thanks in advance,
AntonEdward Neveux:
Beyond that if you want to physically add something to the Main Menu > Modules tab ... you would need to use the SDK.
With SDK I can only think of the following:
1) Creata a menu
2) In the event handler access the desired query by menu UID from Tools > Queries -> ..., and
3) Call the Click() method of that menu.
Isn't there an easier (more automatic) way?
Thanks in advance,
Anton -
Dear All,
We are currently using SAP88 PL21. Is there a way we can add user query to cockpit? For SAP screen that we can see from main menu, I use drag and drop to add them to common function. But for user query, I didn't find any way to add to cockpit. Thanks.
Regards,
YukaHi Yuka,
1.Goto Tools --> Cockpit -->Enable my cockpit
2.Administration -->System Initialization>General Setting -->Cockpit(Select Cockpit option)
3.Make a new Dashboard download Dashboard Design (Xcelsius) from SAP portal
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/6091ffdd-e1ad-2d10-359f-d644ff7eaa4e
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6091ffdd-e1ad-2d10-359f-d644ff7eaa4e?QuickLink=index&overridelayout=true
4. you should download Dashboard packaging wizard from SAP portal for make new package(zip file) in SAP .
[File Deleted Oct 2013]
after download tool goto -->Tools -->Dashboard packing wizard(Select) and use or select your xcelsius file to make new package
5.there are also same sample package in the portal so you can use directly import zip file from
Administration -->Setup -->General -->Dashboard manager
6.After import dashboard by 5 step ,select widget gallery in Cockpit tab(Modules,Cockpit and Drag & relate option) then select last form dashboard ,hold and drag on the main windows center.
7.select setting option then it will list you all dashboard package which was import in 5 step.
8.Now selected dashboard which you want to show and select OK.
9.you also need IIS installation in your system.
Thanks
Srujal Patel -
Hello All,
I have some questions regarding the customization of B1 Query.
1. We can save user queries with some kind of tags that will be substituted with actual values when B1 is executing those queries.
For example we are saving a query like this
Select $[ORDR.CardCode]
When we execute this query we are seeing this as
Select N'C20000 '
Is there any way to get the second query from B1 with out executing the query. Because in a program, i do need to get the second query which is saved as first one. Is there any way to do this?
2. I had a sales order opened with 3 rows.
If I use this query, I am getting the exact customer from the form
Select $[$4.0.0]
The query
Select $[$38.1.0]
returns the item code of the selected row.
How can I get the item code for the third row if the first row is selected?
3. Is there any list of all B1 supported query customizations?
Thanks in Advance
AnoopYes.
By the word Customization, I meant this.
in B1 user queries, user can specify tags. These tags will be substituted with corresponding values when executing the B1 Query.
For example, If I create a user query with this query string
SELECT $[$38.1.0]
After that I took a sales order with 2 rows and selected the first row.
Then I executed this query and I got this result.
SELECT N'A00005 '
This means the query is replaced with suitable values.
My question was, Is there any way to retrieve the customized query (second one)?
If we search the query table, we will get the first one.
Did you get what I meant?
Thanks
Anoop -
Dear All,
Can we make our user query like this
If [%2] != 'C'
Begin
End
I tried on my side. It doesn't work. Is there anything wrong with my code? Thanks a lot.
Regards,
yukaI would do this:
Declare @campo nvarchar (3)
Set @campo = 'xxx'
IF @campo is null or Rtrim (@campo) =' '
BEGIN
Select * From Tabla T0
END
ELSE
IF @campo is not null or rtrim (@campo)< >' '
BEGIN
Select * From Tabla T0 Where T0.campo =@campo
END
With pop up variables is the same, just replace Declare query format with /* select from ...*/ variable syntax.
(If you need more information about the Declare in SAPB1 user queries, just let me know). -
Prevent User Query on CSA!
Before version 4.5 of CSA, it was very easy to allow or disallow users access to the User Query boxes. Most users don't know what this information means, so why bother them? It seems that now this feature is set up separately on each policy or module?
What is the easiest method of locking down everyone in a group so that they do not get these User Query boxes?I assume you mean User Interactive mode. So if I understand you want the users in a particular group to not be prompted by the events taht CSA generates.
The agent control rule is now in the ALL Windows group (for Windows users) that everybody goes in. You can either adjust this rule, which will affect ALL users or you can create a new rule that will go in specific groups that allow User Interaction for the groups that you want it allowed. THen disable the agent control rule in the ALL Windows group. -
Dear all,
I have a user query like below
Select T001.ItemCode, T001.Warehouse
from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
WHERE T0.[DocDate] > [%0]
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
I got an error Must specify table to select from
If I remove
WHERE T0.[DocDate] > [%0]
it works fine
Select T001.ItemCode, T001.Warehouse
from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
If I just run below, it works fine
SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
WHERE T0.[DocDate] > [%0]
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]
Is this a SAP limitation? I really need to have a
WHERE T0.[DocDate] > [%0]
in this query.
Any idea? Thanks in advance.
Regards,
YukaHI,
Try this:
/*SELECT FROM [dbo].[OINM] T9*/
declare @DocDate as datetime
/* WHERE */
set @DocDate = /* T9.DueDate */ '[%0]'
Select T001.ItemCode, T001.Warehouse
from (SELECT T00.[ItemCode] 'Itemcode', T00.[Warehouse] 'Warehouse', T00.[Price] 'ItemCost'
FROM OINM T00
Inner Join (SELECT MIN(T0.[TransNum]) 'MinTransNum', T0.[ItemCode] 'ItemCode', T0.[Warehouse] 'WareHouse'
FROM OINM T0
WHERE T0.[DocDate] > @DocDate
GROUP BY T0.[ItemCode], T0.[Warehouse]) T01
on T00.[ItemCode]=T01.[Itemcode] and T00.[Warehouse] = T01.[Warehouse]) T001
Thanks,
neetu
Maybe you are looking for
-
Play through from Panasonic DV camera to iMovie 4.
I have my Panasonic NV-GS11 hooked up to my eMac via Firewire. I'd like to be able to play through from VHS recorder to record to my hard-drive but it doesn't seem to want to work for me. I am using an S-Video lead as well, seperate from the audio le
-
Outlook Calendar dates incorrect on icloud
Using Outlook 2007 with icloud control panel on the PC running Windows 7. Everything seems to sync okay, except some calendar events end up on the wrong day in the icloud and therefore propagate this wrong date to the ipad. I do have a fairly high
-
Refresh J2EE server cache without Re deploying
Hello, Does anyone knows how to refresh the Cache on the SAP J2E server without redeploying ?? (I.e : if i copy a mime file directly into to the server.) Thnx for you help quentin
-
Improve the Performance of Loops
Has anyone read "Improve the Performance of Loops" on http://archive.devx.com/free/tips/tipview.asp?content_id=3945 ? If so, would you agree that what's written there is absolute b.....t? He claims that decreasing the counter improves the performance
-
ORA-00399: corrupt change description in redo log
Hello! I have big problem on database startup: ORA-00283: recovery session canceled due to errors ORA-00399: corrupt change description in redo log ORA-00353: log corruption near block 12044 change 465202853 time 12/09/2008 22:00:20 ORA-00312: online