cancel
Showing results for 
Search instead for 
Did you mean: 

SID lookup

Former Member
0 Kudos

Hi all,

I am using an enhanced reciever determination for multiklient ruting.

In that context I need to know weather I shold pass the data to the D, Q og P system.

Is there any way that I can make a lookup or something in order to see which XI-system i am operation in?

So if XI-system = "D", then pass data on to D01CLNT900, If "P" then P01CLNT900 and so on.

Thanks -

/Thomas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To know the system, we should write UDF.

String a = System.getProperty("SAPSYSTEMNAME");

If a = 'D-system name' then ...........

else if a = 'Q-system name' then ............

else .............

Based on the condition we should do the configuraion according to our requirement. In XSLT also we can write the UDFs there also we can use the same code, no problem.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

iam not getting u exactly,tell me iam correct or not.

U have three different system say D Q and P,u want to send the data to that system which satisfy ur condition.

My question is for all D,Q P u have different business system and in receiver determination u can keep condition that if it is D then data will go to that particular system.

It is so simple.

Update if u have any issues.

Thanks and regards,

Phani Kumar

Former Member
0 Kudos

Thomas,

Have a UDF in your mapping and use the code

System.getProperty("SAPSYSTEMNAME");

This returns string containing SAP system name with some other parameter. Just check it.

Regards,

Jaishankar

Former Member
0 Kudos

ok - thanks - I am using XSLT mapping, though. Could i use the same function here?

Former Member
0 Kudos

I have no experience with XSLT mappings. But from my trainings I understood XSLT can have Java functions.

Regards,

Jaishankar

Former Member
0 Kudos

Hey,

i dont have any knowledge on xslt if you want any UDF i do have that UDF.

Thanks

Vikranth

aashish_sinha
Active Contributor
0 Kudos

Hi,

1) Write some Java code to get the hostname

package com.company.xi;

public class MappingFunctions {

public String getServerHostname()

throws UnknownHostException {

InetAddress myAddress = InetAddress.getLocalHost();

return myAddress.getHostName();

}

}

2) Package it in a JAR and load it into the IR as an imported archive.

3) Call it from your XSLT

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:mapping="java:com.company.xi.MappingFunctions">

<HostName><xsl:value-of select="mapping:getHostName()"/></HostName>

Also you can add the following code to get the system id.

// Get the system properties

String sysNr = (String) System.getProperty("SAPSYSTEM");

String sysName = (String) System.getProperty("SAPSYSTEMNAME");

Hope this will help you.

Regards

Aashish Sinha

PS : reward points if helpful

Edited by: Aashish Sinha on May 28, 2008 11:10 AM

Former Member
0 Kudos

Hi Vikranth,

even I to have same problem related to this problem so post that udf.

Regards,

Nani

Former Member
0 Kudos

Hi,

I didn't understand your question can you explain in brief,

Is that you are looking for any UDF?

Thanks

Vikranth