Hi Venkatram,
In multimapping you cannot set dynamic filename since the same header is shared by both of them. You can achieve your requirement rather by using Variable Substitution. Just add a separate node (eg:- 'File') in the target structure to hold the fields 'HeaderName' and 'ItemName' having filename_timestamp as their values from mapping and use them in Variable substitution. These fields can then be ignored in the receiver FCC using the below settings-
Suppose you have 2 segments OrderHeader and OrderItem. Add 'File' as the 3rd Segment to hold the 2 values.
Recordset Structure - OrderHeader, OrderItem, File
File.fixedLengthTooShortHandling Cut
File.endSeparator '0'
File.fieldNames HeaderName, ItemName
File.fieldFixedLengths 0,0
This has been explained in an excellent blog by Praveen. Link as below-
https://blogs.sap.com/2016/01/05/multi-mapping-with-dynamic-filename-using-variable-substitution/
Regards,
Karthik
Check this blog : https://blogs.sap.com/2014/03/05/a-new-approach-multi-mapping-dynamic-configuration-using-a-generic-custom-module/
Thanks a lot Karthik Praveen & Mahesh. It is a grate help.
I followed Praveen blog it is excellently working.
Regards,
Venkatram
Add comment