cancel
Showing results for 
Search instead for 
Did you mean: 

SYSID code

Former Member
0 Kudos

Hello All,

Can I any one provide me the code for using SYSID in udf(In mapping)

Thanks,

Regards,

Naresh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Refer this Link-

Former Member
0 Kudos

Hi Dasika,

Inorder to get SYSID of the current system

just use the following code;

String systemID = java.lang.System.getProperty("SAPSYSTEMNAME");

this will fetch the SID of the PI system on which the UDF code is running.

Regards,

Gautam Purohit

Edited by: Gautam Purohit on Oct 30, 2009 2:54 PM

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

I dont think its possible to read using as UDF,but i am sure we can read the value using simple java map.

find the code below

import com.sap.aii.mapping.api.*;

import java.io.InputStream;

import java.io.OutputStream;

import java.util.HashMap;

import java.util.Map;

public class DynamicConfInJavaMapping

implements StreamTransformation

{

public void setParameter(Map map)

{

param = map;

if(param == null)

param = new HashMap();

}

public void execute(InputStream inputstream, OutputStream outputstream)

{

String systemID = java.lang.System.getProperty("SAPSYSTEMNAME");

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

try

{

//if you want to check the logic write her

} catch(Throwable throwable)

{

throwable.printStackTrace();

} }

Regards,

Raj