Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Feb 10, 2017 at 07:46 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 10, 2017 at 08:27 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 13, 2017 at 10:27 AM

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

    I followed Praveen blog it is excellently working.

    Regards,

    Venkatram

    Add comment
    10|10000 characters needed characters exceeded