Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viksingh/b6b2a3eca9a205a18f5ad7762b67b40d to your computer and use it in GitHub Desktop.
Save viksingh/b6b2a3eca9a205a18f5ad7762b67b40d to your computer and use it in GitHub Desktop.
This method is used in SAP PI Mapping UDF to write the Dynamic Configuration
public boolean setDynamicConfiguration(String Namespace, String FieldName, String FieldValue, Container container) throws StreamTransformationException{
boolean success = false;
try{
//Get the DynamicConfiguration instance
DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//Define key to write in the Dynamic Configuration
DynamicConfigurationKey key1 = DynamicConfigurationKey.create(Namespace, FieldName);
//Write the parameter from the Dynamic Configuration based on the key
config.put(key1, FieldValue);
success = true;
}catch(Exception ee){
success = false;
}
return success;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment