Skip to Content
avatar image
Former Member

SAP PI how to sent file into two different folder according field in file

SAP PI how to sent file into two different folder according field in incoming file.

I have service that got file from folder A and send it to folder B. Now I need add condition when field F = 1 - send file to folder Q or if field F = 2 - send file to folder U

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 17 at 03:38 PM

    Hi Asher,

    Use XPath in your ICO-Receiver tab and point two separate Business components.

    i.e. If F=1 then BC = BC_Q

    If F=2 then BC = BC_U

    Now, Under BC_Q create one communication channel with required FTP server details and path and accordingly another CC under BC_U.

    Thanks,

    Apu

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 17 at 12:24 PM

    Hi Asher!

    1. In case of File/NFS mode you could use variable substitution or Dynamic Configuration attribute "Directory" to set destination path.

    2. In case of using different folders on the same FTP server you could use "Directory" DC attribute.

    3. In case of using folders on different FTP servers you could use two receivers with its own communication channels and determine receiver depending on payload value using conditions in receiver determination or enhanced receiver determination.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded