-
-
Save viksingh/0c84048e722d834651d71a8d5c70b4a6 to your computer and use it in GitHub Desktop.
This method is used in SAP PI Mapping UDF to read the FileName from 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 String getDynamicFileName(Container container) throws StreamTransformationException{ | |
String FileValue = ""; | |
try{ | |
//Get the DynamicConfiguration instance | |
DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); | |
//Define key to read from the Dynamic Configuration | |
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName"); | |
//Read the FileName parameter from the Dynamic Configuration based on the key | |
FileValue = config.get(key1); | |
}catch(Exception ee){ | |
FileValue = ""; | |
} | |
return FileValue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment