Created
December 16, 2015 14:27
-
-
Save SriniBlog/96e7b868ea191d79241b to your computer and use it in GitHub Desktop.
This snippet shows how to read parameters from Java Mapping in SAP PI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException | |
{ | |
try{ | |
String Parameter1 = arg0.getInputParameters().getString("PARAM1"); | |
String Parameter2 = arg0.getInputParameters().getString("PARAM2"); | |
String Parameter3 = arg0.getInputParameters().getString("PARAM3"); | |
OutputStream out = (OutputStream) arg1.getOutputPayload().getOutputStream(); | |
out.write( ("PARAM1 = " + Parameter1 + "\r\n").getBytes() ); | |
out.write( ("PARAM2 = " + Parameter2 + "\r\n").getBytes() ); | |
out.write( ("PARAM3 = " + Parameter3 + "\r\n").getBytes() ); | |
}catch(Exception ee){ | |
throw new StreamTransformationException("Error while reading the parameterized mapping.".concat(ee.getMessage())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment