cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Passing data between two irpts

Former Member
0 Likes
401

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);
	}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

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

Former Member
0 Likes

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

Former Member
0 Likes

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);

agentry_src
Active Contributor
0 Likes

[Session Properties|]

This might help.

Mike

Former Member
0 Likes

[Try this Thread.|]

thanks.

Answers (1)

Answers (1)

Former Member
0 Likes

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