cancel
Showing results for 
Search instead for 
Did you mean: 

Access Session variable inside Transaction

Former Member
0 Kudos

Hi All,

Is it possible to access session variables inside Transaction.

Create session variable.

Update session variable value

acccess Session variable.

(user session)

Regards,

Sachin

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for reply Michael.

I can set session variables inside html page using JavaScript with the getPropertyValue and SetPropertyValue.

but I want to update session variable value inside one transaction and access that value inside other transaction.

it is possible?

Former Member
0 Kudos

Inside a BLT you have only read access to a session variable.

How about this idea:

- call the BLT with a XacuteQuery, using the autobind mechanism

- update the value

- output the value to the calling HTML

- change the session variable with JavaScript using the setPropertyValue

- in the next HTML, call your second BLT via XacuteQuery

- access the session property using autobind

Michael

Former Member
0 Kudos

I requirement is to update session varaible inside one transaction and use that in other transaction / html page.

Is it possible in MII 11.5

Former Member
0 Kudos

Hi,

you can use JavaScript with the getPropertyValue and SetPropertyValue.

Have a look at [Web Scripting 11.5|http://help.sap.com/saphelp_xmii115/helpdata/en/index.htm].

Hope this helps.

Michael

Former Member
0 Kudos

Hi Sachin,

Of course, you can pass session variables from one transaction to other.

From HTML Page -> Xacute query -> TRX 1 -> TRX 2 -> Xacute query -> HTML page

Is this what, you wanted?

Best regards,

Kedar

Former Member
0 Kudos

Yes Kedar.

let me know the way to implement that.

Do i need admin access on xMII server for that?

Former Member
0 Kudos

Hi Sachin,

Here is the snapshot:

1. Take session variable in a local JS variable in HTML page.

2. Create a transaction with a input type variable in Transaction Properties.

3. Create a Xacute query and link the above transaction.

4. Creata a iCommand applet on HTML page and link the query template:

<PARAM NAME="QueryTemplate" VALUE=".../QueryName">

Call the function in the below way in HTML:

Applet.getQueryObject().setParam(1,vaiable)

So, the session variable will go to TRX (BLT) and perform the operations as per your need..

You can pass it to other TRX by the same way.

To fetch the value: Create output type variable in TRX 2. Create Xacute query.

Get the value with : Applet.getValue(1,1)

Hope it is useful.

Best Regards,

Kedar

Former Member
0 Kudos

You don't need any admin access.

Best Regards,

Kedar

Former Member
0 Kudos

Hi,

you cannot change session variables in a BLT, but you can configure access to it.

Switch on the autobind in the [XacuteConnector|http://help.sap.com/saphelp_mii121/helpdata/en/43/e80b59ad40719ae10000000a1553f6/frameset.htm] in the Data Servers. Then create transaction properties with the same name as the session variable, e.g. IllumLoginName. If you call you transaction using a Xacute query inside a HTML / IRPT page, MII will then automatically transfer the session variable value to the called transaction.

Michael

Edited by: Michael Otto on Oct 1, 2010 11:36 AM