Skip to Content
avatar image
Former Member

Dynamic Folder Name Based on Current Date Sender Channel

Hi SAP PI Experts

I have a requirement where I need to read files from a folder on an SFTP server. Everyday a new folder is generated and is named as current date in YYYYMMDD format. The file names that get places in the folder is same everyday

for eg : MainFolder\outgoing\20170225 MainFolder\outgoing\20170226

These folders above would have abc.csv, xyz.csv placed everyday.

I just want to read the folder with todays date. Please let me know if that's possible?

I have read couple of threads, they talk about using Dynamic Configurations but for that I would have to read each folder and obtain the current date folder using UDF. That would take long processing time once the number of folders increase.

Any suggestions please.

Regards

Sonal

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Mar 01, 2017 at 06:14 AM

    Hi Sonal,

    AFAIK - there is no standard way to access the dynamic folder from sender communication channel. We had the similar requirement in past and we need to implement this via Unix script.

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 03, 2017 at 12:11 AM

    Thanks Harish for your response.

    Would you be able to share what exactly did you do with the Unix Script? Copied all the files in a statically named folder?

    Also would it be possible for you to share the script as I am not an expert in Unix area.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 03, 2017 at 07:13 AM

    Hi Sonal,

    Dynamic folder in the sender file is not supported. You can do a little trick, if your infrastructure there is an ABAP system involved you can do a Proxy-File scenario. Receiver file supports dynamic folder with dynamic configuration, you can do a job in ABAP to send the date each day, and with dynamic configuration you can select the folder that you want.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Inaki for you valuable inputs.

      I just wanted to double confirm that it isnt feasible. Thanks for the confirmation.

      Not sure how to mark the answers as helpful ans. Will do once I know how to :)

  • avatar image
    Former Member
    Mar 10, 2017 at 06:33 AM

    Closing the thread as its confirmed that dynamic config in sender channel isnt feasible.

    Add comment
    10|10000 characters needed characters exceeded