RPD: How to use multiple-value variables in initialization blocks ?
Hi all,
I have a set of initialization blocks required for authentication, two of which are running row-wise. The first one sets a multi-valued variable, and the second one uses this variable.
Or at least, should use, because it actually fails. The NQServer log says
[nQSError: 13011] Query for Initialization Block 'My_Init_Block_2' has failed.
[nQSError: 23006] The session variable, NQ_SESSION.MY_VAR_1, has no value definition.
My first variable is initialized in a basic row-wise initialization block. What's more, if I say my 2nd block isn't required for authentication, and I read in a narrative the contents of my first variable, it contains the set of value I expect it to have.
can anybody please advise?
thanks in advance!
Cedric..
There is an example in the OBIEE Server Administration manual that looks very similar to your code except that the whole of the valueof string is quoted:
select
NAME, VALUE from RW_SESSION_VARS
where USERID='VALUEOF(NQ_SESSION.USERID)' {code}<br /><br /><br /><br />Pete
Similar Messages
-
How to use multiple values in an IF condition in RTF
Hi,
I have a scenario as mentioned below.
IF column value in ('A','B')
display C;
end if
IF column value not in ('A','B')
display D;
end if
My query is how to provide multiple values in an IF condition.?
Thanks,
AnandBut suppose "x.jar" needs a library from "y.jar". How do you put another JAR on the classpath of an applet in a Web page?
<applet code="z.class" archive="a.jar,b.jar,c.jar"> -
How to use multiple statements inside the "THEN" block of CASE statement?
Below is the code:
SET @strTempString = case @strKeyMode
WHEN 'AUTO/CYCLE'
THEN @strRefID + '|' + @strRetID
WHEN 'CYCLE'
THEN @strRefID + '|' + @strRetID
WHEN 'COMMERCIAL'
THEN @strRefID + '|' + @strRetID
WHEN 'ISNAP'
THEN set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + ' ', 2) + ' ', 2))))
'' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType
WHEN 'ASNAP'
THEN @strRefID + '|' + @strRetID
WHEN 'MOAT'
THEN @strRefID + '|' + @strRetID
else '0'
end
The first 3 conditions are understandable. How to use multiple statements in 4th case?
Here I first want to set the value as:
set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + ' ', 2) + ' ', 2))))
and then return the string '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType to @strTempString.
Please help me remove the syntax errors.
Thanks in advance.Try below SQL
DECLARE @strKeyMode varchar(20) = 'ISNAP'
DECLARE @SQL VARCHAR(MAX)
DECLARE @strRefID int=1
DECLARE @strRetID INT=2
--FIRST WAY
IF @strKeyMode ='AUTO/CYCLE'
SELECT CAST(@strRefID as varchar(10))
ELSE IF @strKeyMode ='CYCLE'
SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
ELSE IF @strKeyMode='ISNAP'
SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
ELSE
SELECT @SQL='ABC'
print @sql
----SECOND WAY
SELECT @SQL = CASE @strKeyMode
WHEN 'AUTO/CYCLE' THEN CAST(@strRefID as varchar(10))
WHEN 'CYCLE' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
WHEN 'ISNAP' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
ELSE 'No Record'
END
PRINT (@SQL)
--Prashanth -
How to retrieve multiple values from a DB Adapter to a Web Service
Hello,
I'm creating a login WS that receives the username and password and returns the user status, full name and a set of permissions (the number of permissions varies among users).
In order to do that i've created a DBAdapter that is calling a PL/SQL procedure. This DBAdapter is connected to the login Web Service through a mediator.
I have two problems:
1 - I don't know the type of variable that the PL\SQL procedure should return. Like I said I need to retrieve an undefined number of values from a table (user permissions). How can I do this inside a PL\SQL procedure? What kind of structure should i return?
2 - How can i assign a multiple value variable (the permission variable) in the mediator? Is the mediator going to identify that this is variable is multiple valued and add automatically a for-each statement?
The Oracle DB version im using is the 11.1.0.7.0 and the Oracle SOA Suite 11.1.1.3.0.
Thanks in advance,
PauloHey guys,
thanks for your help.
I've created a userdefined type and sucessfully retrievied from the PL\SQL procedure multiple values. I have also mapped this values with the web service.
Even though everything's working fine i would like to understand if it is also possible to use the XMLType to return these values. I ask this cause I don't no if by returning a XMLType i can explicitly map the XML elements inside the mediator component.
If possible what are the main advantages/disavantages between using XMLType and Userdefined Types?
Paulo. -
How to pass multiple values from workbook to planning function ?
Hi,
I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
A.) input one value -> V1
B.) input three values -> V1;V2;V3
This function execute completely in web.
However, I want to use the planning function in workbook(Excel).
The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
thank you.Hi,
Please see the attached how to document (page no 16).
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
Hope this was helpful
thanks -
How to use multiple selection parameters in the data model
Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
My data template is the following (it's very simple...I am just testing how the parameters work):
<dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
<parameters>
<parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
<parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
</parameters>
<dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
<dataQuery>
<sqlStatement name="Q2">
<![CDATA[
select deptno, dname,loc
from dept
&p_where_clause
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_DEPT" source="Q2">
<element name="deptno" value="deptno"/>
<element name="dname" value="dname"/>
<element name="loc" value="loc"/>
</group>
</dataStructure>
</dataTemplate>
The 2 parameters are based on these LOV:
1) select distinct dname from dept (p_dep_2_param)
2) select distinct loc from dept (p_loc_1_param)
and both of them have checked the "Multiple selection" and "Can select all" boxes
The package I created, in order to use the lexical refence is:
CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
as
p_dep_2_param varchar2(14);
p_loc_1_param varchar2(20);
p_where_clause varchar2(100);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
then
p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
else
p_where_clause := 'where 1=1';
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
it works perfectly....
Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
So my questions are these:
1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
Thanks in advance for any suggestion
AlexAlex,
the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
So change your package to (you need to expand your variables)
create or replace package bip_departments_2_parameters
as
p_dep_2_param varchar2(1000);
p_loc_1_param varchar2(1000);
p_where_clause varchar2(1000);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
create or replace package body bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
p_where_clause := ' ';
if p_dep_2_param is not null then
if instr(p_dep_2_param,',')>0 then
p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
else
p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
end if;
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
end if;
end if;
else
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
end if;
end if;
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
Regards
Rainer -
How to select multiple values from a listbox
Hi,
I have a list box on my UI which is not allowing me to select multiple values
I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving error
When i drag & drop the component i am unable to drop it as a multi select list box that option is not coming.
I am working on Jdev 11.1.1.3 and I am using ADF/BC components
How to select multiple values from a listbox ?
Thanks,Hi,
I want to use multi select list box .. When i go to source of UI component and change that to select many listbox my page is not rendering it is giving errorank
And what is the error ?
Frank -
How to select multiple values from the parameters in BI Publisher report
How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...
Hi kishore,
I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
Iam able to get the results when I am selecting one value..
and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
1.Single selection.
2.Multiple selection.
3.'ALL' Values.
4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
Ex:
Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
Expected Output on the report:ACCOUNT,HR,SALES
reply to this would be much appreciated....
thanks,
manoj -
How to select multiple values from the Parameters in the concurrent program
How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?
I think there's no way to do that using standard feature.
Some workaround I use :
1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
Selection1 : <choose first selection>
Selection2: <choose 2nd selection>
..etc.
If you don't use it then leave it empty.
2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc. -
Multiple value variable - not showing Multiple values in the report
Hi,
I have careated a Multiple value variable for one of the characteristics in my Query. however, When i run the Query and select multiple values for the same, the report displays values for only the first selection.
Could you help me resolve this ?
Rgds
ShwetaHello Shweta,
Are you running the report in the Analyzer excel or Web?
May be you can check the following:
1. Use the latest FEP. It is working for me.
2. May be the other values that you selected do not have corresponding keyfigures values. Hence it is showing only the first one.
Try selecting other values ( except first one selected this time )
Regards,
Sheik Bilal -
How to use Table valued MSSQL function in OBIEE
Hi all,
Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
I know for MSSQL Stored Procedure we can write as
EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
but now I have a table valued function in the query window I can get the data as
select * from myfunction(parametervalue)
In physical layer of OBIEE I have tried as
select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
Can some one help me to solve this.
Thanks,
MithunFollow this link and try yourself. let me know for issues
Substring instr issue in obiee
Appreciate if you mark
Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM -
Script logic - how to use a selection variable within an allocation logic
Hi,
I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
If we hard code the members it works fine:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
So if we start with write the following logic, it does not work anymore:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
regards
Dries
solved it ...
Edited by: Dries Paesmans on Feb 22, 2009 8:31 PMHi Dries,
Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
*DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
Regards,
Tim -
How to create charasteristic value variable step by step please?
How to create charasteristic value variable step by step please?
I searched the previous threads it is not listed.
I will assing points to only valuable information.
YorkHi Les,
http://help.sap.com/saphelp_nw04/helpdata/en/ac/789b3c4d4d8d15e10000000a114084/content.htm
In the left hand side of the query designer, find your char and under than there will be a button with text called Characteristic Value Variables. Right click this and choose New Variable. This will open the variable wizard. You need to follow the screen to define a technical name and description, the processing type, the user entry options and if the variable will accept single or multiple values, and also if you want to set a default value.
Hope this helps... -
How to use Replacement Path Variables to perform Date Calculations
Hi Experts,
Can anyone make me clear about:How to use Replacement Path Variables to perform Date Calculations???????
Thankyou in advance..
shankarIn left panel select the time Dimension
Then hit new variable in that
give the Name and Description for the Variable
In processing by hit Replacement Path
In reference characterisitcs use Calendar Day...
As ur intention is to use it for Date
Then in adjacent tab use
Replace variable with Query / Variable
Then u can use Offset length and offset start for controoling the display of your variable.
Use as single, multiple single, interval, selection option as uwish
HIt okey
and you are good to go -
How to use multiple ipods on one account
I have an Ipod classic and just bought my sons two nano's how do I use these on the same account without changing my account info?
Take a look here:
How to use multiple iPods with one computer
Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Discussions page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums, in the User Tips Library and in the Apple Knowledge Base before you post a question.
Regards.
Maybe you are looking for
-
How do i make webpages open with a new tab everytime
I'm sure this is a goofy question but how do I make FF open webpages in a new window or tab when I click on a bookmark? I know I can right click and do it manually but is there a way to make a favorite open in a new tab when I click on it? Thanks, De
-
How set the FI Document's Invoice ref.(BSEG-REBZG) to 'V' when SD billing.
How can automatic set the FI Document's Invoice ref.(BSEG-REBZG) to 'V' when I do a SD billing.(VF01 credit memo) How can automatic set the FI Document's Invoice ref.(BSEG-REBZG) to 'V' when I do a MM billing.(Miro credit memo) How can automatic set
-
Setting a Trasparent Color?
Hey folks, Im working with Keynote for the first time this evening and as a long term Window's user I am having a bit of a hard time transitioning. I am looking for a feature in Keynote that allows me to set a transparent color on an image (similar t
-
Comcast cable internet hook up
How do you configure for comcast hi=speed internet?
-
Updating NETPR field of table EINE using BAPI
Hello All, I have a requirement to update info record data in tables EINE, EINA, KONP. The fields to be updated are KSCHL, KBETR and NETPR. I am able to successfully update KBETR and KSCHL fields using bapi BAPI_PRICES_CONDITIONS. But I am unable to