cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting Dynamic file directory for sender communication channel

0 Kudos

Hi Experts,

We have a requirement like below:

1. Scenario is a File to IDOC (3rd party FTP to SAP)

2.Order Files will be placed in the different folders, these folders are based on the GLN value.

    Suppose if the GLN is "9999" then the files will be a placed in directory "/9999/ORDERS/" in the 3rd party FTP.

    Every time a new file is created the path get differs

3. Requirement is every time ORDER file is created at 3rd party then the files will be placed in the respective GLN folder path and the PO system has to pick up the files from the directory dynamically.

Now, How to configure the file sender communication channel to get the above the requirement satisfied

Thanks in Advance, for your suggestions

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Hello Sai,

You can use Advanced option and configure multiple source folders

Dynamic file Directory : Sender File Adapter | SCN

0 Kudos

Hi Raghu,

Thanks for suggestion, but in the link provided the final solution suggested was like to place the files in common folder.

But our client is not convinced for creation of common folders

former_member186851
Active Contributor
0 Kudos

Hello Sai,

I guess this is not possible using standard options.

You should write custom module beans or scrips to acheive this.

0 Kudos

Hi Raghu,

We have tried to write script, but it didnt work out.

so looking for other options

Former Member
0 Kudos

Hi Sai

It's almost impossible to achieve this in PI. Even adapter module will not work because the module will be called after the file gets picked up.

Please try to find out why client wants to place the files in separate GLN's and then provide the appropriate solution.

I don't think placing files in separate folders will add any extra value.

Thanks.

Indrajit

former_member186851
Active Contributor
0 Kudos

Hello Sai,

Then its better to request client to place the files in one folder with GLN values as filename which should be the better option.

0 Kudos

Hi Indrajit,

Thanks for suggestion, we have tried to explain our clients about the placing of files in common folder, ,but they want structured placement of files like suppose a ORDER file has been generated, then a background program runs which creates folder based on GLN number with the following structure

GLN Folder

|

|-ORDERS folder

|

|-INVOICE folder

|

|-ORDER Response folder

Now files of ORDERS type will be placed in ORDERS folder and INVOICE will be placed in invoice folder, so that everything can be in structured format.

Now PO has to pick up only the order files based on GLN number.

Thanks

Chaithanya

Former Member
0 Kudos

Hi Sai

At this moment I can only think about the below approach

1. When a ORDER file is generated, the background program should do one more activity, which is write the GLN folder name in any table or look up file.

2. Then in PI create a sender channel and place a dummy file in a static folder. Schedule the channel using ATP in run-time workbench. Then write a java map to read that table to find the GLN folder.

Then read the file inside that folder.

I know this would be hard to implement..but looks like there are no other way.

Thanks,

Indrajit

0 Kudos

Hi Indrajit,


Can you please provide any supported links about how to use  ATP in run tme work bench?


Regards:

Chaithanya

former_member186851
Active Contributor

Answers (2)

Answers (2)

0 Kudos

Hi all,

Thanks for your suggestions we have finally convinced client to create common folder as of now, but in future same situation might be repeated.

Regards

Chaithanya

iaki_vila
Active Contributor
0 Kudos

Hi Sai,

Another solution is to change the concept of you scenario and to do a Proxy-FTP-IDOC scenario. In an ABAP program you can set the logic to determine the folder, at mapping level you can do the FTP like the first mapping ().

Regards.