on 12-03-2014 11:37 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.