cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass dynamic values to value mapping? please help!

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

I have requirement where I am using email adapter to send emails. Now the "To" email address is different for different environment. In other words:

DEV - Error-Dev@mail.com

TEST - Error-Test@mail.com

PROD - Error-Prod@mail.com

When the XI code is migrated to TEST environment the email address will be Error-Test@mail.com and in production it will be Error-Prod@mail.com.

Similarly, there are many more environments.

Now to handle this I have decided to use value mapping where Agency refers to the type of environment.

Now my problem is how do I use it in message mapping.

I have wriiten a java function that returns me the type of environment. But now how to use this value for value mapping. I mean when using value mapping in message mapping we hardcode the agency (environment type).

Is it possibel to specify a variable in value mapping for agency. The variable will be populated by java function before connecting to value mapping?

Please help!

Thanks

Gopal

Accepted Solutions (0)

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Gopal,

Though not related to Value Mapping , one option is to use a property file also.

/people/sap.user72/blog/2006/06/07/property-file-a-smart-use-in-xi-context

Regards,

Bhavesh

Former Member
0 Kudos

Hi Gopal,

why don't you use a "if" after your UDF. Depending on the return parameter of the UDF you call different value mappings?

Regards Mario