Assigning value to variable in ODI
Hi
TotalCount(datatype is numeric)--->Action is (Latest value)
And i want to assign value it by using following query
select count(*) from Investment_ato
i am writing this in a refresh tab
And i am using this variable in another variable(var_account)
but value of TotalCount variable is not coming in var_account
so plz suggest regards the same
thanks
You can set the refreshing mode in the variable var_account and in the refreshing tab put the query as: select #TotalCount from dual.
Hope it helps!
Similar Messages
-
Help : How to use list of values in Variable in ODI
Dear All,
I have a multiple values in table, and I would to use these values a a parameter in ODI to retrieve rows based on these values. As I know that we can use single value in variable in ODI.
Any one can Help me please?Can't you use a join between the tables ?
ODI mostly take advantage of native technologies.
i.e If my source technology is oracle then i will create a join between the table i.e. MAINTABLE.column = LOVTABLE.COLUMN and also put a filter on LOVTABLE to take required values.
OR you can write a subquery in the Filter i.e. MAINTABLE.COLUMN in ( Select LOVVALUES from LOVTABLE where LOVTABLE.ATTRIBUTE = 'BUSINESS_UNIT') -
How can more than one value be assigned to a variable in ODI
Hi,
I am inserting 2 values in DB Table.
I want to get both the values in a single variable in ODI.
Pls tell me how can it be done?
Thanks in advance.Hi Deca,
Can you pls tell me is the following code fine or not?
<?xml version = '1.0' encoding = 'UTF8'?>
<EmpodiCollection xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/tar" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<Empodi xmlns="">
<empid>1</empid>
<empname>ani</empname>
<bonus>#SOA_ODI_SALARY*0.1</bonus>
<annualsalary>#SOA_ODI_SALARY*12</annualsalary>
</Empodi>
</EmpodiCollection>
here #SOA_ODI_SALARY is a variable which is calculating salary from a table src_ws_soa_odi having the code as select Basic_sal from src_ws_soa_odi.
Actually the problem we are facing is that this transformation #SOA_ODI_SALARY*0.1 needs to be mapped in a bpel component as its input, but when i am checking the payload of the bpel component it is showing as follows :
<message>
<properties>
<property name="tracking.compositeInstanceId" value="750014"/>
<property name="tracking.ecid" value="449b4b64fa2729cc:-5b3fd395:140c49e9de6:-8000-00000000000505cc"/>
<property name="transport.http.remoteAddress" value="172.18.22.193"/>
</properties>
<parts>
<part name="request">
<EmpodiCollection>
<Empodi>
<empid>1</empid>
<empname>ani</empname>
<bonus>3400*0.1</bonus>
<annualsalary>3400*12</annualsalary>
</Empodi>
</EmpodiCollection>
</part>
</parts>
</message>
So from my observation I can see the calculation is not taking place in ODI, so pls let me know where i am doing wrong.
Your help is highly appreciated.
Thanks,
Anindya. -
Assigning value to variable of type time
Hi,
I want to assign value '8:00:00' to a time variable (w_time like sy-uzeit).
How do i do this? Do i need to do any casting?
w_time = '8:00:00' didnt work.
I am trying to use this in a customer exit.
Thanks,
Arun KKGotcha!
Thanks!! -
Assigning Value to Variable in Sapscript
Hi,
To initialized value of the variable when I tried to assign 0 to variable (like in the following statement) it comes up with error 'Command Expected'.
&RF140-ZALBT&= '0'.
Please let me know where and what I am doing wrong in assigning value to a variable?
Regards,
ShabbarHi,
Still its not working. The statement I am writing is
/: &NET& = &RF140-WRSHB& - &RF140-MSATZ&
but the system gives error on that.
NET is the local variable declared with Define statement and both the others are defined in print program.
Even I tried
/: &RF140-ZALBT& = &RF140-WRSHB& - &RF140-MSATZ&
but still the same error.
Any comments?
Regards,
Shabbar -
Read XML in BPEL and assign values to variables
Hello,
I need to read an xml message in BPEL and assign variables created in BPEL the values of elements in XML message. Whats the best possible way to do this.When you say"*read an xml message*", is the xml coming as input message or you need to read from file ?
If you want to read from file, you can make use of the below function.
Returns the string value of an element defined by lookupXPath in a XML file (docURL) given its parent XPath (parentXPath), the key XPath (keyXPath) and the value of the key (key). Usage: oraext:lookup-xml(docURL as string, parentXPath as string, keyXPath as string, lookupXPath as string, key as string)
Example: oraext:lookup-xml('file:/d:/country_data.xml', '/Countries/Country', 'Abbreviation', 'FullName', 'UK') returns the value of the element FullName child of /Countries/Country where Abbreviation = 'UK' in the file d:\country_data.xml
Thanks,
Vijay -
Define and assign values to variables in calc manager
Hi all,
I have created a smartlist in data form for user to select the start month and end month.In BR,based on the smartlist ID,i need to assign the months to a variable,which i will later use it in the same BR.
For Eg:In data form,from the smartlists,user has choosen "Jul" for start month and "Nov" for end month,hence the smartlist ID is 7 for start month and 11 for end month.Now in calc manager,i have created 2 variables as "DateFrom" and "DateTo" of type "member" for dimension "Period"
Note: "Jan" to "Dec" are period dim level 0 members
IF(start month==1)
DateFrom="Jan";
ELSEIF(startmonth==2)
DateFrom="Feb";
ELSEIF(start month==7)
DateFrom="Jul";
ELSE
DateFrom="Dec";
ENDIF;
Similarly for end month as below:
IF(end month==1)
DateTo="Jan";
ELSEIF(end month==11)
DateTo="Nov";
ELSE
DateTo="Dec";
ENDIF;
Above method of assigning a value to a variable is not working and no values assigned to the 2 variables "DateFrom" and "DateTo"
Kindly help me on any additional steps required to use variables in calc manager.
Thanks!Cant you use the values from RTP directly? What is the logic you are trying to build?
One of the ways to achieve this is to use Calc TP Index member, if you are not sure of this, create a workforce application and you will get the formula for calc TP index member in Essbase.
Edited: I just checked other question from you, will revert on that in some time.
Cheers..!!
Rahul S. -
Any way to assign value for variable of type Class List String ?
I'm puzzled why I can declare a variable:
Class<List<String>> clazz;but I cannot assign a value to it as
clazz = List<String>.class;The compiler also complains about
Class<List<?>> clazz0 = List<?>.class;yet it has the nerve to warn about raw types when I give up and use
Class<List> clazz0 = List.class;Even using a dummy instance does not work.
List<String> dummy = new ArrayList<String>();
Class<List<String>> clazz1 = dummy.getClass();I only care because I've declared a method like
public String useless( Class<List<String>> unSetable){
return unSetable.getName();
}And now there seems to be no way to call it.Hello chymes,
there is no way to get an instance of Class<List<String>> without at least one unchecked warning. Otherwise you could get away with the following:
List<Integer> ints = new ArrayList<Integer>();
Class<List<String>> clazz = List<String>.class;
List<String> strings = clazz.cast(ints);
strings.add("No Good");
int i = ints.get(0); // CCETherefore the only way to get it is via unchecked cast:
Class<List<String>> clazz = (Class<List<String>>) (Object) List.class;With kind regards
Ben -
Assigning value to variable within Range
The Problem:
Range of values permitted is 10 < x < 30. x starts at 20. Variable x increments by 5, on a button click, until it reaches 30, at which point it should decrement by 5, until it reaches 10, before moving up the range again... and so on.
I'm sure this is quite simple, but it's been bugging me for hours... the following simple increments by 5.
How would I include range constraint. please some help.
void jButton_mouseClicked(MouseEvent e) {
int r = aBall.radius();
aBall.rad = r + 5;
repaint();
}You're right, perhaps, nasch_.
When I was starting out, I learned a lot from looking at code and then figuring out how to adapt it. Perhaps I have denied the OP this opportunity.
To learn more from the code I posted, OP, don't just copy and paste it. As nasch_ was pointing out, you absolutely must learn how to translate requirements in English (or language of your choice) into code. If-statements ar crucial elements. Look at the code and figure out how it matches your requirements. Think about what you have to do logically - When the size would be less than 10, you need to grow instead of shrink... etc. Write out (or at least think out) every scenario that your code has to react to. Size would be in range, size would be too large, size would be too small, ball is growing, ball is shrinking, etc. Make every possible combination and figure out how you must react.
When your logic is hammered out like that, in natural language, start converting to logic. You see that your code has to remember whether your Ball is growing or shrinking. Your Ball should know it's minimum and maximum size (which my code ignores, making it less flexible). Turn your scenarios into If-statements. Your first code could have way too many If-elses, but get it to work, and then refine it by combining and nesting statements.
Don't ever just copy and paste code. You won't learn how to do anything yourself. Learn from code you see. Take this opportunity to not just solve the immediate problem, but to realize that this is an area of your skills that needs improvement and follow through on improving it.
-- end soapbox -
Assigning value to variable defined as LOCAL in standard program
Hello Gurus,
We have a Z function module which gets called via standrad SAP program. Now inside this Z FM we have to code such that it updates an internal table defined via LOCAL in program LQEEMF72 (Main program SAPLQEEM). Is this possible ?
I tried following :
DATA gt_qasptab TYPE qaspr OCCURS 0.
FIELD-SYMBOLS: <qasptab>.
ASSIGN ('(SAPLQEEM)QASPTAB[]') TO <qasptab>.
gt_qasptab[] = <qasptab>.
and at the end
ASSIGN gt_qasptab[] TO <qasptab>.
This does not work. How to update the table QASPTAB ?
Please provide your suggestions ....
Thanks in advance <REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Dec 28, 2007 8:26 AMHi tushar,
I'm very sorry I can't reallly help you if you don't describe your process at all.
The include you mentioned is not part of an SAP program but a FORMS include of a SAP function group.
In this function group QEEM SAP provides lots of userexits:
EXIT_SAPLQEEM_001 Customer Function for Calculating Formulas in Results Recording
EXIT_SAPLQEEM_002 Customer Function: Add. Fns for Importing Insp. Chars in Results Recording
EXIT_SAPLQEEM_003 Customer Function: Add. Functions After Valuating Insp. Characteristics
EXIT_SAPLQEEM_004 Customer Function: Add. Functions After Valuating Partial Samples
EXIT_SAPLQEEM_006 Customer Function: Add. Functions After Closing Insp. Characteristics
EXIT_SAPLQEEM_007 Customer Exit: Additional Functions After Closing Partial Samples
EXIT_SAPLQEEM_011 Customer Function: Add. Functions Before Valuating Insp. Characteristics
EXIT_SAPLQEEM_012 Customer Function: Additional Functions Before Valuating Partial Samples
EXIT_SAPLQEEM_015 Customer Function: Add. Functions After Entering Individual Results
EXIT_SAPLQEEM_020 Customer Function: Additional Functions After Entering Inspector
EXIT_SAPLQEEM_021 Customer Function: Add. Functions for User Key +US1 (Char. Single Screen)
EXIT_SAPLQEEM_022 Customer Function: Add. Functions for User Key +US2 (Char. Single Screen)
EXIT_SAPLQEEM_023 Customer Function: Add. Functions for User Key +US3 (Char. Single Screen)
EXIT_SAPLQEEM_024 Customer Function: Add. Functions for User Key +US4 (Char. Single Screen)
EXIT_SAPLQEEM_025 Customer Function: Add. Functions for User Key +US1 as Pushbutton
EXIT_SAPLQEEM_026 Customer Function: Add. Functions for User Key +US2 as Pushbutton
EXIT_SAPLQEEM_027 Customer Function: Add. Functions for User Key +US3 as Pushbutton
EXIT_SAPLQEEM_028 Customer Function: Add. Functions for User Key +US4 as Pushbutton
EXIT_SAPLQEEM_029 Customer-Function for Subscreen Characteristic Overview
EXIT_SAPLQEEM_030 Customer Function for Subscreen Characteristic Single Screen
EXIT_SAPLQEEM_031 Customer Function Creating Table with External Numbers
EXIT_SAPLQEEM_032 Customer Function Characteristic Text in Logon Language
Try one of them.
Regards,
Clemens -
Is there a way to assign value to variable
of data type ITEM? In other words, I need to
assign value to an item, where I just know the
it_id.
In the following procedure p_item is unknown until runtime;
and if it_id is not null then assign some value to the item.
procedure update_item(p_item)
is
it_id item := find_item('block1.'||p_item);
if not id_null(it_id) then
it_id := 'some_value'; --doesn't work.
end if;
end;Do you mean you know the name of the item and you want to then assign a value?
If so then use the COPY command which allows you to assign a value to a named variable
e.g.
COPY (12345, 'blocka.number_item1');
To read the value in the same way use the NAME_IN function.
There is plenty in the forms helps about this.
Mark -
# value in Variable Selection screen
Hello,
Can you please help with the below:
How do we remove # (Not Assigned) value from Variable selection screen. When I select PLANT in one of the report, I see # value. But there are no empty values in the cube. So, I am not sure as why I am getting this # value in Selection Screen. The seeting in Web designer for READ MODE is "Posted Values" and not "Master data or Dimension Table".
Thanks.have you checked what Bex properties are set in the Info Object for "Query Def. Filter Value S"
Select Values from Info provider.
that might solve your problem. But ensure you're not disturbing anything else by changing this property.
Regards, Siva
Message was edited by:
Siva Bonam -
Error encountered while assigning a value to a variable in ODI.
we are getting the below error while trying to assign the o/p of the below query to a variable in ODI.THis error is encountered when the Table1 is empty....
select b.res from (select (select CEIL((select count(1) from Table1)/2) - #SMARTS.loop_variable from dual) result from dual) a, (select CEIL((select count(1) from cst_dsa.m_pb_cable_data)/2) res from dual) b where a.result >= 0
java.lang.Exception: Error: No value to affect to this variable for DefDate:2012-05-22 13:57:07.0
DefN:null
DefV:null
IndStore:H
ITxtDefT:null
ITxtVar:null
SessNo:800100
VarDatatype:N
VarName:SMARTS.total_loop_count_cable
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.execStdOrders(SnpSessTaskSqlV.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTaskTrt(SnpSessTaskSqlV.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlV.treatTask(SnpSessTaskSqlV.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
can somebody pls let me know ,how to handle this exception..This error means that there is no value to assign to your variable, because specified query doesn't return result row. You should rewrite your query to guarantee that it would return row in any case.
For example, select nvl(min(b.res), -1) from (select (select CEIL((select count(1) from Table1)/2) - #SMARTS.loop_variable from dual) result from dual) a, (select CEIL((select count(1) from cst_dsa.m_pb_cable_data)/2) res from dual) b where a.result >= 0 group by a,b
Edited by: apiminov on 15.06.2012 8:18
Edited by: apiminov on 15.06.2012 8:19 -
Assign value to ODI variable from Jython
Hello Experts,
I have a procedure where I'm using Jython code. I want to assign a value to an ODI project variable from a Jython function:
Example:
#COUNTER = len(v_jythonList) ---> being #COUNTER the ODI project variable and len() the jython function
Now, i noticed that using ODI variables adds # sign which is use for comments in Jython code. Is there a way to assign values to ODI variables from Jython script?
Please help!.
Thanks.
Pablo.Hi,
Does this post help you :- How to assign value for a ODI variable from Jython Script
Doc id 424579.1 on metalink should help.
Cheers
John
http://john-goodwin.blogspot.com/ -
How to assign a value to ODI Variable using ODI Procedure
Hi ,
Is it possible to assign a value to a ODI Variable using ODI Procedure ?
If it is possible how we can do that.
BEGIN
IF #Counter=1
Then
#Next_Increment:=#Counter+1;
End if;
END;
In my example I have 2 ODI Variables #counter and #Next_increment.
I am trying to assign VALUE TO A ODI VARIABLE #next_increment from another ODI Variable #counter.
thanks
prasannaPrasanna,
I have a similar requirement where I need to assign values to ODI variables within a procedure. How do we make use of an ODI package to accomplish this ?
Actually, I have a sequence of ODI steps, and there is a call to a procedure 'LOG ERROR' from every step which gets called in case error occurs in any step. I just need to identify from which step the error came.
Please help.
Maybe you are looking for
-
How can I keep my text format after pasting a text with a different format?
No matter when and where I start to write some text (whether it is a SImpleText, E-Mails, or anyother application's doc), if I have to cut and paste a text from a different source that is formatted differently than my original text (ie. the one I am
-
HP Laserjet P1102w cannot connect to my network..
I posted a week ago on this and am asking again. I have recently installed a new dlink dir835 router. Prior to the new router I used a dlink 615 and my P1102w printer connected to the network just fine. The printer will not connect to my new router w
-
Can you use two Time Capsules and back up both with Time Machine.
My little iMac hard drive (250GB) is quickly filling up with my iTunes library (180GB). I have a 500GB Time Capsule which I use to back up my system via Time Capsule. I would like to move my iTunes library to an external hard drive. If I add the 1TB
-
Using Windows XP Yahoo mail or G-mail. Trying to download a file from an e-mail I sent to myself from a smart phone, which had worked just fine a week ago, suddenly results in a crash of Firefox. I report said crash. Try to download pdf doc from bank
-
TS3623 Audio issues with apple tv
There's no audio on the movie playback for purchased movies. Trailers and home videos work fine. Any suggestions?