cancel
Showing results for 
Search instead for 
Did you mean: 

Value Mapping Question

Former Member
0 Kudos

Based on the source filename I need to determine Customer and distribution channel value using value mapping:

Source FileName:
FileName1
FileName2


Target CustomerValue:
300
300

Target Distribution Channel:
ABC
XYZ

I am unable to achieve the above using value mapping

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vicky,

in cases like that I make a valuemapping putting the two target values together in the valuemapping table. Then splitting the value into the two field I need. So

FileName1 = 300ABC

FileName2 = 300XYZ

Jenny

Former Member
0 Kudos

You mean splitting them in mapping?


Former Member
0 Kudos

Hi Vicky,

You can split the values in mapping using the method mentioned by Jenny

Filename1     300|ABC

Filename2     300|XYZ

or use two value mappings, one for Customer and other for Distribution channel to determine output values based on File name.

Value map1

Filename1     300

Filename2     300

Value map2

Filename1     ABC

Filename2     XYZ

Refer below link on how to create value maps:

XI/PI: Value Mapping Using Graphical Editor

Regards,

Pranav

Former Member
0 Kudos

Ram,

SAP PI does not let me create two value mapping groups which contain the same values for source scehma and agency.

TO my knowledge this is not possible:

Value map1

Filename1     300

Filename2     300

Value map2

Filename1     ABC

Filename2     XYZ

this will throw an error saying that Filename1  is already being used in the value map1.

Harish
Active Contributor
0 Kudos

Hi Vicky,

The only way to achieve this concat the value as suggest by Jenny.

you can split the value in the mapping.

regards,

Harish

Former Member
0 Kudos

Hello,

>>SAP PI does not let me create two value mapping groups which contain the same values for source scehma and agency.

I think, it's possible check below thread:

Thanks

Amit Sriavstava

Former Member
0 Kudos

Amit,

Thanks for your inputs. But this is not the scenario I am talking about. I am aware that N (FileName):1(CustomerValue) mapping can be done. Lets say N is 2 here with value FILENAME1 and FILENAME2.

so I will have one value mapping group for the above.

But now lets says  I have a requirement to cerate a new value mapping FILENAME1 (only) to DISTRIBUTION CHANNEL1 and another value mapping FILENAME2 (only) to DISTRIBUTION CHANNEL2.

When I try to create the above I get an error saying FILENAME1 is already being used in Value mapping group 1.

Former Member
0 Kudos

Hi Vicky,

It is possible to do it. See below the File- Customer, File- Distribution maps with mapping and testing.

Hope it helps your requirement.

Regards,

Pranav

Former Member
0 Kudos

Hello,

>>When I try to create the above I get an error saying FILENAME1 is already being used in Value mapping group 1.

As of now, i don't have a system to test it, but Ram's reply confirms that it's possible.

BTW, why don't u just club CustomerValue + Distribution channel name at VM and then extract values while doing mapping?

Thanks

Amit Srivastava

Former Member
0 Kudos

Yes. I am going with the approach mentioned by Jenny and Ram. I don't think the scenario i mentioned can be handled any other way. I would consider this as PI limitation.

Thanks everyone for your responses.

Answers (1)

Answers (1)

former_member187010
Participant
0 Kudos

Hi Vicky,

Any specific reason for using value mapping.

If you are receiving filename in field, then you can also use either if else or  fix value funtion.

Regards

Jitender