cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI: More proxy calls to ONE file only

Former Member
0 Kudos

Hello gurus,

could you have a look at following scenario Proxy to File? We are sending large amounts of data (40-50MB), but because of PI performance we should reduce single XI messages to 4-5 MB size. We use customer file adapter copied from standard with additional feature which sends data to remote system (similar to ftp).

Idea is to call proxy more times inside program, send data in more single transactions to PI (like each 10 tsd records), but at the end there have to be ONE file only. How to configure file adapter that it has to keep file open and wait until last proxy call was made and after that send file to remote system. How to call proxy more times and create one file only?

Any ideas how to do that efficient way?

Thank you

Marian

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member181962
Active Contributor
0 Kudos

Hi,

You can proceed in the following way.

In the ABAp proxy, write your code like this:

loop at itab into wa.
if v_packet = <some number>
v_packet = 0.
endif.
v_packet = v_packet + 1.
wa_temp = wa.
append wa_temp to itab_temp.
clear wa_temp.
* Call the proxy

endloop.

On the receiver file adapter, you should have the file in append mode.

Regards,

Ravi Kanth Talagana

former_member181985
Active Contributor
0 Kudos

Hmm..We to faced the same issue...We used this solution..

Add extra field fileName to the proxy structure and regenerate. Remember this fileName field has no importance for the receiving application. we can send the actual intended message to the receiving application by doing a mapping. Use dynamic configuration within mapping to read this filename and set it as file name for FileAdapter.

Programatically generate a single filename (with DataTime stamp) in the ABAP report for all chunks pertaining to one transaction (per ABAP report execution). In the receiving file channel use "APPEND" as construction mode (ASMA should be enabled for FileName)

Regards,

Praveen Gujjeti.

Edited by: Praveen Gujjeti on Jan 25, 2010 6:52 PM

Former Member
0 Kudos

Hi guys. Thanks for replies.

But how to say to File adapter, hold file open, do not send it to remote system, until last succesfull proxy record arrives.

Thanks

Marian

former_member181985
Active Contributor
0 Kudos

The receiving system would be intrested in a particular filename for processing (say e.g., FILEDATA_YYYYMMDD.xml).

So send the filename from ABAP report as ZFILEDATA_YYYYMMDD.xml for all chunks except the last chunk. For last chunk send FILEDATA_YYYYMMDD.xml as filename.

Use script in the file channel to handle it accordingly.

Regds,

Praveen Gujjeti.