cancel
Showing results for 
Search instead for 
Did you mean: 

sener file adapter has read/pick the files first in first out method.

Former Member
0 Kudos

HI

In my Interface I am Using Sender as File adapter. As per my requirement Sender file adapter has to read the file from file directory. This directory having 1000u2019s of files with some files are same name (time stamp is different) and some files are different name here file adapter has to pick the file with mentioned name in File sender adapter like ZMPSMSGSTATUSMST-.xml .

But source file name is like <TABLENAME>-<TIME_STAMP>.XML (ZMPSWRKFLOWHIST-20090527-150522-628) in file directory.

The file adapter in XI will poll to this directory and picks the file in first- in first-out by sorting according to timestamp.

To do this configuration what I have to do in sender file adapter please give me your valuable inputs.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
The file adapter in XI will poll to this directory and picks the file in first- in first-out by sorting according to timestamp.

Check this link from help:

http://help.sap.com/saphelp_nw70/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm

From the link:

● Processing Sequence (for transport protocol File System (NFS))

If you used placeholders when specifying the file name, define the processing sequence of the files:

○ By Name: Files are processed alphabetically by file name.

○ By Date: Files are processed according to their time stamp in the file system, starting with the oldest file.

Regards,

Abhishek.

Former Member
0 Kudos

Hi Abhi,

Thank you for reply. Please allow a further question:

Yes i selected by Date in Processing sequeince. But here i am able to maintain in sender file adapter under file access parameters I maintined file name lke Zzzzzzzz.Xml.

but this file name is in file directory is like this Zzzzzzzz-20090527-150522-628.xml( here file name with time stap is maintained). so, my file adpter has to read all files (what i given in under file access parameters)

how to do this plz tell me

Thanks

Srinivas

Shabarish_Nair
Active Contributor
0 Kudos

the file sequence will be maintained only if you are using NFS as the protocol. In FTP, it will not be supported.

former_member200962
Active Contributor
0 Kudos
Yes i selected by Date in Processing sequeince

you also need to mention a place holder in your FileName field.....it is mentioned in the help link iteslf..

If you used placeholders when specifying the file name, define the processing sequence of the files:

so you need to mention the filename accordingly with a placeholder so that while checking for the files the adapetr will correlate the placeholder and the value selected in processing sequence.....check this out...

Regards,

Abhishek.

Former Member
0 Kudos

Hi Abhi,

Can i put please holder as *' * '.* like Zabcd.xml.* if i put like this it will read all file names with Zabcd--20090527-150522-628.mxl and Zabcd -20090527-150524-530.xml. is it right?

Thanks

Srinivas

Former Member
0 Kudos

Hi

my scenario is not FTP. NFS only.

can put * as a place holder under file access parameter File name?

like Zabcd*.xml. it will work? or not?

Shabarish_Nair
Active Contributor
0 Kudos

Yes it will work if it is By Name option.

Former Member
0 Kudos

Hi vijay,

But i want read the file adapter Firt in first out method?

you told file processing sequence is with name only plce hoder * will work.

thanks

Srinivas

former_member200962
Active Contributor
0 Kudos

>

> Hi vijay,

>

> But i want read the file adapter Firt in first out method?

> you told file processing sequence is with name only plce hoder * will work.

>

> thanks

> Srinivas

check the help link iteself:

By Date: Files are processed according to their time stamp in the file system, starting with the oldest file.

so it means FIFO....as you need

Regards,

Abhishek.

Former Member
0 Kudos

Hi vijay,

Here my requierment is File adapter has to read the files FIFO method. but file folder is having 100's of files with same name and different time stamps.

like

ZMPSWRKFLOWHIST-20090527-150522-628

ZMPSWRKFLOWHIST-20090527-150522-720

here file name is same(ZMPSWRKFLOWHIST) but time stanmp is different (20090527-150522-628 & 20090527-150522-720)

so what can witer in file access parameters File name (bcz file name is same but after file time stamp is doffferent).

Shabarish_Nair
Active Contributor
0 Kudos

just give the file name as

ZMPSWRKFLOWHIST.

and use the option to process in sequence via the file name as discussed early in this thread

Former Member
0 Kudos

Hi,

If i select processing squence FIFO will workout or not?

Thanks

srinivas

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi,

>

> If i select processing squence FIFO will workout or not?

>

> Thanks

> srinivas

Yes !!!

former_member200962
Active Contributor
0 Kudos

yes it will work...it is configured to work in this manner only......had it been Last in First Out then there had been a problem.......so you can go ahead and test

Former Member
0 Kudos

HI Abhi,

Thank you for your spot replay.

I tested now but i am geting below error.

Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID f4ca4f86-9c5d-4bdd-1fb1-a6bd7cda99a8(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: [NWMss][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK__XI_AF_MSG__491A1D0B'. Cannot insert duplicate key in object 'dbo.XI_AF_MSG'..

Could not archive file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-628.xml' after processing

but i am able to see this file in Archive foleder. once file is archivied sucessfully the same file is delted from source directory?

I given processing parametes queue name is TEST.

Thanks

srinivas

Edited by: srinivasreddy p on May 28, 2009 8:43 AM

Edited by: srinivasreddy p on May 28, 2009 8:52 AM

former_member200962
Active Contributor
0 Kudos

use the Delete mode and check once again...or if the mode is archive....here if the file is not deleted after archive then this can also be a cause of error.

Former Member
0 Kudos

HI Abhi,

Yes,

i selected delete process mode the file is not deleting from sourece folder. I am getting below error.

Could not delete file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-658.xml' after processing

As per my requierment i need to archive file then it was delte from source folder. please hepl me how to do this.

former_member200962
Active Contributor
0 Kudos
Could not delete file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-658.xml' after processing

are you sure that the user has full rights to carry out a Read , Write, Delete the file from the said folder

Regards,

Abhishek.

Answers (0)