cancel
Showing results for 
Search instead for 
Did you mean: 

File-RFC

former_member188791
Participant
0 Kudos

Hi Group,

I have scenario , File to Proxy in which I am triggering one event , once after finishing the event it is triggering RFC in ECC , based on this RFC trigger I need to pick up another file for further processing,can any body suggest how we can achieve this.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184681
Active Contributor
0 Kudos

Hi Rajiv,

If I were you, I would probably implement a UDF to read the file inside the mapping of scenario #2, sort of "file lookup". This solves a lot of your problems. So instead of 3 scenarios:

1. File to Proxy

2. RFC to X

3. File to Y (triggered by 2)

I would implement just 2:

1. File to Proxy (same as above)

2. RFC to Y, with file lookup in UDF during mapping.

Regards,

Greg

iaki_vila
Active Contributor
0 Kudos

Hi Grzegorz,

Im glad to read your posts again, i think you idea is the best option because with file lookup you can pick an specific file without problems, although obviously you would need to know the file name to be picked before the UDF with the file lookup.

Regards.

former_member184681
Active Contributor
0 Kudos

Thanks a lot Iñaki! I'm also happy to see so many of your posts in SCN recently. Hopefully I'm finally back here for longer, so we could find more posts to exchange our ideas

Regards,

Greg

former_member188791
Participant
0 Kudos

HI Gzregorz/Inaki,

As Inaki mentioned ,your method will only work if I know the file name ,in this I dont know the file name.

former_member184681
Active Contributor
0 Kudos

Hi Rajiv,

If so, then your requirement is not solvable. You wrote that there will be multiple files in the directory, and you only have to process one. But there is no way to determine which one.

I think you need to think this design over once again and find some simpler solution.

Regards,

Greg

Former Member
0 Kudos

Hi Rajiv

Implementing this scenario using PI will be very difficult because the file adapter will keep poling

for the new files and we can not hold it for any response or event trigger.

But if parallel processing of multiple files is your concern, then I would suggest you to go for EOIO so that only 1 file at a time will be processed.

File adapter has the option EOIO in the channel configuration.

iaki_vila
Active Contributor
0 Kudos

Hi Rajiv,

If i understand your scenario when the RFC is triggered you would need to start a third PI scenario FILE - ???, then you need to start the file polling only one time and in a pointed time. You can start a communication channel ( the last FIle one) from ABAP to do this, check Katlego Jack Mohlankana Maja's blog 

Regards.

former_member188791
Participant
0 Kudos

Hi Inaki,

But how I can control file adapter to pick one file.

iaki_vila
Active Contributor
0 Kudos

Hi Rajiv,

To pick one file you can follow Indrajit suggestion with the processing sequence by date, also you can tell us how that file will be generated, because if the RFC program is generating the file you could control to have only file in the desired path.

Regards.

former_member188791
Participant
0 Kudos

Hi Inaki/Indrajit,

In my scenrio even if I use processing sequence by date with EOIO,file adapter will pick up all the file by sequentially which I dont want , for example if 5 files arrived in the folder, PI adaper should pick up one file and then event will trigger , then post event in ECC I am triggering RFC I will be controlling communication channel to start and pick up next file for processing.

Here my question is in the Adapter how we can restrict to pick one file out of 5?

iaki_vila
Active Contributor
0 Kudos

Hi Rajiv,

You could have a unique name for the file to be picked. For example in the path a sender system has deposited the files A.txt, B.txt, C.txt, and you want to pick only the B.txt file, then as per my knowledge you have two options to ask to the sender system to send the file with always the same name or with name that you can make a pattern to difference among the all files, or you can change the name of B.txt from the RFC function if you have access to that file from ABAP.

Regards.

Former Member
0 Kudos

Hi Rajiv

Tell me why you want file adapter to pick only 1 file rather than the 5?

What is your main intention and what will happen if all five files picked up and get process one by one.

Former Member
0 Kudos

Hi Rajiv,

For your requirement ,you need to use a custom module/unix script in file adapter to put wait time in between files pick up .We worked on the similar scenario couple of months back .Sorry actually I'm on vocation other wise I could have shared the code to you now .I will try to share the code tomorrow if possible.

Regards

Venkat