cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter (sender) module throws exception, but adapter proceeds again

Former Member
0 Kudos

Hello dear reader,

I wrote a module that converts a flat file into XI-XML and tested it within the file adapter. It works fine so far. But if I force the module to throw an exception to handle an erroneous flat file, the file adapter tries to proceed the erroneous file again and again. Not very nice, isn´t it?

Has anybody an idea, how to configure the file adapter to stop the processing of an erroneous file?

Thank you in advance

Yours

Frank Waskow

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

In SP10/19 there will be a new parameter in the sender adapter.

http://help.sap.com/saphelp_nw2004s/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm

Hope that helps

Stefan

Former Member
0 Kudos

Hello Stefan,

I thank you for your answer. Unfortunately I couldn´t test your tip, we´re still on support package 9. So I´ve to be patient for the next weeks. But I´ll keep you informed.

Bye

Frank Waskow

bhavesh_kantilal
Active Contributor
0 Kudos

Frank,

In your sender file adapter what is the mode you have set?

Regards

Bhavesh

Former Member
0 Kudos

Hello Bhavesh,

I suppose you mean the <b>Processing Parameter</b> <i>Processing Mode</i>; it set to <i>Archive</i>.

Regards

Frank

Former Member
0 Kudos

Frank,

There is a setting in visual administrator for a no. of retries on file adapter. If you set to 3 it tries for three times. So depending upon this number the file adapter retries.

If you change this it will make all the file interfaces effected. So before changing just make sure.

---Satish

Former Member
0 Kudos

Hello Satish,

I couldn´t find this property for the file adapter but for the XI adapter in general. It´s set to 3 for xiadapter.inbound.numberRetries.default as well as for xiadapter.outbound.numberRetries.default. So it seems, that wasn´t the solution, sorry.

Regards

Frank

Former Member
0 Kudos

Frank,

Sorry it will be not on File adapter. It will be only in SAP XI Adapter only.

Check this weblog it may help you:

/people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically

---Satish

Former Member
0 Kudos

Hello Satish,

the weblog doesn´t describe my problem correctly. Let me show you the Audit Log from the Messeage Display Tool of the Adapter Engine:

Audit Log for Message: 06ff54a0-a258-11db-b9e2-003048226013
Time Stamp	Status	Description
2007-01-12 16:14:49	Success	Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:14:50	Error	Attempt to process file failed with null
2007-01-12 16:15:00	Success	Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:15:00	Error	Attempt to process file failed with null
2007-01-12 16:16:00	Success	Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:16:00	Error	Attempt to process file failed with null
2007-01-12 16:17:00	Success	Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:17:00	Error	Attempt to process file failed with null
2007-01-12 16:18:00	Success	Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:18:00	Error	Attempt to process file failed with null

It seems to me that the Adapter gets the error of the module, but it is not handled as an error like shown in the blog <a href="https://answers.sap.com/people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically:///people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically.

The adapter tries to proceed the same file again and again, till I delete it from the source directory.

Any more idea?

Frank

Former Member
0 Kudos

Hi Frank,

i suggest a workaround for your this problem.......see your adapter module is working fine for a non-error text file.........you just want that if the file is having error, it should not be reprocessed again.......in your adapter module code, when you check for error then if you find an error in your source file, then in the audit log after writing the error message, you can move your file to a different directory....so in this way all your error files will be moved to a particular directory and all your non-error files will be processed normally.........since you will be moving your error file to a differernt directory, so your file adapter cannot again pick your error file.

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hello Rajeev,

I thank you for your answer. You suggested to move the error file to avoid reprocesssing. The idea sounds good and I tried to do so some time ago. But I couldn´t find any possibility to move the file (I don´t want to do it manually ) from inside the module. And so this may be better, because the module is called by the moduleprocessor and gets a message (not a file) delivered by the adapter. It shouldn´t do adapter work. But if you know, how to tell the adapter from inside the module to move a file, please let me know.

Thank You

Frank Waskow

Former Member
0 Kudos

Hi Frank,

in your adapter module code, see from dynamic configuration, you can get the filename of your source file...

after doing your procesing, if you find any error in conversion from Flat file to XML, then move the file by using its name, its source directory and its target directory.

Thanks,

Rajeev Gupta

Message was edited by:

RAJEEV GUPTA