cancel
Showing results for 
Search instead for 
Did you mean: 

Partial File pickedup.

vijay_b4
Active Contributor
0 Kudos

GM All,

I have an issue...Customer running a program from their end and placing a file in particular directory, and PI pickup the file and process it, but we faced a issue..the file is not yet completely downloaded but before that pi grabbed the partial file and sent the partial file to another location. Customer don't want to change anything at their end, so is there anyway we can restrict PI to pickup the file until its completely downloaded...

thought of scheduling, but in this case it will not work as customer is not having standard time to run the program.

Thanks,

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Vijay,

Are you using NFS or FTP to pick up the file.

  • If it is NFS you can use Msec to wait before modification
  • If it is FTP then sender needs to create the file in staging directory and after completely written then move it to main directory where PI is polling the file for.

Regards,

Praveen.

vijay_b4
Active Contributor
0 Kudos

It is FTP, and sender don't want to modify anything from his side, so any options at PI end...

Thanks

former_member182412
Active Contributor
0 Kudos

Hi Vijay,

  • We cannot do anything in PI side, the work around mentioned in the note which refereed above.


If this option is not available for the settings you would like to use, the following algorithm (to be implemented in your application) may be used to ensure that the File Adapter only processes completely written files:

  • Create the file using an extension, which does not get processed by the File Adapter, e.g., ".tmp"
  • Write the file content
  • Rename the file to its final name, so the File Adapter will notice its existence and pick it up

  • Or you must have PI 7.31 SP18 to handle it in PI side.

Regards,

Praveen.

vijay_b4
Active Contributor
0 Kudos

thank you all, I already passed these ideas like

1. creating temporary file name and renaming it

2. placing the file in temporary directory and once complete, move it to the original directory where PI looking for

But for both the suggestions, they said they are not going to make any change as it is a standard program which has been shared with many other vendors it seems...so they can't make any change

Is something can be done at the abap end...so i take help from abapers...

Thanks,

Vijay

former_member182412
Active Contributor
0 Kudos

Hi Vijay,

  • Then you can create a ABAP program that start and stop the PI sender file channel.
  • So you need to call this program after the first program finish in ERP.

Regards,

Praveen.

vijay_b4
Active Contributor
0 Kudos

But how ABAP program will know that file is completely downloaded?

Thanks

former_member182412
Active Contributor
0 Kudos

Hi Vijay,

You schedule the background job with 2 steps, first step is your first program to create the file, second step is start the channel, so after completely written the file only the second program will start the channel and PI will pick up the complete file.

Regards,

Praveen.

Answers (2)

Answers (2)

Eoin_Kierans
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Vijay,

For this type of situation you can use the parameter MSecs to Wait Before Modification Check. Please check the below documentation

Configure Sender File Adapter

https://help.sap.com/saphelp_nw73/helpdata/en/44/682bcd7f2a6d12e10000000a1553f6/frameset.htm

You can also check section 3 of the SAP Note 821267 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 / PI 7.3 File Adapter.

Regards

Eoin

former_member186851
Active Contributor
0 Kudos

Hello Vijay,

Get the time frame in msecs like how much time the file will be ready to be picked.

Based on that configure msecs wait before modification, This will wait for the time maintained then the file will be picked. But there are some restrictions, refer the below links

Msecs to Wait Before Modification  Check | SCN