on 12-09-2014 2:13 PM
Hello Team,
I have an existing Java Mapping that I need to modify to have dynamic values or parameters.
I followed the instructions given in this link -
Now, may problem is the Java code and the class.
1) Can you please tell me where can I get the class for com.sap.aii.mapping.api.InputParameters?
While compiling the java program, I get an error saying this import is missing.
2) Can you also check if below code is correct?
public class JAVA_AddTimeStamp implements StreamTransformation{
private Map objMapParameter = null;
public void execute(InputStream isInput, OutputStream osOutput)
throws StreamTransformationException {
String strTrgtFileName = null;
Date dteCurrDate = null;
SimpleDateFormat sdfDateFormat = null;
DynamicConfiguration objDynConf = null;
final String SFTP_PATH = "http://sap.com/xi/XI/System";
final String SFTP_PROPERTY = "FileName";
final String FILEEXTN = ".pgp";
// access dynamic configuration
objDynConf = (DynamicConfiguration)
objMapParameter.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
dteCurrDate = new Date();
sdfDateFormat = new SimpleDateFormat("MMddyyyy.hhmmssSSSSSS");
String inParam = isInput.getInputParameters().getString("ACCOUNT_NAME");
strTrgtFileName = inParam + ".PS00020." + sdfDateFormat.format(dteCurrDate) + FILEEXTN;
Hi Carlo,
What is your PI version?, you can develop your java mappings directly in the ESR and you won't need to find out where the SAP jar is. Also you have more advantages, like to have your source java in the ESR. Check this Sunil Chandra's blog
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carlo,
You can download the jar file from your PI system using browser,
http://<XIServerHost>:<PORT>/rep/repository/com.sap.xpi.ib.mapping.lib.jar
//BR,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.