Skip to Content

Sender file adapter- Process multiple files in a sequence

Hi

We have two source files (abc.pdf & 123.xml) in the same source directory and need to follow sequence in processing the files.

abc.pdf should be picked first and processed (file to file) and then (123.xml) should be picked (file to idoc) else this will result in conflict due to some dependency.

Please let me know if the below approach would work.

1) We can set External control mode for sender file channel (123.xml) and start the channel once 1st scenario is competed and stop it after 2nd scenario is done

or

2) Specify a condition in sender file channel (123.xml) "to pick the file only if (abc.pdf) is not available in the folder" or "to not to pick the file as long as (abc.pdf) is available in the folder"

Kindly provide your valuable suggestions on how to maintain the sequence in processing of those files.

Regards

Sudarvizhi P

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Apr 24 at 05:29 AM

    Hi Sudarvizhi,

    You can create 2 different sender communication channels (with appropriate file name scheme) and set the 'Availability Planning' sequentially may be in a frequency of once in a day.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 24 at 05:46 AM

    This is not scheduled for particular time. We are not sure when the file will be placed in source folder.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 24 at 07:45 AM

    Hi Sudarvizhi!

    If there is any possibility to name the source files as abc.pdf, abc.xml - you could use "Additional files" option of file communication channel.

    You create two receiver interfaces to process main payload and attachment separately and use "Maintain sequence at runtime" for those interfaces to use EOIO processing mode.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 25 at 05:45 AM

    Hi

    There is no flexibility with the file names. kindly suggest is it possible to pick both files (abc.pdf & 123.xml) with same sender channel using "Advanced selection for source file" with 123.xml as payload and abc.pdf as attachment. Does "Payloadswapbean" allows this option?

    In other words, my requirement is to process 123.xml alone in PI and just move abc.pdf to archive folder.

    Regards

    Sudarvizhi P

    Add comment
    10|10000 characters needed characters exceeded

  • May 06 at 08:20 AM

    Hi, Sudarvizhi

    How about using bridge technique to link 2 interfaces?

    Firstly grasp 123.xml to its destination, then bridge to 2nd integration configuration to grasp abc.pdf to its IDoc destination.

    I used following demo to illustrate my idea (since I don't have suitable IDoc target system, I represented it with another file system instead)

    Step1. Create 1st sender channel, grab abc.pdf

    Step2. Create 1st receiver channel. In the tab of "Module" in 1st receiver channel, config bridge configurations

    Step3. Configure 1st integration configuration to make it effective sending abc.pdf to 1st file destination system.

    Step4. Create 2nd sender channel, grab 123.xml

    Step5. Create 2nd receiver channel, in your case I think it will be a IDoc destination(since I don't have suitable IDoc target system, I represented it with another file system instead)

    Step6. Create 2nd integration configuration, be aware to check "Sender Uses Virtual Receiver"


    1.jpg (65.1 kB)
    file.jpg (106.2 kB)
    3.jpg (60.2 kB)
    4.jpg (55.3 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • May 06 at 08:34 AM

    Hi Sudarvizhi!

    If you have only two files to be taken and its names are constant, you could try to use approach described in this blog:

    https://blogs.sap.com/2017/03/13/taking-additional-file-from-another-folder-using-file-sender-adapter/

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded