cancel
Showing results for 
Search instead for 
Did you mean: 

Read the target system

Former Member
0 Kudos

Hi,

Is it possible during the mapping to read the name of the bussines system from receiver determination?.

In the mapping i have to populate the idoc control record with the name of the system the data is sent to. The reason is to find wether interface is executed in development, test, or produktion.

That will also be fine to be able to read the name of the PI system the mapping/interface is executed in . ?

Hope to get some helpful input

Regards

Ugur E

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can't you use "Sender" / "receiver" from the "Constant" function in the message mapping?

I am not sure if I understood your problem correctly. Please correct me if I am wrong.

Regards,

Neetesh

Former Member
0 Kudos

Hi,

You are probably right, i did not se that constant before. Does it automatically give you the receiver.?

/regards.

Ugur

Former Member
0 Kudos

Hi

Sender and receiver function will give you the respective business system or business service name.

But when i checked your question, you wants to know which PI system the interface is running like Developement or Test 0r prod. In this case, i would suggest to use System.getProperty method which gives you system name, service user..etc.

For Example,

// Get the service user name
String sysID = System.getProperty("user.name").substring(0,3);
if(sysIDequals("<XID>")){
//your logic
}
else if(sysID.equals("<XIQ>")){
//your logic
}

// Get the PI system name
//String sysNam = System.getProperty("SAPSYSTEMNAME").

if(sysNam.equals("<XID>")){
//your logic
}
else if(sysNam.equals("<XIQ>")){
//your logic
}

Former Member
0 Kudos

Hi,

Ok... that was an answer to my second question. Perfect.

Thank you very much.

Ugur er

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes it is possible.

You can do the dynamic configuration in your mapping.

You need to create a UDF and then as one of the input to that UDF you can pass standard function "Receiver".

This standard function is under Constant -> Receiver.

If you just need to pass this Receiver name then it will automatically take the receiver name and pass it to your receiver parameter.

Or else if you want to do something with that you can pass it in UDV.

Hope this is helpful.

Thanks,

Hetal

Former Member
0 Kudos

Hi Thansk,

Do i need the udf, cant i just take reciever from the constanst?

Regards