Skip to Content
0

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

Feb 09, 2017 at 05:23 PM

78

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Karthik Bangera Feb 10, 2017 at 07:46 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Mahesh C Feb 10, 2017 at 08:27 PM
0
Share
10 |10000 characters needed characters left characters exceeded
G Venkatram Feb 13, 2017 at 10:27 AM
0

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

I followed Praveen blog it is excellently working.

Regards,

Venkatram

Share
10 |10000 characters needed characters left characters exceeded