cancel
Showing results for 
Search instead for 
Did you mean: 

Value Mapping

Former Member
0 Kudos

Can i design the value mapping in such way in PI that i can change the value directly in production system.

Scenario is the values keep on changing ( are unknown now). Instead of ECC maintains a table, can PI have a table where Values can be inserted directly on the system ( like prod)

Right now i guess we can do that in ID which requires transport.

How to simulate this in PI where values can be changed in prod without transport. Sender is ECC

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Harry,

There are two perspectives in this design.

If the values are less say around 10-15 entries, you can always maintain it in ID->tools->ValueMappping. Based on the source value coming from the ECC towards XI Message mapping, the corresponding target value will be picked up.

But if the values are too high, I would recommend to use either XI ABAP stack with a table entries and call them up using some RFC lookup.

Regards

Krish

Former Member
0 Kudos

Hi,

Any suggestion on this.

Regds

anupam_ghosh2
Active Contributor
0 Kudos

Hi,

You have not expalined the exact mapping requirement. What I could make out from your post that depending on server enviornment the values supplied to a field will vary. That means you need separete values for development, quality and production enviornment. Then please take a look into this UDF. This can be used instead of or in addition to value mapping.

Here in UDF the system name is determined and values get generated depending on SAP system name.


public static String Sysname(Container container)
	{
		String value="";
		try
		{
			String p= System.getProperty("SAPSYSTEMNAME");
			
			if(p==null)
			{
				value="";
			}
			else if(p.indexOf("dev")>=0)
			{
				value="ABC";
			}
			else if(p.indexOf("qua")>=0)
			{
				value="def";
			}
			else if(p.indexOf("prod")>=0)
			{
				value="xyz";
			}
		
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return value;
	}

Before you implement code written above check what is the actual system name for development enviornment using this UDF written below. Then alter the if-else statement according to your need.


public String getSystemName(Container container){
   //write your code here
 return System.getProperty("SAPSYSTEMNAME");
}

Hope this solves your problem.

regards

Anupam

baskar_gopalakrishnan2
Active Contributor
0 Kudos

AS you know PI is a middleware and not designed to store mass volume of data over here. So IMO, if the values need to be stored minimal go for value mapping , otherwise handle still in ECC. THat is the better approach and easy to maintain during long run.

Former Member
0 Kudos

I am getting many push to store the value in PI without having to create transport. As we know this can be done in ECC very easily, but somehow PI is in limelight. I don't blames them as TIBCO and other i guess can manage that..

Please let me know if there is way to maintain the Values ( From & to) in PI, where PI can pick this & convert it, WITHOUT CREATING TRANSPORT. I know value mapping, fix mapping requires transport.

RFC look up is tedious and i have explored the option of having new interface where ECC send the data & PI cached the value to used in value mapping.. Anything other then this is highly appreciable.

Regds

prasanthi_chavala
Active Contributor
0 Kudos

Harry,

If you have less data then you can store it in value mapping table and you can get this values into your mapping by doing lookup reference to value mapping table in your message mapping.

Sample code for your reference:

/* retrieving values From Value mapping table*/

String context = "http:/""/""sap.com/""xi/""XI";

String senderAgency = "SrcCtrlRecKey";

String senderScheme = "CtrlRecKey";

String receiverAgency = "TgtCtrlRecVal";

String receiverScheme = "CtrlRecVal";

IFIdentifier src = XIVMFactory.newIdentifier(context, senderAgency, senderScheme);

IFIdentifier dst = XIVMFactory.newIdentifier(context, receiverAgency , receiverScheme);

try{

variable1 = XIVMService.executeMapping(src, dst,"variable1");

variable2 = XIVMService.executeMapping(src, dst,"variable2");

}

catch(ValueMappingException e)

{

trace.addWarning("ValueMapping Exception"+e.toString());

}

You can use the variable1,variable2 ......in your mapping..

Thanks,

Prasanthi.