cancel
Showing results for 
Search instead for 
Did you mean: 

sap xi/pi mapping select.case equivalent?

masooduk
Discoverer
0 Kudos

Hello,

Im am new to sap pi, struggling to find an equivalent of "select case" equivalent in the message mapping functions, I know i can string toegether a whole load of if else diamonds in the gui, but I wondered if there was somthing already built for this?

Rgds

Sood

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Masood,

  • Yes you can use multiple if-then-else for this requirement using standard functions in message mapping
  • You can create UDF with switch case

Regards,

Praveen.

masooduk
Discoverer
0 Kudos

Thanks Praveen

It just seems so messy with multiple if else's (see pic)

In pic above, if the SportCenter Field in the sender file = P I want to pass 60.00 to SportCenter field in the Receiver file

                                                                              = S I want to pass 30.00 to SportCenter field in the Receiver file

                                                                              = B I want to pass 15.00 to SportCenter field in the Receiver file

                                                                              otherwise I want to pass 00.00 to SportCenter field in the Receiver file

Where do I find the UDF option - which function group is it in?

Rgds

former_member182412
Active Contributor
0 Kudos

Hi Masood,

You need to create the UDF under Functions Tab

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Hello Masood,

You can take the below link as reference on how to write UDFs

RXP | User Defined Functions in SAP PI mappings

former_member182412
Active Contributor
0 Kudos

Hi Masood,

You can use below UDF.

Regards,

Praveen.

masooduk
Discoverer
0 Kudos

Thanks guys,

Both very good answers, very helpful

Best Rgds

Masood

Answers (0)