on 07-08-2011 6:06 AM
Hello Everyone !
I had created one Transaction to add 2 numbers and taken the output to tracer which is giving me the correct result. It is done using "Calculation" Action and declaring two static variables.
On the other hand, I had created one Test.irpt file in which I am using 2 text box to get the number and after clicking on the command button the result will be shown in the third text box. This is done through javascript. The function to add two numbers is written using function in java script.
Now what I want to do is to Pass the value using the .irpt file to my Transaction. The Transaction will do the addition and will send the result back to the browser/irpt file.
Can anyone please guide me how it can be done ???
Regards,
Vaibhav Singhania
Hi,
To perform this follow below steps
Create two input and one output transaction property in your transaction.
Perform your addition with two input type transaction property than assign result to your transaction output property.
Create one execute query and load your transaction in Param 1 & 2 select your transaction input properties and in output select your out put transaction property.
than you can call this execute query in your irpt Command button under javascript.
than set Param 1 & 2 for your query and retrive your output.
for more refrence pleasse follow SAP MII help.
Applet code:
<APPLET NAME="Command" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="0" HEIGHT="0" MAYSCRIPT>
</APPLET>
Javascript code:
document.Command.setQueryTemplate(your execute query Path);
document.Command.getQueryObject().setParam(1, value1 from txtbox);
document.Command.getQueryObject().setParam(2, value2 from txtbox);
document.Command.executeCommand();
txtbox3.value=document.Command.getValue(1, 1)
hope it helps!!
Regards,
Manoj Bilthare
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
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.