cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mappings Functions

former_member201275
Active Contributor
0 Kudos

I require a message mapping which maps a USERID value according to Sender.

When sender system is DEV then Userid must equal USRDEV, when sender is QAS then user = USRQAS, and lastly when sender is PROD then user should be USRPRD.

I have created this currently (as can be seen in screenshot below) so if Sender = DEV then USERID = USRDEV, else USERID = USRQAS.

How do I create this to cater for all 3 senders?

Accepted Solutions (1)

Accepted Solutions (1)

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Glen,

Firstly, use the below udf code which gives you the system name and pass the output of this to a fix value, and pass the output of this to the target field.

In this way, for every environment, the udf returns the exact system name, in the fixvalues, maintain accordingly the value pair for the system key.

Regards

Vishnu

former_member201275
Active Contributor
0 Kudos

Hi Vishnu,

Apologies i am new to PI. How do I enter signature variables for this? so far I have:

But this does not work, I get activation errors.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Glen,

This udf doesn't need any inputs. So, remove the parameter argument.

The functionality of this udf is it just gives you the SAP system name.

Regards

Vishnu

sahithi_moparthi
Contributor
0 Kudos

Hi Glen,

In the above screenshot, Name is written as incorrectly.Correct that,but that doesnot give activation error.

Also select Argument instead of Parameter in signature variables and try to activate.

Please share your error screenshot.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Glen,

You will achieve this with fixvalues standard function.

Thanks,

Thiru

former_member193376
Active Contributor
0 Kudos

You can use fix values as suggested by Thiru if you know for sure the system you are executing it in. however if you will execute it in any system, then the value has to be populated dynamically.

I had a similar requirement. Please go through my blog  as below.

Regards,

Saiyog

sateesh_adma
Participant
0 Kudos

You need to use value mapping in this... In ID create value mapping and maintain source system and target system values

and in message mapping use that value mapping which is available in conversions..