cancel
Showing results for 
Search instead for 
Did you mean: 

value mapping using properties file

Former Member
0 Kudos

Hello,

how do I do value mapping using properties file?

i mean fixed value maping with a properties file so that if the source and target key is to be changed, I can directly change in properties file rather than editing the mesage mapping

The requirement is ... there is one source field and one destination field

based on key, key value must be determined and sent to the destination structure like...

key1 .......keyvalue1

key2......keyvalue2

key3......keyvalue3

etc in such a way that ....

source and destination fields are mapped in the MM and in the properties file i put key and the corresponding key value

tell me how do i do it?

thanks in advance

nikhil.

Accepted Solutions (0)

Answers (1)

Answers (1)

prasanthi_chavala
Active Contributor
0 Kudos

Hi,

Maintain the key value pair in the Integration directory ie tools-->value mapping and u can directly access these values during runtime in your MM. While mapping use Value mapping standard function and define ur source and target values. So you can update values directly in ID for any changes.

For more info refer to this blog:

/people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool

Thanks!

Former Member
0 Kudos

thanks for the link

Actually my TL asked me to do it using properties file

in notepad i have to put source and destination key and respective key value field

regards,

nikhil

prasanthi_chavala
Active Contributor
0 Kudos

Then you have to write a java program in which you need to access the values from this file and build the target structure using sax parser. Then import this program under imported archives and use in ur IM.Here you cannot use graphical mapping.

Thanks!!

Former Member
0 Kudos

thanks...

can you please post me the java code , if you have it?

regards,

nikhil

Former Member
0 Kudos

Hi Nikhil,

Why would you want to read values from a text file?

Is it a requirement from a customer?

I dont think it is a good option to read value from text file.

Regards,

Sumit

Former Member
0 Kudos

Hello Sumit,

yes its requirement from customer

this is because if the constant value changes in future, he dont want me to edit mapping all the time to change the constants

If I use properties file, I can easily update the same in the properties file rather than editing MM

Please post me the java code if anyone has done it previously to use value mapping using properties file

thanks

Nikhil.

Former Member
0 Kudos

Hi,

I believe the customer would have other SAP Systems.

Suggest him to maintain the values in one of the SAP System and then you can use RFC/SOAP lookup to read the values.

I believe maintaining values in a text file is a very bad option.

Regards,

Sumit