cancel
Showing results for 
Search instead for 
Did you mean: 

Suggessions required for File----XI----Idoc Interface

Former Member
0 Kudos

Dear All,

I have developed File-XIIdoc Interface and works fine.

Query: When the Source application is trying to write the data into file, XI needs to wait until it completes

Once the writing is completed then only XI has to pickup the file from Source location.

If XI is not checking this check point, File adapter is picking up the file in the middle of the data writing itself.

Please suggest me your thoughts and experience on this

REgards

Suman

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Suman,

One really easy way is to have the source system create the file with a temporary name, then when the writing is complete to rename it to the file naming scheme that you have identified in your communication channel.

Mike

Former Member
0 Kudos

Mike,

I read all these suggestions before posting this thread.Source application might not accept this.

But really i am looking to do this in XI itself.

There is no way to do this in Our XI itself???

Regards

Former Member
0 Kudos

Ok, another option (which I haven't used before but seems like it should work) is to use the advanced parameter "Msecs to Wait Before Modification Check".

Former Member
0 Kudos

Mike,

I am using "FTP", this works with NFS only that too in XI 3.0 & PI 7.0

Option is not there from PI 7.1 onwards

Regards

Former Member
0 Kudos

Suman,

if you are sure of the time interval or delay, you can write a UDF with

thread.sleep(mSec)

else let us know more about the check needed to be performed in details

Venkat.

Former Member
0 Kudos

Ah, well then I guess I can't help you - I'm on an older version of XI.

Good luck!

Mike

Former Member
0 Kudos

Hi,

>>thread.sleep(mSec)

is used to wait the message processing inside XI process not to wait while file is writing by source application.

Once the file is picked up by sender file adapter then this thread.sleep will works

But what iam looking is to file itself should not pick the file while source application is writing.

>>if you are sure of the time interval or delay, you can write a UDF with

Not sure abt the time when it arrives, this is continues flow, as soon as the delivery sent from sap to FTP, FTP inturn sends some thing immediately

Suggest me ....

Regards

Former Member
0 Kudos

my mistake, mis understood the requirement.

SAP Note # 821267 suggests to use temp name for the file but since you turned that option already, you can use any one of the following options

1. If you are using NFS, you can write a simple script that can transfer the file from folder a to b, and XI can pick the file from folder b.

2. Second option would be to use java proxies, but wud be a tougher.

3. Download SAPBASIS71006_2-20000889.ZIP(for bringing the msecs to wait option-might work in your SP) from SAP market place to view "Msecs to wait before modification check" parameter back .

Venkat.

former_member187339
Active Contributor
0 Kudos

Hi Suman,

The correct approach will be to first write it as a tmp file and then rename it to your type. But if you are not looking for this solution, then the next best approach will be to write a module program which will check for the filesize for an interval of say 30 sec (after polling interval) and then of the file size doesn't changes, then it picks and delete the file. Later it will send to PI's integration server

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

As i dont have the first option, i have to go for second one.

>>best approach will be to write a module program which will check for the filesize for an interval of say 30 sec (after polling interval) and then of the file size doesn't changes, then it picks and delete the file. Later it will send to PI's integration server

Could you please suggest me how to start this approch, cause i have no idea abt this. pls suggest

REgards

former_member187339
Active Contributor
0 Kudos

Hi Suman,

For writing a module please check the blog and articles in SDN.

The module logic should be as follows:

1. it should read and store intermeidiately the size & filenam of all files present in the folder.

2. do a wait of say 30 sec in the module (by sleep or any other such waiting command of java).

3. Then recheck the size of only those files read in step one (don;t read entire files present in folder now as some new files may have been created in this 30 seconds sleep time)

4. If the file size changes don't do anything else send the content to PI and /archivethe file (should be done inside the module code)

5. Keep the file sender channel in Test mode (as the module will do the necessary archival/deletion)

PS: This blog can be a starting point for you /people/sandeep.jaiswal/blog/2008/05/13/adapter-module-to-stop-processing-of-duplicate-file-ftp-location

Regards

Suraj

Answers (1)

Answers (1)

Former Member
0 Kudos

Following Intermediate folder concept