cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the variables used in the message mapping

Former Member
0 Kudos

Hi ,

In the message mapping we can declare variables in the JAVA section , these variables could be used across the mapping .

I have tried using it but I am unable to retrieve the values assigned to the variables in one UDF into the another UDF .

Please guide me how to use the variables declared in the JAVA section in the message mapping .

Thanks

Anita Yadav

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hey Anita,

Declare your variables in Global variables Section ( which is popup from Java section in Java Section ) and initate those variables in Initialization section ( just like constructor in java ) CleanUp those variables in Clean-Up section ( just like destructor in java)

Its working fine in my scenario...( SP 16)

Thanks.,

Esha

bhavesh_kantilal
Active Contributor
0 Kudos

Anita,

I have worked on the Global variables and i found no issues. Make sure that the variable is declared in the Declaration Section and then initlaized in the Initialization section.

If you declare a variable in the Declaration Section ,

int i;

then in any udf you can use if directly. No need to re declare the variable in the UDF. If you do this, then it becomes a local variable.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh ,

I have tried in the similar way as you have told but it goves me some error .

I will try again and come back again if the exists .

Thanks for your help

Anita Yadav

Former Member
0 Kudos

Anita,

Just now I've seen your reply... could you please post your error... so that we can help you in a better fashion..??!!!

Cheers.,

Esha

Former Member
0 Kudos

/people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14

Regards,

Jai Shankar