Technical Articles
SAP Cloud Platform Integration (CPI) || Part 12 || Value Mapping
Dear Reader,
Do you have a lot of fix value mappings to do and you are too lazy to do so much data entry? Value Mapping is your go-to-solution! It is easy, quick, reliable, and trust me, a lazy person’s delight.
Let us explore how to do it!
To upload data into the Bidirectional Mapping, you need to prepare a .csv file as shown below. Things to keep in mind:
- The words in BLUE are the “Agency”.
- The words in PINK are the Identifier, which may or may not be same.
- The numbering in GREEN in column A is a unique numbering for the rows which can alphabets or numbers or alphanumeric.
- The B column contains the values coming in from the Sender which is to be concatenated with a Pipe i.e. | , which is a must.
- The C column has the value to be mapped for the Receiver.
It is a must to save the file in:
1) CSV format i.e. Comma delimited and
2. The encoding has to be “Unicode (UTF-8), as shown in the screenshot below:
THAT”S IT!
After your file is ready, in CPI, in your Value Mapping artifact, click on IMPORT, then SAVE/ SAVE AS VERSION (I always save as version), and then, DEPLOY.
After your artifact is deployed, go to the Message Mapping of your IFlow, select the function “valueMapping” in the Mapping Expression, and type the Source Agency, Source Identifier, target Agency, and Target Identifier as maintained in your Value Mapping.
Deploy your Iflow and enjoy!
Hope you had a good read.
If you wish to know more, or have any queries on this blog, then please feel free to drop a comment.
Thanks & Regards,
— o — — o — — o — — o —
This blog post is a part of a series of blog posts related to SAP Cloud Platform Integration. The blogs so far are:
- My adventure in learning CPI || Part 1 || All about SAP Cloud
- My adventure in learning CPI || Part 2 || Deployment Models
- My adventure in learning CPI || Part 3 || Cloud Security
- SAP Cloud Platform Integration (CPI) || Part 4 || Know your tool
- SAP Cloud Platform Integration (CPI) || Part 5 || Content Modifier
- SAP Cloud Platform Integration (CPI) || Part 6 || Configuring Mail Adapter
- SAP Cloud Platform Integration (CPI) || Part 7 || Maintaining logs by using “Groovy Scripts”, even if the IFlow is not on trace mode
- SAP Cloud Platform Integration (CPI) || Part 8 || Working with Request Reply
- SAP Cloud Platform Integration (CPI) || Part 9 || SAP Cloud Platform Cockpit || All about Account, Tenant, and User ID
- SAP Cloud Platform Integration (CPI) || Part 10 || How to use “Send”?
- SAP Cloud Platform Integration (CPI) || Part 11 || How to use a Local Integration Process
Other blogs:
Hi Sookriti,
This is a very useful and complete block on Value Mapping and how to use it in Message Mapping, would love to see if you can add how to use the same value mappings in Groovy and XSLT's
Thanks
Yatan
Thanks for the blog.
But this is very primitive. Is there any plan on CPI to implement the same value mapping as PI? I think CPI has a much better BPM than PI. It is easier to change the payload, header, etc. But other functionality is very raw.
Hi Sookriti,
I have updated a CSV document with UFT-8 Format. But when I am trying to upload it, fails in the value mapping with error"Unable to import CSV file as the formatiing does not specification mentioned here". Values mentioned as below screenshot. Please advice if I missed anything.
Hi Sookriti. Great blog series. I am working on moving a scenario from on-prem PI to CPI and am struggling with recreating a mapping operation that I cannot import (XSLT). I have some options where I need to map the values of multiple idoc fields to the same area of the XML. Is it possible to do this in CPI and do you have a blog about that function? An example is below.
Hello,
Very useful post, thank you!
Please be aware that currently, if the target value is not unique, you will not be able to import. Please refer to Note 2866537 - "Unable to import CSV file while configuring value mapping on Cloud Integration tenant" for the reason and a workaround.