on 11-15-2013 4:22 PM
Experts,
I have following scenario.
outbound idoc from SAP EWM and creating flat file for third party. The file name should be "<WareHouseNumber_Timestamp>_WO.<EXT> the ext is also based on the process code which is coming from EWM idoc.
I have done following things so far.
Connections are established. created mapping and in that created attribute in target structure for FileName and assinged filename to it.
Here is the config on communication channel
When i ran the scenario I got below error, please help. I have gone through all the possible blogs on this topic so kindly do not paste me the links.
MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
Thanks,
Nishant
Hi Nishant,
from the error it seems your attribute FileName is not set from the message mapping. Please check the XI Message header if you have the FileName attribute.
Regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the below UDF in the message mapping and map the output of udf to the target root node.
// Use this Dynamic Configuration, FileName parameter is dynamically set to receiver file adapter
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
// Call the FileName parameter of Receiver File Adapter
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String MyFileName ="Test"; // set your file name here
// Set the FileName dynamically to Receiver File adapter
conf.put(key, MyFileName);
return MyFileName;
Regards,
Veerendra.
Hi Nishant,
For generating the file with dynamic file name you have two options.
1. UDF in message mapping
2. variable substitution.
If you don't want to write the udf, use the variable substitution method (send the file name in any of the field in that target structure and access the filed in the receiver communication channel).
The UDF which i have given is very small and you don't need java expertise on it.
Regards,
Veerendra
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.