cancel
Showing results for 
Search instead for 
Did you mean: 

how to do the error handling for a file consists many records

Former Member
0 Kudos

Hello all,

we have a scenario where we are receiving a flat file to xi which consists of let say 100 invoices. if out of this 100 invoices suppose 21 to 30 are bad invoices(in term of data/format) then what is going to happen?

1. does the complete file going to fail?

if yes how is it possible for xi to trace/catch the bad records and notify to the source system/people?

2. or will the first 20 pass and then next 21 to 30 going to fail and 31 to 100 will pass?

if the above said way is possible then what are the different ways/steps to be taken in order to acheive that.

Thanks a lot in advance

(points will be awarded to the usefull answers)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey

XI does not pass partial files,in case even 1 record is bad in ur file,the whole scenario wont work at all and will thro a mapping error.

u can handle this thing in message mapping or in conditional receiver determination

thanx

ahmad

Former Member
0 Kudos

thanks ahmad.

so you are saying that in any way it will not posiible for xi to parse good records and pass them in the list of records in a the file?

then is it possible for xi to find out which records are bad records out of the list of records in the file? i mean can we find/how to find the bad records .. is there any way?

thanks

Former Member
0 Kudos

Hey

u can do a message mapping which takes the payload and checks for any errors,wat i mean is that XI wont do partial file transfer,suppose in ur file u have only 1 record which has 100 fields,now if few fields are wrong,the whole payload will cease to pass through.

u can have a message mapping which checks for any errors and eliminates the whole recordset in case of any error in any of the sub structures.

thanx

ahmad

Answers (2)

Answers (2)

prabhu_s2
Active Contributor
0 Kudos

u can thiunk for going for message split. and using bpm (block: parforeach)u can send one message at a time. this might not get stuck in a queue if one of the invoice fails. and for those failed invoice u can keep the user notified thru alert configuration.

Former Member
0 Kudos

thanks prabhu

ok if that is the case then let say we have thousands of invoices in 1 file. then according to your suggestion if i use message split and bpm and do each message at 1 time then is it not going to affect the server or performance since it has to deal with the thousands of messgaes individually?

please advice

thanks

prateek
Active Contributor
0 Kudos

Hi Sree,

The server performance in terms of "Message stuck in queue" will be affected less. But anytime if u send a big file in XI, the performance is always adversely affected.

Go for this approach if it suits ur scenario

/people/sravya.talanki2/blog/2005/11/29/night-mare-processing-huge-files-in-sap-xi

Have a look here

/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi

Regards,

Prateek

Former Member
0 Kudos

Hi Sree,

It seems that you require some additional functionality to process partial files depending on the data send by the source system. There are certain aspects I would like to highlight. What ever solution provided to you is correct, XI cannot parse a partial file.

Can you answer the following queries that I have?

1. Do you expect all the values from the source XML to be validated using user defined functions or standard functions ?

2. If it is standard functions, error handling cannot be used.

3. Incase of using UDF's we can trap exceptions and then take proactive actions against each of the exceptions that you can forsee. By doing this, you can avoid the possibility of mapping error and then process partial files.

Please let me know the functionality reqd. for the interface.

Indranil

Former Member
0 Kudos

thank u very much ahmad

thank you very much indranil. please see below

<<

It seems that you require some additional functionality to process partial files depending on the data send by the source system. >>

--so what are the additional functionalities i need to use? can you please elaborate on this.

<<

Can you answer the following queries that I have?

1. Do you expect all the values from the source XML to be validated using user defined functions or standard functions ?

2. If it is standard functions, error handling cannot be used.

>>

-- so in this case error handling is not possible in any way and the complete file will be rejected..rigth.

<<

3. Incase of using UDF's we can trap exceptions and then take proactive actions against each of the exceptions that you can forsee. By doing this, you can avoid the possibility of mapping error and then process partial files.

>>

--so you are saying that we can handle partial file by using UDF's. how to use these ..is it in mapping then in that case you are saying that the file comes in to xi even though some of records are bad (is this done by file content conversion) and in mapping by using UDF's do we need to work on each record? if so lets suppose if we have thousands of records in an file then, for working on each record separately will there be any performance issues?

thanks a lot in advance