cancel
Showing results for 
Search instead for 
Did you mean: 

xi , file adapter problem

Former Member
0 Kudos

Hello every body,

I have a simple file adapter scenario that transfers files from one directory to another,

files are written to the source directory in high resolution, so i set a low Poll interval,

the problem that the scenario reads files while they are being writen in the directory.

How can i prevent something like this

thanks in advance

Morad zeidan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Morad

I am not clear about ur question,If i am not wrong u are trying an FILE->XI->FILE scenario .....right

and u have set poll-intervals just give me an clear picture about the error u are getting if u are trying foran

file to file interface the below link may help u a lot

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

SAP Help for sender

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

SAP Help for receiver

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

For more information u can have

https://help.sap.com

hope this may help u

Regards

Azeez khan.

Former Member
0 Kudos

Hi Azeez

thanks for your reply

You are right, i have file -> xi -> file interface

and its working just fine, but , the files in the source directory are written by another program, and there are many files like these , the problem that sometimes my scenario try to read the file from the source directory while the other program didnt finish writing it.

and it causes a problem. i am looking for a solution to read just closed files.

thanks again

morad zeidan

Former Member
0 Kudos

The solution is simple for this.

In the sender file adapter there is an option in the advanced mode called WAIT FOR SEC, this will check wether the file size is constant or changing before picking up the file.

In your case since the polling sec is less like 5 sec, so the file adapter will pick up the file from the source folder in 5 sec, irrespective wether the file is completely written or not, so in case file is still written by other program then it is a problem, for this the sender file adapter gives you option to wait and check wether the external program is still writing to the file or not, this you can specify in the Adavanced mode, wait for sec when you give value as 10 sec then the file adapter will go to the source folder every 5 sec as the polling frequency is that, then it will wait for 10 sec to check the file size is changing or not if it is changing, means if the external program is still writing the data it will wait for another 10 sec..this will continue till the file size remains constant.....

Former Member
0 Kudos

Hi Azeez,

Thats exactly what i want.

I have Xi 3.0 sp21

I cant see this option.

what shoud be exactly written ?

thanks

morad zeidan

Former Member
0 Kudos

Exactly it supports on your SP 21 and XI 3.0......

Goto the edit mode in the sender file adapter, scroll down the file adapter details, at the down you will see the unchecled option called advanced mode...check this and you will get the option...that should solve your problem

check this

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

File adapter :

Advanced Mode

To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.

● Msecs to Wait Before Modification Check

Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.

This parameter is not available if you have selected File Content Conversion as the Message Protocol and then made an entry under Recordsets per Message that splits an input file into several messages.

● Maximum File Size

Specify the maximum file size in bytes.

The adapter only processes files that are smaller than the specified size. An error occurs if files are any larger.

● Table

Specify the additional parameter names and parameter values in the table.

Additional parameters are published in SAP Note 801926.

Regards

Azeez khan

Former Member
0 Kudos

Hi

Thanks Alot Azeez,

It solved my problem,

thanks

morad zeidan

Answers (0)