engswee / equalize-cpi-converter

CPI Converter a.k.a. FormatConversionBean for CPI
MIT License
17 stars 10 forks source link

PlaintoXML issue with field separator #7

Closed NittyVeer closed 3 years ago

NittyVeer commented 3 years ago

Hi Engswee,

I tried to convert a tab delimited file to xml with format conversion bean. Can you guide me how to define tab as field separator in exchange properties. I used multiple options and nothing seems to work.

attaching iflow, input and output here test.txt IF_COVANCE_to_S4HANA_IntercompanySTO.zip EndEvent_2 (1).zip

Thanks, Nithya

engswee commented 3 years ago

Hi Nithya

The issue is with the single quotation marks enclosing characters used in the field separator field. Somehow the SAP Community Portal renders the "straight" quotation marks into slanted quotation marks. So '0x09' is displayed as ‘0x09’ which is incorrect.

Once I changed it to '0x09' in the IFlow's properties, it is working fine.

Also, from your record structure, I don't think CovanceMaterialNumber field will have unique values that allows it to be used as a key field. Since you are using genericRecordType, the parameters Record.keyFieldValue and keyFieldName are not required.

Attached is an updated version of the IFlow with the parameters corrected.

IF_COVANCE_to_S4HANA_IntercompanySTO (1).zip

If you test with the input file, the output XML will be generated correctly as shown below.

image