-
-
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
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 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