cancel
Showing results for 
Search instead for 
Did you mean: 

File to XML: What happens if mapping fails

Former Member
0 Kudos

Hi experts,

When I am reading a CSV file via file adapter and I need to convert this to XML to be used by a proxy I understand that I can either use FCC or a mapping, right? If I need to use a mapping (maybe because FCC doesn't work for my file), what happens if mapping crashes for whatever reason. Is processing of the whole CSV file (all records) cancelled or only for the given row for which mapping failed. I would expect the latter, correct?

Thanks for your help!

Best Regards

Harald

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Harald,

you could split up the mapping to a technical and a functional part. In the technical part you parse the file and split it up to one message per row (for example). In the functional part you map these single messages. This way, if some of the functional mapping fails, it fails for just that record. However, if you have a technical problem parsing the file this is more difficult. You could write your code accordingly, of course.

Probably FCC is the simpler way to do the parsing.

Regards,

Jörg

former_member181985
Active Contributor
0 Kudos

Hi Harald,

It will be the former case i.e., Is processing of the whole CSV file (all records) cancelled

However, if you can manage to skip failure records in mapping using some logic then you can make it your latter case what you are expecting

br,

Praveen Gujjeti

Former Member
0 Kudos

That means if mapping fails no records will be processed by PI at all (except I manage to catch mapping errors by some mapping logic) and the whole file is in error state.

And with FCC? The same?

BR

Harald

former_member181985
Active Contributor
0 Kudos

Hi,

Yes, the whole file message will be in error status until unless you do some special logic to filter out error records

>>And with FCC? The same?

Since I am not sure about your exact requirement, I recommend you to go through the FCC SAP help: Converting Text Format in the Sender File/FTP Adapter to XML - Advanced Adapter Engine - SAP Librar... since there is option for missingLastFields, additionalLastFields etc.. in FCC

BR,

Praveen Gujjeti