HOW DO I REASSIGN A PACKAGE VARIABLE VALUE FROM WITHIN JAVA BEANSHELL PROC
Hi all
I am trying to something that I would consider quite normal in programming applications.
create a variable - systemId
create a procedure that runs some code (Java BeanShell), and then sets the varable to a value depending on that code
create a second procdure that runs some code(Java BeanShell), but uses the value of the variable set from the previous stage
In the package editor I have created a declare variable step, two procedures, and a flow: declare variable -> procedure 1 -> procedure 2
If I declare the variable with a vue of 10 initially then try #systemId = 400, I get an error along the lines of '10 = 400'
I am probably doing something basically wrong
regards
Terry
My friend it depends on you. What ever you mentioned that can be achieved in package level but in procedure level.
For example:
Odi procedure: Java beanshell techonlogy
<@
String empname="ALEX";
@>
odivariable1: refresh mode in package
select sal from emp where empname='<@=empname@>'
Package diagram:
ODIprocedure------ok--->ODIvariable inrefreshmode
if you will execute this then the odivariable will have value 2000( alex salary)
Till now it was easy to achieve. But tell me how to assign the alex salary inside the 1st procedure without taking the help of a package. You just have to execute only the procedure.Hmmm nail on your head ? you might be thinking of something like this #odivariable=<@=empname@> which is not correct.
In this scenario you have update the snp_var_data table. So that the underlying value can be updated. Another approach could be to generate a scenario of the odi variable given above and invoke the scenario inside the procedure(this way you can refrsh it without using a package)
Ok my friend. Seems to be a long explanation.
Let me know if it is helpful or not.
Bhabani
http://dwteam.in
Similar Messages
-
How can I get dataTable to display values from the java layer?
When I use the dataTAble in my JSP page it will only display values from my java layer if the facets tag has it's name set to "header". Why is this happening?
If I set it to "header" and I look at the page source it actually has created the correct number of rows but it doesn't put the values between the <td> tags? It see's the length of my list but it doesn't pick the values out of the list.
<h:dataTable var="data" value="#{NameBean.test}" border="1">
<h:column>
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<!-- <h:outputFormat styleClass="outputFormat" id="format1" value="#{NameBean.test}"></h:outputFormat>-->
<h:outputText styleClass="outputText" value="#{NameBean.test}" style="" rendered="true" escape="false"/>
</f:facet>
</h:column>
</h:dataTable>
public List gettest()
List li = new LinkedList();
Object Developers[] = {"M@n00j", "sdsadas"};
for( int i = 0; i < Developers.length; i++ )
li.add(Developers);
return li;
Thanks in advance to anyone that can help.
-ls6vI've been able to get it working with some of those changes along with changes in the JSP. I think it's a setting or two in the JSP that'll allow the program to run correctly.
I have a list and it's returned like what you suggested. A day or two ago I tried to move the outputtext outside of the facet tag but nothing would print, I know believe that's related to the following setting in the JSP:
rows="0" in the <h:dataTAble tag
Unfortunately the dataTAble isn't displaying the values correctly. It prints all of the values (Strings) in the list on each row and it make a new row for the number of items in the list.......... ???
Here's what it's printing to the screen (the table):
===================
== [asdasd], [sddfdfd] ==
===================
===================
== [asdasd], [sddfdfd]==
===================
what it should print:
============
== [asdasd] ==
============
============
== [sddfdfd] ==
============
My code:
public List gettest()
List li = new ArrayList();
li.add("asdasd");
li.add("affffd");
return li;
}JSP
<h:dataTable border="1" columnClasses="list-column-left"
headerClass="list-header"
rowClasses="list-row-odd"
id="table"
rows="0"
value="#{NameBean.test}"
var="data">
<h:column>
<f:facet name="header">
<h:outputText value="test"/>
</f:facet>
<h:outputText value="#{NameBean.test}" style="" rendered="true" escape="false"/>
</h:column>
</h:dataTable> -
In OBIEE 11g, how can you set a presentation variable value from javascript ?
I want to set up presentation variable from a javascript variable. Does anyone knows the workaround for this ?
SriniVEERAVALLI,
Thanks for your suggestions. I want to make a custom prompt that is only my requirement. From JS I have made a custom slider prompt now I want to use this slider prompt to pass selected value in presentation variable. Since, we have slider prompt only for numbers, I have to use it for other values.
I just want to make my post looks simple and focus on the specific problem.
Anyways, thanks a lot for taking time to reply. Appreciate your help. -
How to get the client's IP address from within Java Studio Creator JSP/Java
Hi there.
I just started using the Java Studio Creator 2 and now I need to get hold of the client IP address - this should be part of the request, but I cannot fint the right way to get hold of that information. I want to be able to access this information from within the Java-code in a JSP/JSPF-page.
Is there a new way of doing:
request.getRemoteAddr();
This is the way I remember it from the JSP/Servlet-days...
Sincerely,
- Oystein Saebo -javax.servlet.http.HttpServletRequest req = (javax.servlet.http.HttpServletRequest) getExternalContext().getRequest();
req.getRemoteAddr(); -
Package Variable Values in For Each Contaner
I have a For Each File Container that loops through Excel files, executing a child package for each file found. I am using the RowCount transform to log the number of rows at various points in a DataFlow. When one file is processed the numbers are correct
but when multiple files (e.g. 5) are processed some counts are zero when they shouldn't be. I have tried a 1 second sleep in the loop but that didn't fix the problem.
R CampbellPlease share more technical details
numbers of what where, what Data Flaw how a package reports on the counts?
Arthur
MyBlog
Twitter
Actually, the title IS misleading.
I have a parent package with a For Each File container
and within that a child package is called, passing the file path and name. The child package has a
DataFlow with quite a few branches in the flow. On some of those branches I have
RowCount "transforms" each linked to its own
package variable.
At the CotrolFlow level a script is executed immediately after the DataFlow which writes the package variable values to the dts log.
If I place one file at a time into the folder that the For Each Container is looking at and wait for it to be processed, the numbers are correct. If I place a number of files (say 5) in the folder at one time, some of the numbers logged are correct
and some are zero.
I did try a 1 second sleep at the start of the logging script but, when I think about it, the package variables probably being read before the script starts to execute. If this is a timing issue (which I don't think that it should be) it might need
to be a separate script between the DataFlow and the existing script, with a sleep in it.
Because each loop of the parent package executes a new instance of the child package I am puzzled as to how there can be a timing issue. No matter how tight the loop might be, a new instance of the child package is executed each time.
R Campbell -
How Can i retain the Shared Variable Values after PC rebooting
Hi all,
I am facing a paculiar problem with Shared Variables. I have an application in which shared variables are used for data communication.
One of the application requirement is to retain the variable values eventhough PC is rebooted or started after crashing.
As per the my understanding, the variable values will retain eventhough the PC is rebooted. But here i can observe a paculiar problem like some library variables are retaing the values while some others not. I enabled logging for all the variables.
I tried many ways. like logging enabled, logging disabled, changing variable names, changing process names etc... But i am not getting a consistent behaviour.
I hope some you can help me in solving this issue.. "How Can i retain the Shared Variable Values after PC rebooting"
Thanks and Regards,
MirHi Blackperl,
Thanks for the post and I hope your well.
What do you mean by not getting consistent behaviour.. this will all depend on excatly when the crash happens i.e. before the write or after.
Surely a better method would be to log the data to a file during the reboot...
I beleived the value read back
will be the default value for the shared variable's data type.
The LabVIEW DSC 8.0 module adds more functionality to the shared variable, including initial values and alarms.
If you enable an initial value on a shared variable, when the variable
engine comes back on-line it will default to this value. Setting a bad
status alarm for the shared variable is also a good way of handling
this type of event. Additionally, if you are using a LabVIEW Real-Time
target such as Compact RIO or Compact FieldPoint, it is appropriate to
consider hosting the shared variable engine on the real-time target.
These devices have watch-dog capabilities and are typically the
hardware controlling the critical pieces of an application. Most
Windows or PC-based targets do not have these fail-safes.
I guess, if you could explain to me again that would be great. From my point of view, if I have a cRIO and a Windows PC. If the windows PC crashes, the cRIO will still update its shared variables. Then once the PC has started up its own shared variable engine, and the bindings are loaded, it will once again continue to update its copies of the variables.
Please let me know what you think,
Kind Regards,
James.
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! -
How to derive a variable value from another variable of a different IO?
Hi Gurus,
I am aware that using BEx variables and Customer Exit you are able to derive a variable value from another variable of the same infoobject (for example, Fiscal Year/Period (0FISCPER) and Calendar Day (0CALDAY)).
However, is is possible, using the same approach to derive a variable value from another variable that is in a different InfoObject? (for example, Input Fiscal Year/Period (0FISCPER) but derive Output of Required Start Date (0REQSTDAT))?
There are 2 BEx variables involved,
1) A user entry variable that is restricted in 0FISCPER
2) A customer exit variable that is restricted in ZREQSTDAT
In CMOD under EXIT_SAPLRRS0_001, Include ZXRSRU01, the code (I assume, correct me if I'm wrong) should perform 3 functions in I_STEP = 2,
1) After the pop up, capture user entry of Fiscal Year/Period
2) Identify or convert Fiscal Year/Period to Calendar Day range (unsure on how to code this portion)
3) Use the Calendar Day to lookup on matching Required Start Date and display all Required Start Date that matches. (unsure on how to code on this portion)
Hope to hear your thoughts soon.
Regards,
EricHi Shanthi,
I've made the necessary adjustments. The only difference in my code is,
Instead of,
If I_VNAM = 'ZREQSTDAT'
I use,
CASE I_VNAM.
Instead of,
PARAMETERS: ZFISCPER TYPE /BI0/OIFISCPER.
ZYEAR = ZFISCPER(4).
ZMM = ZFISCPER+4(3).
I use ,
This is the Customer Exit Variable in ZREQSTDAT
WHEN 'ZRSD_CX'.
The loop I use for the User Entry Variable in 0FISCPER-ZFYP_IN
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZFYP_IN'.
IF SY-SUBRC = 0.
CLEAR L_S_RANGE.
ZYEAR = LOC_VAR_RANGE(4).
ZMM = LOC_VAR_RANGE+4(3).
The codes were checked with no errors.
However, when I input the Fiscal Year/Periods and hit 'Execute'. The report went blank, not sure what is the cause. I've tried it several times. No error message appeared.
Regards,
Eric -
How to transfer variable value from one query to another query?
I create two queries which contain the same variable "Year" and "Month".
In the wad,Query1 is used to be a table and Query2 is used to show the chart in the condition with the same variable value of Query1
So I want to transfer the variable value from query1 to query2.
Can anyone help me ?Let me explain the issue in detail.
In Query Designer, both the year and month variables are defined by user exit function to read current year and month and can be modified during the query runtime.
In WAD, Query1 is used to be a table with a table interface to hyperlink a chart which is defined by Query2 with the same variable value of Query1.
During the runtime of template, if I change the variable value of Query1 , I want the variable of Query2 to be changed automatically with the same new value.
So in the table interface of Query1 , I write the ABAP code in "SE24" and related source code to the variable is following:
concatenate
'function fire_urlJGSP_Col(filter) {'
Cl_rsr_www_renderer=>c_lf
'chart_url="' url '" + "&CMD=LDOC'
'&TEMPLATE_ID=GCCHART_9' "WEB ID of the work book
'&PAGEID=Graphics' "Name of the view
'&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VAR_NAME=Z2MYEAR&VAR_VALUE_EXT=" + filter'
Cl_rsr_www_renderer=>c_lf
'openWindow(chart_url,"chart_window","dependent=yes","600",'
'"450","true")'
Cl_rsr_www_renderer=>c_lf
into l_coding.
In this way , I can only transfer the year variable value from Query1 to Query2 and not two variables .
So , how shall I do to transer the two variable value in the same? -
Passing variable values from WAD to BEx
Hi Experts,
I am working with a query which is included in a web template. At the top of this template, I have several variables included in drop down boxes for the user to navigate through the data.
With clicking at "open in Excel" a BEx-Query is started.
My question: How can I pass the variable values from those drop down boxes to my Query in BEx?
The current HTML code for starting the Excel BEx-Query looks like this:
http://sapserver:port/x/x/x/rsr_bex_launch/bexanalyzerportalwrapper.htm?QUERY=Queryname
Thanks in advance
MarcoIf you export your report after selecting required drop down values, your report will be saved to Excel as it was filtered. You do not need any HTML code for this.
My question: How can I pass the variable values from those drop down boxes to my Query in BEx?
Why do you want to re-execute your query when you have already ouptut in the first screen shot? -
How can we read the screen field values from the report selection screen wi
Hi expart,
How can we read the screen field values from the report selection screen with out having an ENTER button pressed .
Regards
Razzuse this code...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
**Read the Values of the SCREEN FIELDs
CALL FUNCTION 'DYNP_VALUES_READ' -
How to pass column name as a values from one page to another
hi
i have created a report(pivot) from a table
SQL> SELECT * FROM T;
C1 C2 C3 D SEQ
A AA 2 1
A AB 3 2
A AC 2 3
B AB 5 4
B AC 6 5
SQL> SELECT C1
2 ,NVL(MAX(CASE WHEN C2='AA' THEN C3 END),'') AA
3 ,NVL(MAX(CASE WHEN C2='AB' THEN C3 END),'') AB
4 ,NVL(MAX(CASE WHEN C2='AC' THEN C3 END),'') AC
5 ,SUM(C3) FROM T GROUP BY C1;
C1 AA AB AC SUM(C3)
A 2 3 2 7
B 5 6 11
SQL>
my requirement in Apex is like this(reverse)
eg-
when i click on cell values '2' then,it should return
C1 C2 C3 D SEQ
A AA 2 1
{quote}how to pass column name as a values from one page to another
for example i have to pass 'c2' as a value to next page{quote}for report pivot you can reffer below link
Report
Amuthanks for your reply
i 'm doing what exactly you mention here .
my problem here is
i have 15 columns
i am executing a query based on the values of the column(column name) in the target page
1)here i am passing(all) the column values to the next page-but i want to pass only one column values(column name)
when i click on any cell of that column
OR
2)i can pass all column name to target page -there(in the target page) i can filter out
i think option 1 would good if you filter out the unwanted columns
Regards
Amul -
How to stop non statistical condition type value from updating total amount
Gurus,
Can any body explain me how to do following setting,
How to Stop non statistical condition type value from updating Total Amount
Regards,
SaiDear Sai,
You need to make that condition type as Statistical one
Go to SPRO - Sales and Distr. - Basic Functions - Pricing - Define and Assign Pricing Proc - Maintain Pricing Proc - Control Date
Select the proc. - select the condition type and activate the check box Statistical
This will show the amount of the condition but will not consider for the net value calculation
Hope this will help you
regards,
Sagar -
How to get POF object's field value from query result
hi,all:
I want to get field value from the query result, my code is below
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Contact c=(Contact)iter.next();
System.out.println ("firstame####=" + c.getFirstName());
* but I get error*
Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
at com.oracle.handson.QueryExample.query(QueryExample.java:86)
at com.oracle.handson.QueryExample.main(QueryExample.java:43)
who can tell me how to get POF object's field value from query resultHi,
If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
for (Iterator iter = setResults.iterator(); iter.hasNext(); )
Map.Entry entry = iter.next();
Contact c=(Contact)entry.getValue();
System.out.println ("firstame####=" + c.getFirstName());
}JK -
How to retrieve start and end date values from sharepoint 2013
Hi,
How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
Thanks
Gowri BalaguruHi Srini
Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
Thanks
Tripple k -
Passing global variable values from databse to forms
I am using forms 6i and database is oracle 9i.
I am trying to run a form stand alone ( by pressing CTRL-R) without putting it in the application.
since when this form is placed in the application menu it works fine as it has been passed global variables values from the database .
now i am trying to run the form without menu and thus i want to pass the values of global variables .please let me know where should i pass these values in form .is it be WHEN-NEW-FORM-Instance trigger or in Pre-form trigger.
i know what are the global variable values passing into the form from database.
i can hard code any values to check if the form runs well or not.If you intend to do this sort of testing regularly you might want to consider creating a seperate form with a control block which allows entry of the name of the form you want to run, the names of the globals and their values, and do a CALL_FORM.
Maybe you are looking for
-
Hi, I'm attempting to learn about Identity Manager, but I can't get the application installed. The error I'm seeing when running RCU with the Identity Manager repository selected is: RCU-6130/RCU-6136: Error while trying to execute SQLPlus action. Fr
-
All my PDF forms are automatically transformed in word forms,how can I change that and only decide which PDF to be transformed in word
-
Hello Experts, I have written a report, in which a lot of internal tables are read out, the values are analyzed and some of them are displayed to the user using command "write". Is it possible to print these values additionally to spool memory? How c
-
Closed captions with Captivate 5
Although, I went through the help part and some of the earlier discussion it didnt solve my problem. I would simply like to include sub-titles (close-captions) on my slide. these are the instructions I followed: Select the check boxes in the closed c
-
Pavilion dv6- turns off when power cord removed
There's a certain way I can unplug it where it doesn't shut off- but 99% of the time when the adapter is pulled out it shuts off. Has a new battery that shows 100% charged, and lasts a good hour if I can get it to stay on when unplugged. ONce it shut