Wildcard empty variable query generator
Hi all,
I am using the typical [%1] variables in the query generator. However, my latest query needs to have many different variable parameters and I would like to leave some of them blank.
For example, the parameters are:
Warehouse Code [%0]
Item Group [%1]
Unit (UDF) [%2]
Row (UDF) [%3]
Column (UDF) [%4]
Problem is... I want to be able to leave some of the parameters blank and I don't want the system to filter by that parameter at all.
SO if I just want to put warehouse code in, then all the other parameters should be *. Or if i want to use item group and row, then all the others will be *. Right now I have to enter exactly what i want from all parameters, so it doesn't work very well. I figured this wouldn't be so difficult.
Any suggestions?
M
Thanks guys, my final code was kind of a mish mash. Works where if you don't enter any variables you will see the entire list of serialized items unfiltered, if you want to sort by location (unit, column, row, warehouse) then you can enter them as needed.
SELECT
T0.[IntrSerial],
T1.[ItemCode],
T1.[ItemName],
T2.[ItmsGrpNam] as 'Item Group Name',
T1.[ItmsGrpCod] as 'Item Group Code',
T1.[U_Unit],
T1.[U_Row],
T1.[U_Col],
T3.[WhsName],
T0.[WhsCode]
FROM OSRI T0
INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
INNER JOIN OITB T2 ON T1.ItmsGrpCod = T2.ItmsGrpCod
INNER JOIN OWHS T3 ON T0.WhsCode = T3.WhsCode
WHERE
((T3.[WhsName] ='[%0]') OR ('[%0]'=''))
AND
((T2.[ItmsGrpNam] ='[%1]') OR ('[%1]'=''))
AND
((T1.[U_Unit] ='[%2]') OR ('[%2]' IS NULL) OR ('[%2]'=''))
AND
((T1.[U_Row] ='[%3]') OR ('[%3]' IS NULL) OR ('[%3]'=''))
AND
((T1.[U_Col] ='[%4]') OR ('[%4]' IS NULL) OR ('[%4]'=''))
ORDER BY
T1.[ItmsGrpCod],
T1.[ItemCode]
The where clauses allow you to leave the variable blank if you want, which is very handy! I know I will use this code again.
Similar Messages
-
Using Variables in Query generator
I'm using the following query to pull a report together later to be used in a query print layout. When i specify the specific part number and customer code it returns what i expect but as soon as i add a variable it says "Must specify table"!
SELECT T0.U_ACI_CAPT, T0.U_ACI_VDS1, T0.U_ACI_VDE1, T0.U_ACI_VSS1, T0.U_ACI_VSE1, T0.U_ACI_VDS2, T0.U_ACI_VDE2, T0.U_ACI_VSS2, T0.U_ACI_VSE2, T0.U_ACI_KWT1, T0.U_ACI_KWT2, T0.U_ACI_SPD1, T0.U_ACI_SPD2, T0.U_ACI_RNC1, T0.U_ACI_RNC2, T0.U_ACI_RNC3, T0.U_ACI_RNC4, T1.ItemCode, T1.Substitute, T0.U_ACI_VDS3, T0.U_ACI_VDE3, T0.U_ACI_VSS3, T0.U_ACI_VSE3, T0.U_ACI_KWT3, T0.U_ACI_SPD3, T0.U_ACI_RNC5, T0.U_ACI_RNC6, T0.U_ACI_ACDC, T0.U_ACI_PHSE, T0.U_ACI_50HZ, T0.U_ACI_60HZ, T0.U_ACI_OFRQ
FROM ((OSCN T1 INNER JOIN ITT1 T2 ON T1.ItemCode = T2.Father) INNER JOIN ITT1 T3 ON T2.Code = T3.Father) INNER JOIN "@ACI_MRBK" T0 ON T3.Code = T0.U_ItemCode
WHERE T1.ItemCode = '[%0]' AND T1.CardCode = '[%1]'
Anyone know how to get these things working?Hi,
if your problem is similar with this symptom :
Using SAP Business One Survey Variables (parameters) in a 'Set' SQL Statement can give an error in the Query Generator.
here the solution I've got from SAP notes:
In such cases you need to put in an SQL remark statement a reference field in the DB for the Survey Variable (any field).
For Example: (to make the above query work)
Declare @Num as numeric(2)
Set @Num = /* T0.DocNum */ [%0]
Select T0.DocNum
From ORDR T0
Where docnum = @Num
Good luck
Rgds,, -
Query Generator Variable Alias
Hi,
How can I create an alias for variables in scripts made with query generator? For example, if i include where clauses such as begin date and end date using greater/less than, they will be both shown in the criteria selection box as "Posting Date." This may be confusing to users unfamiliar with the query format. Can I change these prompt names? Thank you.Hi Allen,
If you mean the selection box when you run query to input values, then the answer is no. The selection box will only desplay the field description like you can see in DTW template.
For the query results, I am sure you know how alias can be assigned
Thanks,
Gordon -
In Query Generator I need to prompt for dates using [%0] and [%1]. However, I get an error once I input dates. Do the query variables come in as string format and if so, how do I compare a date input
I'm not a specialist on this, but I have to learn this for the Certification exam. So, I played with Queries and noticed that the date format is driven by the Date format parameter in Administration - General settings - Display.
I tried the following query:
SELECT CardCode, UpdateDate FROM OCRD T0 WHERE T0.UpdateDate >= '[%1]' ORDER BY T0.UpdateDate
When the date format is CCYY-MM-DD it works with 2003-11-31 and 03-11-31 and 03.11.31.
When the date format is set to DD.MM.YYYY the query runs OK with 31.12.02.
HTH
Juha -
Dear all,
I face an issue in Query generator.
When i execute the query in query generator, the error is like this
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
'Service Contracts' (OCTR)
My query is like this
Declare @StartYear as char(4)
Declare @EndYear as char(4)
Declare @Dept as char(3)
Declare @UnitBusiness as char(3)
Begin
set @StartYear = (Select YEAR(T0.[RefDate]) from JDT1 T0 where T0.[RefDate] = [%0] )
set @EndYear = (Select YEAR(T1.[RefDate]) from JDT1 T1 where T1.[RefDate] = [%1])
set @Dept = (Select T2.[Name] from OASC T2 where T2.[Name] = [%2])
set @UnitBusiness = (Select distinct SUBSTRING(T3.[Segment_0],10,2) from OACT T3 where ( T3.[Segment_0] = [%3] OR ( 1 = (CASE WHEN [%3] = 'All' THEN 1 ELSE 2 END) ) ))
Exec NEC_RPT_FinanceReport @StartYear,@EndYear,@Dept,@UnitBusiness
End
The problem is i can not show the input screen after i execute the query generator.
If i remove the the Variable @Dept and replace with the value it runs well.
Does any one know where is the problem ?
Thanks in advance
Regards
Bodhi86HI Neetu, i have change the query without using store procedure
my query is like this
Declare @StartYear as char(4)
Declare @EndYear as char(4)
Declare @Dept as char(3)
Declare @UnitBusiness as char(3)
Begin
set @StartYear = (Select YEAR(T0.[RefDate]) from JDT1 T0 where T0.[RefDate] = [%0] )
set @EndYear = (Select YEAR(T1.[RefDate]) from JDT1 T1 where T1.[RefDate] = [%1])
set @Dept = (Select T2.[Name] from OASC T2 where T2.[Name] = [%2])
set @UnitBusiness = (Select distinct SUBSTRING(T3.[Segment_0],10,2) from OACT T3 where ( T3.[Segment_0] = [%3] OR ( 1 = (CASE WHEN [%3] = 'All' THEN 1 ELSE 2 END) ) ))
Select @StartYear,@EndYear,@Dept,@UnitBusiness
The error is like this
1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Must specify table to select from.
2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'User-Defined Values' (CSHS) (s) could not be prepared.
Can you help me
Thanks in advance -
Hi, I'm having sounds like silly problem using Query Generator, if I execute this query it does not give me the 'selection list' for Fiscal Year. I'm using v8.8 PL10 but in v2007 it's working fine. If I use other table like OITM w/ fieldX =N'[%0]', its working in v8.8.
SELECT T0.[Code], T0.[Name] FROM [dbo].[@BA_OAMD2] T0 WHERE T0.[U_FisYear] =N'[%0]'
thanks,
Edited by: Jojo on Jan 8, 2011 4:55 PM
Edited by: Jojo on Jan 8, 2011 4:56 PMHi, I think the problem has nothing to do w/ the SQL, because if I run it in v2007 it works but not in v8.8.
SELECT T0.[Code], T0.[Name] FROM [dbo].[@BA_OAMD2] T0 WHERE T0.[U_FisYear] =[%0]
creating inner join w/ OFPR and make where condition in OFPR.[Code] is the alternative solution, but I want to use only the code above and let me have 'list selection'
SELECT T0.* FROM [dbo].[@BA_OAMD2] T0
inner join OFPR T1 on T0.[U_FisYear] =T1.Code WHERE T1.[Code] =[%0]
I have noticed that if I use UDT in my SQL w/ variable selection the option for 'list selection' and right click on selection criteria 'List of Items' is not working. I'm using v8.8 PL10, is it a bug?
Edited by: Jojo on Jan 9, 2011 4:22 PM -
BPEL Process returns "empty variable/expression result."
Hi,
I have an Asynchronous BPEL Process which uses a DB Adapter (which in turn uses a custom SQL Procedure) to insert a value in to a table and return a sequence value generated in the procedure back to the BPEL Process. The process inserts the value in to the table but the sequence is not returned back and i get the below error,
<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
<part name="summary">
<summary>
empty variable/expression result.
xpath variable/expression expression "/ns2:OutputParameters/ns2:X_NO" is empty at line 94, when attempting reading/copying it.
Please make sure the variable/expression result "/ns2:OutputParameters/ns2:X_NO" is not empty.
</summary>
</part>
</selectionFailure>
If i see the process flow the invoke activity shows the sequence value is returned from the procedure but when the invoke activity passes that value to the Assign activity its lost and the above error is displayed.
The details i see in Invoke activity is below,
<messages>
<Invoke_1_DBProcWrite_InputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
<InputParameters
xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/SUR_NEW_BPEL_PROC/">
<P_NAME>Vivek</P_NAME>
</InputParameters>
</part>
</Invoke_1_DBProcWrite_InputVariable>
<Invoke_1_DBProcWrite_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
<db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/SUR_NEW_BPEL_PROC/">
<X_NO>9</X_NO>
</db:OutputParameters>
</part>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="response-headers">[]</part>
</Invoke_1_DBProcWrite_OutputVariable>
</messages>
I use Jdeveloper version 10.1.3.3.0.4157. I did not recieve this error in Jdeveloper 10.1.3.1.
Please let me know how to resolve this issue.
Regards, SureshI have exactly the same problem!!!! I would appreciate someone from Product or other to explain why I can see the incoming variable being created but when XPath expression is attempted to extract a value so I can do an assignment I get a "empty variable/expression result".
Using JDEV10.1.3.3 and SOA 10.1.3.3 advanced install. My process is receiving a R12 Business Event listed here:
<?xml version="1.0" encoding="UTF-8" ?>
- <WF_EVENT_T xmlns="http://xmlns.oracle.com/xdb/APPS/BES_EVENT/BES_EVENT">
<PRIORITY xmlns="">50</PRIORITY>
<SEND_DATE xmlns="">2008-04-30T13:40:33.000-05:00</SEND_DATE>
<RECEIVE_DATE xmlns="">2008-04-30T13:40:40.000-05:00</RECEIVE_DATE>
<CORRELATION_ID xmlns="" />
- <PARAMETER_LIST xmlns="">
- <PARAMETER_LIST_ITEM>
<NAME>BO_ID</NAME>
<VALUE>123456</VALUE>
</PARAMETER_LIST_ITEM>
- <PARAMETER_LIST_ITEM>
<NAME>#CURRENT_PHASE</NAME>
<VALUE>201</VALUE>
</PARAMETER_LIST_ITEM>
</PARAMETER_LIST>
<EVENT_NAME xmlns="">oracle.apps.ar.hz.PersonBO.create</EVENT_NAME>
<EVENT_KEY xmlns="">777666</EVENT_KEY>
<EVENT_DATA xmlns="" />
- <FROM_AGENT xmlns="">
<NAME>WF_BPEL_QAGENT</NAME>
<SYSTEM>VIS12.US.ORACLE.COM</SYSTEM>
</FROM_AGENT>
<TO_AGENT xmlns="" />
<ERROR_SUBSCRIPTION xmlns="">TBo0FQQPy6ngQKjAuQAXWA==</ERROR_SUBSCRIPTION>
<ERROR_MESSAGE xmlns="" />
<ERROR_STACK xmlns="" />
</WF_EVENT_T> -
User defined query parameter in query generator
Hi All,
i am using query generator in SAP to print some records of user defined query. precisely, the details about sales employees are to be printed. now the columns which exist in the database (ie. sales employee code, name, cardcode) etc can be given as a parameter like [%0] and [%1]. but some user defined parameter such as sales commission does not show as such parameter. i want one column as
select T0.doctotal, (T0.doctotal * [%0]) / 100 as brokerage from OINV T0
--where [%0] is some commission percentage that the user will give while running this query
This query gives correct results but it gives the parameter name as 'doctotal' while showing. any idea as to how to handle it properly in SAP?
thanks in advance,
Binita
Edited by: Binita Joshi on Sep 8, 2009 3:35 PMI sometimes defined a UDT only for getting the appropriate parameter entering window. The table has no data; I used it only for its field names in this window.
(The parameter request can be placed inside a comment and the entered value is used setting an SQL variable like this:
declare @d datetime
/*select t.createdate from ordr t where t.createdate=[%0]*/
set @d=[%0]
This SQL variable can be used later in the real query.) -
Query Generator Funny error message
Hello Experts, Not sure if you ever seen something like this, but be great if anyone can offer me some insight...
on a normal query with parameter I have something like thsi
/*select from ORDR t0*/
declare @begandate as datetime
/* where */
set @begandate = /* t0.docdate*/ '[%0]'
and it runs fine with just about any table, view...etc.. But as soon as you have a UDT in SBO... put in like
/*select from ORDR t0*/
declare @begandate as datetime
/* where */
set @begandate = /* t0.docdate*/ '[%0]'
select * from dbo.[@bos_del_pri] a inner join ordr b on b.u_prioritycode = a.code
where b.docdate = @begandate
it give me funny error messages, "Only one epxression can be specifed in the select list when the subquery is not intrudoced with Exist"
This is ran at a SBO 2005B PL35... when I ran a similar query in SBO 2005A PL45 I get soemthing like
"must specify table to select from".. I know this error message doesn't make sense, but not sure if anyone has encounter the same problem, and if yes possible solutions?
Thank YouHello Friends,
This is in accordance to provide the information that Query Generator does not work with parameters and User defined tables together. As per my experience in SQL UDT tables start with "@" and variables declared in SQL are also prefixed with "@" so SQL does not make any difference between UDT of SAP and variable of SQL. Thus we are not able to use ([%0] parameters and UDT tables) together.
Please correct me if I am wrong.
Please forgive me if i have posted wrong information
I look forward to your reply.
Regards,
Murtaza -
How to add parameters to a stored procedure in B1 Query generator
Dear All,
I made a stored procedure in sql. I'd like to call it from B1. It's working fine when I call like this (I created an empty query in Query generator and paste this) :
exec stproc @projectFrom = '',
@projectTo = 'PRJ03',
@profitCodeFrom = '',
@profitCodeTo = 'uj',
The problem is, Could I call this procedure with parameters like normal queries (select ... where .. = [%0])? Can I pass parameters to it somehow?
Thanks a lot
JaniInside B1 :
DECLARE @return_value int
Declare @Fromdate datetime
declare @Todate datetime
declare @supp nvarchar(15)
SELECT * FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry where
T0.cardcode = '%Supp' and T0.DocDate <=%FromDate
and T0.DocDate >=%ToDate
EXEC @return_value=SQL2XMLforINV
@Fromdate= %FromDate,
@ToDate= %ToDate,
@Supp = '%Supp'
SELECT 'Return Value' = @return_value
And in SQL I have a stored procedure :
Starting like this :
PROCEDURE [dbo].[SQL2XMLforINV]
@Fromdate datetime,
@Todate datetime,
@supp nvarchar(15)
AS
DECLARE @bcpCommand AS varchar(3000)
declare @base nvarchar(50)
BEGIN
SET NOCOUNT ON;
And my error message is in B1 ....
Thanks in advance for your help .... -
Sales report from query generator
Hi Experts,
Im using query generator i had given selection criteria like, Posting date from and To, Profit centre, Numbering series name,
query:
SELECT T0.[DocNum], T0.[VatSum], T0.[DocTotal], T1.[PrcCode], T1.[PrcName], T1.[Balance] FROM OINV T0 , OPRC T1 INNER JOIN NNM1 T2 ON T0.Series = T2.Series WHERE T0.[DocDate] > ='[%0]' AND T0.[DocDate] < ='[%1]' AND T1.[PrcCode] ='[%2]', T2.[SeriesName] ='[%3]'
Error:
1. 1)(Microsoft)SQL Native client)(SQL Server)Incorrect syntax error near u2018 u2018,Microsoft(SQL Native client) (SQL Server)statement u2018User Defined Valuesu2019 (CSHS)(1) could not be prepared.
can u give any idea to solve this problem,
thanks in advance,
anand.rHi,
I made a mistake in the variables:
SELECT T0.DocNum, T0.VatSum, T0.DocTotal, T1.PrcCode, T1.PrcName, T1.Balance
FROM dbo.OPRC AS T1 INNER JOIN
dbo.OINV AS T0 INNER JOIN
dbo.NNM1 AS T2 ON T0.Series = T2.Series ON T1.PrcCode = T0.Project
WHERE (CAST(T0.DocDate AS VarChar) <= [%1]) AND (T1.PrcCode = [%2]) AND (T2.SeriesName = [%3]) AND (CAST(T0.DocDate AS VarChar) >= [%0])
Kind regards,
Hendri Wessels
EDIT: I see that the variables do work in B1UP like this, but not in SAP Query generator.
Edited by: Hendri Wessels on Jul 27, 2009 8:58 AM -
Declare func on Query Generator
Hi,
I am Using SAP B1 for hana ver 9.0 PL10
I have a difficulty to use Declare function as variable reference in Query Generator, Any tips for this matter ?
ThanksYou can do this using the SAP Business One Query Manager. The code below calls a stored procedure with one parameter of the DateTime type, which the user is prompted to enter:
declare @tmp as nvarchar(100)
select @tmp = T0.Name from [@ADV] T0
WHERE T0.U_Date = '[%0]'
EXEC myReport '[%0]'
The table @ADV is used just to let SBO know that the actual type of the [%0] parameter is Date. -
Empty variable/expression result. xpath variable/expression expression
Hi,
I am new to BPEL, I have created one Process and trying to Call Procedure with the help of Invoke Process Activity. Database Procedure having one input parameter and one output parameter. When i am trying to execute deployed webservice it gives me error like
<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>env:Server</faultcode>
<faultstring>com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is 94218a8977e86d41:78a12598:12e474197b6:-7f6f. Please check the process instance for detail.</faultstring>
</Fault>
Server Trace for this: From Audit Instance
receiveInput
[2011/02/21 17:07:04] Received "inputVariable" call from partner "client"More...
- <inputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
- <ns1:DBAdaptorParam2ProcessRequest xmlns:ns1="http://xmlns.oracle.com/DBAdaptorParam2">
<ns1:input>wwww</ns1:input></ns1:DBAdaptorParam2ProcessRequest></part></inputVariable>
Assign_in
[2011/02/21 17:07:04] Updated variable "Invoke_DBService_DBAdaptor2_Service_InputVariable" More...
- <Invoke_DBService_DBAdaptor2_Service_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/">
<PARAM1>wwww</PARAM1></InputParameters></part>
</Invoke_DBService_DBAdaptor2_Service_InputVariable>
Invoke_DBService
[2011/02/21 17:07:04] Invoked 2-way operation "DBAdaptor2_Service" on partner "DBAdaptor2_Service".less
- <messages>
- <Invoke_DBService_DBAdaptor2_Service_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/"><PARAM1>wwww</PARAM1>
</InputParameters></part>
</Invoke_DBService_DBAdaptor2_Service_InputVariable>
- <Invoke_DBService_DBAdaptor2_Service_OutputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
- <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/"><PARAM2>wwww Extra added</PARAM2></db:OutputParameters></part>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]</part>
</Invoke_DBService_DBAdaptor2_Service_OutputVariable>
</messages>
Assign_out (faulted)
[2011/02/21 17:07:04] Error in evaluate <from> expression at line "87". The result is empty for the XPath expression : "/ns2:OutputParameters/ns2:PARAM2".less
oracle.xml.parser.v2.XMLElement@7cc53
[2011/02/21 17:07:04] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
- <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
- <part name="summary">
<summary>
empty variable/expression result.
xpath variable/expression expression "/ns2:OutputParameters/ns2:PARAM2" is empty at line 87, when attempting reading/copying it.
Please make sure the variable/expression result "/ns2:OutputParameters/ns2:PARAM2" is not empty.
</summary></part></selectionFailure>
I am not able to fix this issue please help me out.
Thanks in Advance
Thanks,AbhijitHi,
Thanks for reply.
For the development guideline i had followed "http://www.erpschools.com/apps/oracle-applications/articles/Fusion-Middleware/SOA/BPEL/BPEL-Database-Adapter-Part-2/index.aspx" this document. Instead of using "select" query, here I am using database procedure to get output.
For this I am giving input as "Abhijit" and database procedure "GETCONCATESTRING" is returning value as "Abhijit Extra added",
but finally i am getting this error:
Invoke_DBService
[2011/02/22 12:55:08]
Invoked 2-way operation "DBAdaptor2_Service" on partner "DBAdaptor2_Service".
- <messages>
- <Invoke_DBService_DBAdaptor2_Service_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/GETCONCATESTRING/">
<PARAM1> Abhijit </PARAM1> </InputParameters> </part> </Invoke_DBService_DBAdaptor2_Service_InputVariable>
- <Invoke_DBService_DBAdaptor2_Service_OutputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
- <db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/ *GETCONCATESTRING* /">
<PARAM2> Abhijit Extra added </PARAM2></db:OutputParameters></part>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]</part>
</Invoke_DBService_DBAdaptor2_Service_OutputVariable></messages>
Please Guide me to use Receive Activity for output.
Edited by: 815926 on Feb 21, 2011 11:41 PM
Edited by: 815926 on Feb 21, 2011 11:42 PM -
CAN WE HAVE IF CONDITION IN QUERY GENERATOR
Hi friends,
am, trying to make use of if condition to obtain a set of values in query generator. Its possible to retrieve the required result set using query analyser but not in query generator. am trying to execute the following query
if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 1 and owor.itemcode = '100-100')
begin
select itt1.u_reactor1 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
end
else
if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 2 and owor.itemcode = '100-100')
begin
select itt1.u_reac_23 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
end
else
if exists (select owor.u_reactor from owor,oitt where oitt.code=owor.itemcode and owor.u_reactor = 3 and owor.itemcode = '100-100')
begin
select itt1.u_reactor4 from oitt,itt1 where itt1.father = oitt.code and itt1.father = '100-100'
end
if it is not possible to write such query in query generator can someone help me with a workaround solution.
Thank u
VaitheeswaranHi,
I dont think Nested IF Statements are allowed in PLD. The reason that u get the result in Query analyser and not in Query Generator is that SAP supports Transact SQL and many SQL Server 2000 functions are not supported.
However there is a work around in Print Layout Designer for using IF condition by having Linked Objects. Kindly see some tutorials regarding Linked fields available on SDN site and think of some other way of implementing this nested IF query.
Regards
Rizwan Hafeez
Team Lead
SAP Addon Development Section
Abacus Consulting - Pakistan -
How to do this in Query Generator?
Dear Experts,
Please check my following query I've written in Query Generator.
/* select from dbo.OCRD t0 */
declare @BP nvarchar(20)
set @BP=/* t0.CardName */ '[%0]'
declare @Dt1 datetime
declare @Dt2 datetime
set @Dt1=/* Start Date */ [%1]
set Dt2=[%2]
select distinct t1.po, Max(t1.supplier) Supplier,Max(t1.process) Process, Max(t1.OrderNo) OrderNo,Max(t1.Date) Date,
isnull((select sum(t2.Quantity) from dbo.ir t2 where t2.po=t1.po and t2.TType<0),0) Issued,
isnull((select sum(t3.Quantity) from dbo.ir t3 where t3.po=t1.po and t3.TType>0),0) Received,
isnull((select sum(t2.Quantity) from dbo.ir t2 where t2.po=t1.po and t2.TType<0),0)-isnull((select sum(t3.Quantity) from dbo.ir t3 where t3.po=t1.po and t3.TType>0),0) Balance
from dbo.ir t1 where t1.Supplier=@BP and (t1.Date>=@Dt1 and t1.Date<=@Dt2) group by t1.po
The Query works well. But for the the lines
set @Dt1=/* Start Date */ [%1]
set Dt2=[%2]
it displays BP Code as the prompt next the text boxes meant for inputting dates. I would like to display 'Start Date' and 'End Date' respectively for Dt1 and Dt2.
Please explain me how to go about it.
Thanks in advance.
Regards
Ananddeclare @Dt1 datetime
set @Dt1=/* Start Date */ [%0]
declare @Dt2 datetime
set @Dt2=/* End Date */ [%1]
/* select from dbo.OCRD t0 */
declare @BP nvarchar(20)
set @BP=/* t0.CardName */ '[%2]'
I've changed. When I run the query the input box does not appear, the query shows only a blank table.
Thanks
Anand
Maybe you are looking for
-
How can I solve the error "media corruption error"?
I have asynchronous errors in Media and MediaPlayer objects: [com.sun.media.jfxmediaimpl.NativeMediaPlayer@1b0a038] "Error: medio corrupto": "Error: medio corrupto". When the program runs in NetBeans the error doesn´t appear "quickly". When the progr
-
How to insert Integer array in a MySql DataBase
Now i am doing one swing application,in that i have List box,My doubt is ,How to insert the mutiple seleted value into database.
-
Best practice SSL End-to-End in Exchange 2010 CAS loadbalancing
Hi, I was wondering if there is a best practice for deploying SSL End-to-End in Exchange 2010 CAS loadbalancing. We have ACE modules A5(1.1) and ANM 5.1(0), although there seems to be a template available in ANM it doesn't work. It throws a error whe
-
Accessing view ALL_WM_LOCKED_TABLES
We have a problem executing selects against the Workspace Manager view ALL_WM_LOCKED_TABLES. In all cases, the error message "Table or view does not exist" is returned. Using Enterprise Manager, we checked and confirmed that the status of the view is
-
Dashboard for top Management.
Dear all, i have to design dashboard for top management.my query is how i can decide that what general information a top management requires to be displayed on dashboardas i have no clear requirements...and am a fresher..i will give points if i got h