cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning values to global variable in mapping

Former Member
0 Kudos

Hi All,

I have declare a global variable in function library in PI 7.1 and I assigned values to this in request mapping. Now i want to access assigned values of global variable in response mapping. Is it possibel , if possible how can I do that.

Thanks and regards

Uma

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member206760
Active Contributor
0 Kudos

Dear Uma,

1. As Rajeev gave you a work around of appending that value in the field of the target message which you can get again in the response mapping...that is a good solution

2. Also what i would suggest that if there are chances that after the interface runs once...you might need that value when the interface runs second time ...then you can update taht value in a Z table on the ABAP stack using RFC lookup .....again in the response mapping you can access that ztable...

that Z table u can access N number of times your interface runs

Former Member
0 Kudos

Hi Tarang ,

Thanks for the reponse.

Due to other issues , I am not able to reply u for long time.

Where i need to create table (in PI or R/3), please explain me in detail.

Thanks and regards

Uma

Former Member
0 Kudos

Hi Uma,

If you want to take his approach you can even create the table in PI or R3. Now you access that table data using JDBC lookup. If your company does say we will not have access to table level directly, then you can create an rfc and get the values from that table using this rfc and can do a rfc lookup.

Keep in mind if it is transactional data, then the table data keep increasing. So you may need to clean very often.

Regards,

---Satish

Former Member
0 Kudos

Hi,

static variables do only exist in the context of your virtual machine. If you are having a PI with more than one Java instance you might run into problems since it might not be ensured that all your mappings will be process in the same virtual machine.

Regards,

Heiko

JoelTrinidade
Active Contributor
0 Kudos

Hi Uma,

There is no direct solution this problem you can have only workarounds one of them being what rajeev is saying . The reason i am stating this is because mapping programs are stateless which makes what you are saying impossible to achieve. hope now you are enlightened . With the cause and also with the effect.

Regards

joel

Former Member
0 Kudos

Hi,

a workaround - in req msg have a field to store the global varible data........send it to target applicaiton..........then get the same field from target applciaton in response msg in response msg mapping.

Regards,

Rajeev Gupta