cancel
Showing results for 
Search instead for 
Did you mean: 

Value mapping with two keys and a value in Graphical mapping

Former Member
0 Kudos

HI

I am working on File to IDOC scenario.

my requirement is  in the File, i have two key fields......

KeyField1 and KeyField2

Based on these two fields i need to pass a value to my IDOC.

If KeyField1 = 100 and KeyFiled2 = 200 then pass VALUE = 999 to IDOC field.

Is it possible thorugh Value mapping....???

Please help...

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

In principle, it is not possible to have multiple keys mapped in parallel with Value Mapping. However, as a workaround, you can concatenate them with some separator, for instance as 100|200, to create a single key out of two values. So the answer is: yes, value mapping can be used for your scenario.

Find a nice description on how to work with Value Mappings here:

http://scn.sap.com/docs/DOC-3706

Regards,

Greg

Former Member
0 Kudos

THanks Greg and Amit for your quick response..

So i am doing like below

Service Repository

KeyFiled1 concatenate KeyField2 ---> Value mapping --> Target field

What is source Schema and Target Schema??

Integration Directory

Tools --> Value Mapping

Agency --- My Source business component/system

Schema --- that was given in Serivce repostiory

Agency -- My target business component/system

Schema --- that was given in Serivce repostiory

Need to give the values .....in the table....what about Group...is it required?

Please help

Former Member
0 Kudos

Hi,

Give any name udner Group name cloumn

former_member184681
Active Contributor
0 Kudos

>>> What is source Schema and Target Schema??

Generally, a functional name you assign.

>>> Need to give the values .....in the table....what about Group...is it required?

Yes, it is required.

Let me give you an example. In one of my scenarios, I am using an ILN sent by the sender, to map it to the SAP plant code, with Value Mapping. In this case, I use:

Sender Agency: sender Business System

Sender Scheme: "ILN"

Receiver Agency: receiver Business System

Receiver Scheme: "PLANT"

Group Name: ILN_1234567890

Value for sender: 1234567890

Value for receiver: XX (SAP plant code)

Regards,

Greg

Former Member
0 Kudos

Thanks Greg...

Did the follwing...

-----------------------------------------------------------------------------------------

Serviece Repository

KeyFiled1 concatenate KeyField2 ---> Value mapping --> Target field

Double click on Value mapping

Agency --- My Source business component Name (File)

Schema --- SourceSchema

Agency -- My target business component/System(R/3 system)

Schema --- TargetSchema

-------------------------------------------------------------------------

Integration Directory

Tools --> Value Mapping

Agency --- My Source business component Name (File Adapter)

Schema --- SourceSchema

Agency -- My target business component/System(R/3 system)

Schema --- TargetSchema

---------------------------------------------------------------

Entered that values:

100-200      9999     GR1

1.  Need to gve the same names in Service Repository and Integration Directory for Agency and Schema????

2. Are these the steps are ok....or do i need to do any other things like Reciever/Inerface determinations......Sender/Reciever Agreements....or another other need to change based on this Value mapping....

Pleae help..

Former Member
0 Kudos

Hi.

1.  Need to gve the same names in Service Repository and Integration Directory for Agency and Schema????

Yes. Is correct is necesary for binding between IR and ID.

2. Are these the steps are ok....or do i need to do any other things like Reciever/Inerface determinations......Sender/Reciever Agreements....or another other need to change based on this Value mapping....

No only add the values on ID.

Regards.

Lucho

former_member184681
Active Contributor
0 Kudos

>>> 1.  Need to gve the same names in Service Repository and Integration Directory for Agency and Schema????

Yes, that's the whole point. Imagine that you have multiple Value Mappings created. Same Agency and Schema used in ESR and ID allows PI to identify, in which group the value should be looked up for.

The rest was already explained by Lucho.

Regards,

Greg

Former Member
0 Kudos

That's great Lucho....

One last question is......

In this scenrio can i use Fix values also...or Value mapping only....

What makes the difference between Fix Values and Value mapping????

Thanks for the response..

former_member184681
Active Contributor
0 Kudos

Well, I would say: if the same value mappings are about to be used by multiple message mappings, or you want the value mapping to be configurable outside the message mapping - then go for Value Mapping. If some value mapping is only required in one particular MM - then Fix Values should be equally good. Also, personally I would rather use Fix Values for technical values like qualifiers, and Value Mappings for "business" data. And for most technical and simplest conversions, you can even use graphical mapping to check: if A = 100 and B = 200 then map 999 to target.

Regards,

Greg

Former Member
0 Kudos

U can use Fix value mapping but VM giove u higher flexibility. Suppose you use Fix value mapping and tomm u move ur changes to QA or Prod, there u wont be having access to edit/add PI message mapping (havevto do changes in dev and then transport the same) on the other side if u use Value mapping u can directly go under ID and edit/add the values under the same

Former Member
0 Kudos

Thanks all for helping in this...

Former Member
0 Kudos

Hi.

Depending if the values will no change on the future or the values are constant you can use fix value , FV is only available in one message mapping.

Also is recommendable to use if the values are small.

Regards

Lucho.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Just concat the two keyfileds value and then pass as one input to value mapping and under VM maintained the conditions accordingly.

Like 100:200 --> 999

Thanks

Amit Srivastava