We have a scenario Idoc to flat file. The scenario is bypass and we are not using any mapping.
Using the SAP provided module we are converting the Idoc xml to Idoc flat file at receiver file adapter .We are able to generate the Idoc flat file successfully using this module.
Our PI environment is PI 7.31 dual stack.
But we have also the requirement to set the target file name RCVPRN+"-ZWR-"+DOCNUM+".txt which we are not able to generate at target side .
We tried the variable substitution but the variable substitution is not working while we are using the (IDOC XML->Idoc Flat file conversion module) .
We tried to use dynamic configuration by introducing an operation-mapping instead of by-pass scenario as used earlier.
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","SourceFileTimestamp");
String filename = RCVPRN+"-ZWR-"+DOCNUM+".txt";
But we are getting a null pointer exception from the last line. It seems as the sender adapter is not a FILE so the above method is not working.
Is there any other way to meet the required functionality?
Thanks and Regards
Rana Brata De