cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic calculation through Transcaction and Web Browser

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)