Skip to Content
0

Dynamic Folder Name Based on Current Date Sender Channel

Mar 01, 2017 at 02:43 AM

93

avatar image
Former Member

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

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

4 Answers

Harish Mistri Mar 01, 2017 at 06:14 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 03, 2017 at 12:11 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Iñaki Vila Mar 03, 2017 at 07:13 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left 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 :)

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

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

Share
10 |10000 characters needed characters left characters exceeded