on 09-24-2012 12:24 PM
Hello PI experts,
I am sought of new to PI mapping, I got a requirment to map a file to idoc.
From the payload , I have to take a particular field from the input file , if the field is starting with AB* , then the coressponding SNDPRN in the receiver idoc should be AB123 , and if the field is starting with say XY* , then the coressponding SNDPRN in the receiver idoc should be XY123.
I am planning to use , value mapping for this , but can we use wild characters such as (*) in value mapping or is there any better way for implementing this?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry guys , I should have been more clear - My input field XY* or AB* - here astreik(*) means that it can be any value , for example XYD544,XY78TI, ABJH99 , ABHHHJk43 etc...so based on the first two characters I have to decide my SNDPRN field in the output idoc .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ya , have to take first 2 characters by using Standard function"subString" then pass the key and value pairs in fixmapping for SNDPRN
input field -> substring(0,2) -> fixvalue -> oupput field (SNDPRN) and u have to refer above my previous post also ..
otherwise u can call if else condition after subString insted of fixvalues ....
Hi Sankar ,
The characters that follow AB(....) or XY(....) are not fixed these are dynamic values , only thing that remain constant are the first two characters of the field , thus I have to map based on first two characters of the incoming field.
If I am not wrong , Fixed mapping table would work if we already know the input values beforehand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think standard function replaceString allows you to replace any pattern at the incoming string with a new string... have you considered that function?
cheers,
Edu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shashank,
You can use Message Mapping standard function "substring" for that.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.