Broadcasting - dynamic variables
Hi,
I have question on broadcasting while using mandatory variables which need to be dynamically filled. Here is my scenario:
I am on BI 7.0 and using email bursting.
Query is having 4 variables : CalDay, Fisc Period, Company code, currency.
Calday and Fiscper are pre-populated using customer exit. (-step =1). They are current day and current Fiscal Period.
Currency and company needs to be passed to broadcasting job.
Now as per my understanding, these needs to be passed thru 'general pre-calculation' tab either thru variable assignment or variant. But issue is in either of this, values for current day and current fisc period gets saved and will not be refreshed when broadcasting runs next time, which we dont want.
To over come this issue, we need to write abap program to dynamically change these values. Now per my observation, this setting gets stored in table RSRD_SETT_NODE_A.
Finally here are my questions,
1) In table RSRD_SETT_NODE_A, i just see variant name but the actual fields and values used for this variant are not stored here. Could you please guide me where the actual values are stored so that if I have to write ABAP program, i can change those values. (I dont see this variant in RSRVARIANT table also.)
2) Other options to leverage without using above ABAP method.
Thanks in advance for all your help and time
S
HI,
The variants of the variables will be stored in the table TVARV. May be you can write a custom ABAP program to modify this variant values in this table and see if the broadcast happens accordingly.
Guess this will help to solve your issue.
You can have a look at this for more info
/thread/69150 [original link is broken]
Regards.
Shafi.
Edited by: shafi abdul on Jun 23, 2010 6:28 PM
Similar Messages
-
Dynamic variable assignment under general precalc tab of broadcasting
Is there a way to dynamically assign variable values to the "general precalculation" tab under broadcasting? I am broadcasting a report and I want to change the variable values every month dynamically. I want to write an ABAP program that can fill the variant valus under that general precalculation tab. Is this possible?
There is a table RSRD_SETT_NODE_a that contains all the broadcast settings. It has the variable values. We wrote an ABAP program to update this value. We can save a variant of this program and run the variant before we run the broadcast. The broadcast setting, variable name we want to update, and the class to pass values to this variable are input parameters to the program. Let me know if you want more details.
-
Broadcasting and Variable Assignment
Dear Experts,
I want to assign variable in broadcasting dynamically. For example, this variable will be changed every month. I tried to set the variant on BEx Analyzer, and looked into the table TVARV, but I couldn't find my variant in that table. Is there any way to assign variable dynamically?Hi CSM Reddy,
1. while creating your Broadcasting Settings ... you can use your Variable for OLAP Cache.
Question1. How and where can I use variable for OLAP Cache in broadcasting. What I just see is variable assignment in the General Precalculation tab
Question2. Variable for OLAP Cache you said is the same as the variable created in Query Designer, right?
2. then you make sure the variable in Bex is setup with "Ready for input" unchecked
Question1. I have to allow users to input month to see the report in the month they want, so I think I can't default the value for this variable.
Question2. What do you mean 't Type variable'? -
Broadcasting: Dynamic Filter
Hi,
I would define a query broadcasting by email once a month.
In the query i have the variable Mont to filter.
How can I configure the broadcasting filter to choose dynamically the month to filter the query?
I can't find how to do it?
Any Idea?
Thanks a lot!!!
DaniHi,
Thanks for your replies!
I would send the query every month, with the information of the current month. I need to calculate in the broadcasting dynamically the current month.
In the broadcasting i don't find the place when i can put the variant for the query.
Any other idea?
Regards,
Dani. -
Binding dynamic variable in XQuery doesn't work: ORA-00932
I have a table with several columns. One of those columns is a XMLType.
My goal is to have a query which selects rows from the table of which the XML column matches certain criteria.
I'm trying following example (JDBC) : http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb_xquery.htm#insertedID11
First, I created my own query, which looks like:
select * from MyTable t, XMLTABLE( xmlnamespaces (DEFAULT 'http://test), 'for $i in /RootElement where $i/SubElement[contains(Element, "someValue")] return "true"' passing t.xmlColumn)This works as expected. Next, as done in the example, I'm trying to replace the "someValue" with a dynamic variable.
Query then looks like:
select * from MyTable t, XMLTABLE( xmlnamespaces (DEFAULT 'http://test), 'for $i in /RootElement where $i/SubElement[contains(Element, $val)] return "true"' passing t.xmlColumn, :1 as "val")This does not seem to work, neither in SQLDeveloper nor in java.
I always get the :
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CHAR(SQLDeveloper just gives ORA-00932)
When I put $val between quotes (so "$val") then I get no error, but then I get no results either.
I think it will not replace $val in that case but just use it as a literal, so thats not what I want
I also tried to remove "contains" xpath and use the exact same example as on the oracle page
select * from MyTable t, XMLTABLE( xmlnamespaces (DEFAULT 'http://test), 'for $i in /RootElement where $i/SubElement/Key = $val return "true"' passing t.xmlColumn, :1 as "val")But this doens't help either.
I'm clueless about this, so any help would be appreciated
Edited by: user5893566 on Nov 29, 2008 6:24 AMOk, I tested it using the latest enterprise edition (11g) and there it works as expected.
However, on 10.2.0.1.0 and 10.2.0.3.0 it gives this error.
Is this a bug which has been fixed or should I do something special on 10g ?
I installed all of these as normal without any special settings, created the tables and ran the query... -
How do I use a dynamic variable from a prolog script?
I have my test broken in to three scripts, a login, an update, and a logout. There is a dynamic variable, SERVICE_VIRTUAL_CLIENT, from the login script that I need to use in the update script, but I can't figure out how to do it. Any help would be appreciated.
Edit: I forgot to mention that the login script is only run in the prolog portion of the UDP.
Scott
Message was edited by: scottmorganScott,
You would do this the same way you would in a stand-alone script. Create the variable pattern in the login in script and name the variable. Save the login script and open the other script and select the parameter where you need the value. Set the parameter value to {{variableNameFromLogin}} (Variables are transferred from one script to the next in a UDP).
I hope this makes sense -
Dynamic variable Time for Select
Hi,
I try to develop some scripts but always I have the same problem , when I try to put in a Select instruction the variable Time, it doesn´t work correctly (for example):
*SELECT(%example%,"ID","TIME","[ID]='%TIME_SET%' ")
It doesn´t read correctly the variable Time_Set.
Have you got any idea to try to do selects using dynamic variable?
Thanks for all.Hi,
Dynamic variables like %TIME_SET% do not interact very well with the compiled default logic (LGX files) when it is run after a data send. If you look at the Default.LGX file, you will notice that your *SELECT statement does not appear there because that *SELECT statement has already been compiled. That is why the logic works when it is run via the debugger (because the LGF file is getting executed at run time) and it does not work when it is run via a data send (because the LGX is being executed).
What you will need to do is:
1. Create a another logic file (for example: Calculation1.LGF) and copy the text from the Default.LGF to this new logic file.
2. Place the following text in the Default.LGF file:
*RUNLOGIC
*LOGIC=Calculation1.LGF
*ENDRUNLOGIC
3. Validate and save the Default.LGF file
Now try running the logic after a data send and see if that works.
Good luck,
John -
IMPORT statement with dynamic variable
Friends, Need Help!!!!!!!
Im trying IMPORT variable contents from a cluster table VARI. I can do a IMPORT without issues when I use exact name of the variable but I have issues with dynamic variable selection. Pls see code below.
loop at objects.
assign objects-name to <fs>.
IMPORT <fs> to tmp_var from database vari(va) id st_key.
endloop.
I do not get any value to tmp_var. Need help!
thanks
BhaskarTry this.
loop at objects.
IMPORT (objects-name) to tmp_var from database vari(va) id st_key.
endloop.
Does it work?
Regards,
RIch Heilman -
Hello,
I am trying to sort my query based on a dynamic variable p_sorton in the cursor as follows:
function getMarketView2(
p_event_id in ex_event.event_id%type,
p_fromrow in integer,
p_torow in integer,
p_appTZ in char,
p_calcTZ in char,
p_sorton in varchar2) return varchar2 as
type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
v_return varchar2(32767);
v_return_integer integer;
v_String varchar2(32767);
v_ex_ticket_trade_obj ex_ticket_trade_obj;
v_rowcount integer:=0;
v_rowtotal integer:=0;
v_done boolean:=false;
v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
cursor cur_ticket_trade_event_open (p_event_id in ex_event.event_id%type, v_sysdate in date) is
select "TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
"BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
"TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
"TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE","OPEN_BID_PRICE",
"CURRENT_BID_COUNT","CURRENT_HIGH_BID","CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY","TICKET_TRANSACTION_DATE",
"TICKET_TRADE_STATUS" from ex_ticket_trade
where ex_ticket_trade.TICKET_EVENT_ID = p_event_id
and (ex_ticket_trade.ticket_datetime > v_sysdate)
and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
order by p_sorton desc;
--ex_ticket_trade.ticket_datetime desc;
........then comes the rest of the code........
This code compiles fine but does not use the value passed in the param p_sorton in the order by clause.
the same code works fine when hardcoded to "ex_ticket_trade.ticket_datetime"
No idea where I may be going wrong?
Also can I do anything like ORDER BY v1 v2
where v1 specifies columns to sort on and v2 asc/desc, coz that's what I really need to do?
Pls help ...
Thanks,
KarunaHi,
Thanks for the reply ... I tried the same but due to my basic knowledge of pl-sql, I'm running into some other problem.
================================================
CREATE OR REPLACE FUNCTION testMarketView(p_event_id in ex_event.event_id%type,
p_fromrow in integer,p_torow in integer,
p_appTZ in char, p_calcTZ in char, p_sorton in varchar2
) return varchar2 as
type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
v_return varchar2(32767);
v_return_integer integer;
v_String varchar2(32767);
v_ex_ticket_trade_obj ex_ticket_trade_obj;
v_rowcount integer:=0;
v_rowtotal integer:=0;
v_done boolean:=false;
v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
TYPE t_ticket_trade_event IS REF CURSOR;
cur_ticket_trade_event t_ticket_trade_event;
v_dynQuery VARCHAR2(1000);
cursor cur_event_seat_section_row (p_ticket_trade in ex_event_seat_inv.ticket_trade_id%type) is
select distinct event_seat_section, event_seat_row
from ex_event_seat_inv
where ticket_trade_id = p_ticket_trade;
type t_event_seat_section_row is ref cursor return cur_event_seat_section_row%rowtype;
/*v_section varchar2(32767);
v_section_row varchar2(32767);
the 26 variables that belong to table ex_ticket_trade-----------
v_ticket_transaction_date date;
v_ticket_trade_status varchar2(10);*/
begin
v_dynQuery := 'select
"TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
"BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
"TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
"TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE",
"OPEN_BID_PRICE","CURRENT_BID_COUNT","CURRENT_HIGH_BID",
"CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY",
"TICKET_TRANSACTION_DATE","TICKET_TRADE_STATUS"
from ex_ticket_trade where
ex_ticket_trade.TICKET_EVENT_ID = ' || p_event_id || ' and (ex_ticket_trade.ticket_datetime > '|| v_sysdate||')
and (ex_ticket_trade.ticket_trade_status in ('||'''F'''||','||'''A'''||','||'''AB'''||'))
and (ex_ticket_trade.ticket_suite_code='||'''N'''||' OR ex_ticket_trade.ticket_suite_code='||'''Y'''||')
order by '|| p_sorton ||'desc ' ;
select count(*) into v_rowtotal
from ex_ticket_trade
where
ex_ticket_trade.TICKET_EVENT_ID = p_event_id
and (ex_ticket_trade.ticket_datetime > v_sysdate)
and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
order by ex_ticket_trade.ticket_datetime asc;
v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.initialize;
v_rowcount:=1;
OPEN cur_ticket_trade_event FOR v_dynQuery;
LOOP
FETCH cur_ticket_trade_event INTO t_ticket_trade;
/* -- THIS IS WHAT I HAVE TO DEAL WITH IF I CAN"T
--PUT THE RESULTS OF THE CURSOR in t_ticket_trade
v_ticket_trade_id , v_seller_access_id , v_create_datetime, v_modify_datetime , v_lastmodify_by ,
v_buyer_access_id, v_open_trade_date, v_close_trade_date, v_ticket_suite_code, v_ticket_datetime,
v_ticket_timezone, v_ticket_event_id , v_ticket_type, v_ticket_seat_type, v_ticket_opponent,
v_ticket_total_seat, v_ticket_price , v_ticket_price_ext , v_start_bid_date, v_open_bid_price ,
v_current_bid_count , v_current_high_bid , v_current_last_bid_datetime , v_current_bid_increment_by ,
v_ticket_transaction_date , v_ticket_trade_status ;
if (t_ticket_trade.TICKET_SEAT_TYPE is null) then
for t_event_seat_section_row in cur_event_seat_section_row(t_ticket_trade.ticket_trade_id) loop
if (t_event_seat_section_row.event_seat_section is not null) then
v_section := t_event_seat_section_row.event_seat_section;
BEGIN
select alt_txt into v_parking_desc from ex_alt_txt
where event_id = p_event_id
and alt_txt_type = 'PARKING_DESC'
and original_txt = v_section;
t_ticket_trade.TICKET_SEAT_TYPE := v_parking_desc;
EXCEPTION
WHEN no_data_found THEN
v_section_row := 'Sec. ' || v_section;
if (t_event_seat_section_row.event_seat_row is not null) then
v_section_row := v_section_row || ', Row ' || t_event_seat_section_row.event_seat_row;
end if;
v_section_row := substr(v_section_row, 1, 30);
t_ticket_trade.TICKET_SEAT_TYPE := v_section_row;
END;
exit;
end if;
end loop;
end if;
if ((v_rowcount >= p_fromrow) and (v_rowcount <= p_torow)) then
-- p_ex_ticket_trade => t_ticket_trade
-- THIS IS WHAT I CAN'T DO in the next line IF I get the results of the cursor in seperate variables
v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.maprowtoobj(p_ex_ticket_trade => t_ticket_trade);
v_string:=v_string||v_ex_ticket_trade_obj.todatastring;
end if;
if (v_rowcount>=p_torow) then
exit;
end if;
v_section := null;
v_section_row := null;
v_parking_desc := null;
v_rowcount:=v_rowcount+1;
end loop;
v_prefix:='1' || v_delimiter || v_rowtotal || v_terminator;
v_return:= v_prefix || v_ex_ticket_trade_obj.tometadata||v_string;
return v_return;
end;
===========================================
I keep running into one error:
PLS-00403: expression 'T_TICKET_TRADE' cannot be used as an INTO-target of a SELECT/FETCH statement
How can I get each row of the cursor either as an object or as 'T_TICKET_TRADE' ?
Thanks,
Karuna -
Dynamic Variable In a Type Definition
Can someone tell me how to define and use a dynamic variable, which resides in a Type Definition. I.E...
Type: beg of type1,
field 1 type c,
field 2 <---this dynamic
field 3 type c.
end of type1.
Can this be done in Netweaver 2004. And if so, can you show me how?
Thanks for your time.
Kind Regards,
JasonDon't think it is available now, but I do believe they are working on this for a future release.
Regards,
Rich Heilman -
Dynamic variable value based on a value from xml
I have a invoice template and it is for 4 different companies in my organization. Based on the organization I need to have a different value for a variable that adds blank lines to the end of the invoice. Is there anyway to assign a value to variable based on the value of a xml tag.
ThanksI should have explained better before. I have one invoice template and we want to keep it one template for all companies. Each invoice is run individually, each companies footer is different, I am calling multiple headers and footers based on each company. Since the headers and footers are different I need to be able to add different amounts of lines and the end of each invoice depending on that company. I have accounted for the page break in my logic based on the amount lines the page is long. I just need a dynamic variable that I can assign different values on the fly.
Thanks -
Dynamic variable and/or XML LazyLoader HELP
I am loading images via xml lazyloader into my air app
I need var b to be "img" + item.id dynamically
any ideas???
for each (var item : LoadingItem in lazy.items)
var b : Bitmap = lazy.getBitmap(item.id);
addChild(b);
If you dont know the lazyloader code then can you please explain how to create a dynamic variable for a bitmap???so i should set type here
var img:bitmap = {}
then create the variable like this in my for statement?
img[this[item.id]] = lazy.getBitmap(item.id);
lets say item was 1,2,3
Then
img[1]
img[2]
img[3]
would be able to hold a different bitmap
thanks in advanced -
Creating dynamic variable names
I know there has got to a way to do this but I am not finding anything on google. I want to create a dynamic variable name like name + i so when your in a loop the names come out name1, name2 and so on till however many you want. I have tried
int name + i = 3;
int name[i] = 3; // which obviously won't but I had to try
int name{i} = 3;and I am out of ideas. Thanks for all your help.I'd suggest using variables named j or x when posting code which uses them as array indexes.
[i] - is for italics formatting
[u] - is for underlined formatting
[code] is for class Example { ... } code formatting
etc. -
Okay, I just need to figure out how to make dynamic variable
names. In this case, I have a loop, and inside the loop I need to
create a new array for every iteration of the loop. Something like
<cfloop from="0" to="10" index="i">
<cfset LoopArray#i# = Some Value>
</cfloop>
But that doesn't work. How can you make dynamic variable
named? I think it's probably something to do with evaluate or DE,
but I don't know how to use them, and the livedocs make no sense to
me. Thanks!On Thu, 22 May 2008 17:14:42 +0000 (UTC), kenji776 wrote:
> Thank you both for your replied, I did manage to find a
solution (the same one
> posted by JR "Bob" Dobbs). Pretty much just looks
like...
>
>
> <cfloop from="1" to="3" index="i">
> <cfset LinkResults["#i#"][1] = "Player 1's Move
ID">
> <cfset LinkResults["#i#"][2] = "Player 2's Move
ID">
> <cfset LinkResults["#i#"][3] = "Damage to player
1">
> <cfset LinkResults["#i#"][4] = "Damage to player
2">
> </cfloop>
From your values, you don't want a two-dimensional array
(which although
you're actually building LinkResults as a struct, with the
sequential
numeric keys, it's basically an array), you want an array of
structs, eg:
LinkResults
.player1.moveId
LinkResults.player1.damage
What is "i" actually counting through? IE: from 1-3 things...
which are...
what?
Adam -
Dynamic Variable Names in OpenScript
Is there a way to use dynamic variable names? What I mean by this is that the variable name in the file could be:
Name1, Name2, Name3, etc.
I may want to loop through these by saying something like:
For i = 0; i < iLoop; i++
String sFieldName = "{{ViewList.Name" + Integer.toString(i) + "}}";
JOptionPane.showMessageDialog(null, "sFieldName: " + "{{ViewList.{{sFieldName}}}}");
I don't want it to use the literal string of {{ViewList.Name1}}, but rather, I want to use the value from the DataBank for Name1. Thanks.
-JohnNishanth,
Thanks for your suggestion. Unfortunately, this is not a simple variable replacement. I want the name of the variable to be dynamic in nature. Imagine that I have 5 variables in the files named:
Name
FoodPref1
FoodPref2
FoodPref3
FoodPref4
I would like to loop through these and construct the variable name dynamically so it would be something similar to:
for i=1 to 4; i++
sFoodPrefVar = "FoodPref" + i;
getVariables().set("FoodPref",sFoodPrefVar);
JOptionPane.showMessageDialog(null, "Your Food Pref is: " + {{FoodPref}} + "\n");
This is pseudo code, but it would theoretically loop through the 4 food preferences. Thanks.
-John
Maybe you are looking for
-
Can any one help me to code a browser
hi , I am Anil, I am doing an application in java. it needs a browser as IE or Morzilla . i tried to implement the browser using jdic. i add jdic.jar files as a external jar file and added it to my project. when i run the program in eclipse it works
-
Dataset query issues twice if the dataset is connected to matrix and used in multilookup function
hello everybody. could not find any information if this is an intended behavior: dataset query issues twice if the dataset is connected to matrix and used in multilookup function parameters in both queries are the same ssrs: 2008 r2, sharepoint 2010
-
I've bought a iphone 5c from USA but the headset is not working properly its still in warranty,can i go for replacement of headset??
-
Error: Read failure when running any of self diagnostisc tests from BIOS
After Screen replacement my HP625 Laptop seems to work good as ever, but if running any of diagnostic test from BIOS (Memory, Start Up, Run In or Hard Drive Test) it throws the same Error: Read failure?!? Should I be worried? is is something wrong wi
-
Hi all. I have two iTunes Libraries: one in my Time Capsule and one in an external HD. They are similar with slight differences. In the TC library I have 15.600 tracks, in the HD I have 14.900 tracks. I'd like to update the HD library with the same t