cancel
Showing results for 
Search instead for 
Did you mean: 

After splitting the source file in to two files How to give different name with date stamp ?

0 Kudos

Hi Guru's,

I have a requirement one source file is coming with header & line item details(ex: abc.csv).

I need to split it to two files in SAP PO 7.5 using multimapping. two different (to be generate )files are Header and Line item and name dynamically it into 2 different with date stamp

like: abcHeader_MMDDYYYY.csv and

abcItem_MMDDYYYY.csv .

Using Dina mic config , is it possible in with in Same mapping giving 2 different dynamic file names like above.

Any UDF ? or any other why to achieve this . Help Plse

Thanks in advance,

Venkat

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Thanks a lot Karthik Praveen & Mahesh. It is a grate help.

I followed Praveen blog it is excellently working.

Regards,

Venkatram

0 Kudos
KarthikBangeraM
Active Participant
0 Kudos

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