cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer Large file (no maping) and trigger a proxy

Former Member
0 Kudos

All,

I have a scenario, where I need to transfer a large file (say 200MB) from ftp server to NFS and once the file is written I need to trigger a proxy message (which should include source filename) that triggers sap program that consumes this file.

Any ideas on how this can be accomplished.

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member257758
Participant
0 Kudos

Hi Vicky,

Which version PI you are using? Here are my 2 cents.

Create 1 sender interface

           2 Receiver Interfaces (1 for file and another for proxy)

Create 2 dummy mappings with some fields.


Create ICO, add 2 receiver interfaces at the receiver determination , one for file --> file and 2nd one for triggering proxy(Select maintain order at Runtime in the Receiver interface tab).  That way file will be processed first and then proxy gets triggered next.


Also I have question, What values you are trying to pass to proxy, You can pass the filename, SAP application server path(file location path) so that ABAP program can read the file .


I hope this help.


Arun


Former Member
0 Kudos

My greetings to Vicky!

I don't know details of your environment, so following is only my approach to deal with your task.
Assume you have three components:
FILE_SRC - for sender
FILE_DST - for receiver
ERP_D - ABAP Proxy system

You should create objects at Directory:
ICo: |FILE_SRC|{dummy_namespace}dummy_large||
CC: |FILE_SRC|LargeFile_File_Send with EOIO, ASMA and File Splitting mode
CC: |FILE_DST|LargeFile_File_Recv with using ASMA

The idea is to set receiver determination rules as follows:
* Chunks ## 1..n-1 are not transported to ERP_D
* Last chunk is transported to FILE_DST and ERP_D

For traditional dynamic variables and context objects, there is full support for Receiver Determination, but for {http://sap.com/xi/XI/System/Generic}ChunkMode you have to write your own Enhanced Receiver Determination which will return either 'FILE_DST' or 'FILE_DST+ERP_D'.

As for last chunk processing, you have to implement especial operation mapping from {dummy_namespace}dummy_large to your ABAP proxy where to develop function checks adapter engine detail for transporting last chunk.
Because all chunks are subject of one EOIO queue, in my humble opinion the scenario is well-designed.

Former Member
0 Kudos

lliya,

Now we are thinking in same line...I have created a similar design but my challenge is how to tell the system when the last chunk arrives to execute the last mapping.

In my design I have one sender and one receiver. one sender channel file and one receiver channel file and one receiver soap channel (as this is an ICO scenario) to trigger the proxy.

In interface determination I have two entries the first one uses a dummy interface and is used as passthrough

the second is for proxy with mapping which has dummy sender mt and a  proxy structure in the target. All I am populating in the target is the filename that I am reading in the mapping using dynamic config.

I have maintain order at run time checked.

now the challenge is that proxy message is getting trigger for each chunk

So i started exploring the option of using chunk method with value 'End' that will determine the last chunk and trigger the proxy message.

But how do I use that in receiver or interface determination. Standard context variables do not have generic contexts.

Former Member
0 Kudos

Hello Vicky,

you can't refer to ChunkMode dynamic configuration at Interface Determination, so the only way to use enhanced receiver determination and to determine Abap proxy in RD.

Former Member
0 Kudos

I am now using enhanced receiver determination mapping. But now the challenge is how to sequence the last chunk.

How do I ensure that the file will be written first (last chunk) and than only the proxy will be triggered. For now they will be triggered in parallel for the last chunk.

Please take note 'Maintain order at runtime' is only applicable with the same receiver.

Muniyappan
Active Contributor
0 Kudos

few suggestions.

create two scenarios

1. File to File

to place the files in app server. use os command to create one empty file in the PI server with same sender file name.

2. file to proxy

this scenario picks the empty file and sends the filename to proxy. once proxy is triggered run your report program which will process the file using filename.

else you convert this whole into  file to proxy and split the file using FCC taking Recordset per message parameter.

Former Member
0 Kudos

Step one will not work as OS command will be executed everytime a new chunk is processed.

azharshaikh
Active Contributor
0 Kudos

Hi Vicky,

You can split it into 2 flows:

1. For FTP to File transfer: You can use ICO with Dummy Interface names and define the Chunk file size transfer option in your Sender FTP channel as shown in following:

2. In the Next flow (File to Proxy): You can Read the filename and send  it to the Proxy Structure as per your business logic

In both flow you can use ASMA options to get the filename.

Hope it helps

Regards,
Azhar

Former Member
0 Kudos

Vicki needs to trigger proxy AFTER file was written.

azharshaikh
Active Contributor
0 Kudos

Hi,

Yes, that check can also be applied in the Sender File Channel (of the 2nd Flow)

>>> Advance Mode --> Msecs to Wait Before Modification Check option...

So once the Entire file is written, then it will get triggered.

Hope it helps

Regards,
Azhar

Former Member
0 Kudos

Azhar,

I agree with the first step and thats what I have already done in my scenario. However my challenge is in second step

In the second step, I do not want to pick the file once again. I just need to read the filename and send it to proxy. How can I read the file name without picking the file 🙂

Thanks