cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping IDOC to CSV file - Missing blank field values in CSV file

Former Member
0 Kudos

Hello:

I am mapping an IDOC to a .csv file, using File Content Conversion. I specify comma as the value for the parameter 'fieldSeparator'. I get a .csv file, but blank field values are missing in the .csv file.

For example, if the .csv file format is <field1>,<field2>,<field3>

and if <field2> is blank, then the .csv file contains

<field1>,<field3>

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

have you tried using exists + if functions in your mapping?

http://help.sap.com/saphelp_nw04/helpdata/en/db/83f7b88528424c9113b15d5e0fb516/content.htm

try: if source element does not exists then map a single space

maybe this will work

Regards,

michal

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bac,

As long as the XML that goes to your File Receiver Channel contains the elements, even if they don't contain values, it should work fine.

For example:

<field1>data</field1>

<field2></field2>

<field3>data2</field3>

I suspect that your XML looks like the following:

<field1>data</field1>

<field3>data2</field3>

If this is the case you can update your map. You shouldn't need to put a space, just make sure the element gets created.

Thanks,

Jesse

Former Member
0 Kudos

Hi Bac,

I agree with Michal,

If you are not giving any value in <field2>, and only in <field 1> and <field3> then the scenario would work taking the default case i.e. values have been provided for only field1 and field2 respectively.

You need to give a space at the sender side to get the desired output.

I hope it helps,

Thanks & Regards,

Varun Joshi