on ‎2008 Oct 29 7:58 PM
The two sample functions below are in the same *.js file but two different irpts refer to each of them. The end result is in XYZ where I am expecting a pop up with a Line value. What can I do to make this work. I thought I did this in the past, but for some reason it is not working for me now.
va*r Line = ''
//IRPT ABC
fun*ction ABC()
{
v*ar df = document.frmMain;
Line = document.Grid.getGridObject().getSelectedCellValue(4);
win*dow.op*en("ABC.irpt?Line=" + Line);
}
//IRPT XYZ
fu*nction XYZl()
{
al*ert(Line);
}
Request clarification before answering.
Hi Chip,
Remember, on .irpt pages you can use the syntax within the HTML and applet param tags to retrieve the property values from the session or to retrieve those passed as part of the URL string. So, for example, if you are using the value of "Line" as a parameter to a query, it is possible to add an additional parameter to the applet: <PARAM NAME="Param.1" VALUE="">
Kind Regards,
Diana Hoppe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is what I thought. I have a few param for the applet, but for the life of me I can not remember how I pass to a variable for this page. Shouldn't it be as easy as an UpdateEvent to have a variable declared and I pass the to it?
//IRPT XYZ
fu*nction XYZl()
{
var vLine = {Line};
al*ert();
}
Edited by: Chip Pyles on Oct 30, 2008 1:16 PM
Chip, variable/token names in curly brackets are not replaced when they are inside a script section of your page. One workaround is to drop a hidden iCommand applet on the page, and to assign the token to one of the iCommand PARAM.XXX properties as in:
<APPLET ...>
<PARAM NAME="Param.1" VALUE="">
</APPLET>
You can then reference in scripting with something like:
myParam = document.YourCommandApplet.getQueryObject().getParam(XXX);
Hi Chip,
if both irpt-pages contain applets, you can easily pass values by using the applet functions
- setPropertyValue(String propertyName, String newValue)
- getPropertyValue(String propertyName)
See also MII help:
[http://help.sap.com/saphelp_xmii120/helpdata/en/44423faf81ce2152e10000000a114a6b/content.htm]
The value is persistant as long as the browser is open.
Michael
Edited by: Michael Otto on Oct 29, 2008 9:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.