cancel
Showing results for 
Search instead for 
Did you mean: 

value in .csv file getting replaced with zeroes

gurudatta
Participant
0 Kudos

Hi,

My scanario is from ECC-->file and .csv file is created in folder.but when one field is sent as numeric the first digit 0 is trimmed and last 4 digits rae trimmed and zeroes are added.I use the following configuration in receiver FCC.

value from ECC

ACC Document no--033914053300000010001

value displayed after processing from PI in .CSV file--33914053300000000000

when we send only numeric values this problem is occuring and if it contains even one alphabet the value is coming right

Accepted Solutions (0)

Answers (4)

Answers (4)

gurudatta
Participant
0 Kudos

Hi everyone,

I removed the company code field from mapping which i do not wanted to show in the .csv file

this is done. and i have written the UDF to create the file appended by company code-done

LBGVPFVPFPAR_0339(company code)20141119-143543-699(time stamp).csv---done

and i have done following simple configuration in FCC but still the generated csv file showing incorrect values

Z_ACNTDOC_NUMB--value sent from ECC--033914053300000009001

but value displayed in .csv file--33914053300000000000(wrong)

0-trimmed and 9001 trimmed

azharshaikh
Active Contributor
0 Kudos

Hi Guru,

Can you give the screenshot of your Data Type that your created for FCC.

Also as suggested by Hareesh, seems issue with the MS office version.

Can you try to  use the format cell option and changing the settings to general etc in your CSV file to check if its having correct values?


Regards,

Azhar

gurudatta
Participant
0 Kudos

Hi everyone,

I removed the company code field from mapping which i do not wanted to show in the .csv file

this is done. and i have written the UDF to create the file appended by company code-done

LBGVPFVPFPAR_0339(company code)20141119-143543-699(time stamp).csv---done

and i have done following simple configuration in FCC but still the generated csv file showing incorrect values

Z_ACNTDOC_NUMB--value sent from ECC--033914053300000009001

but value displayed in .csv file--33914053300000000000(wrong)

0-trimmed and 9001 trimmed

gurudatta
Participant
0 Kudos

Hi Guys,

I removed the field separator ; from the FCC i copuld see the correct value displayed in the .csv file but

The columns are not separated  by each other (A,B,C,D) columns

new output:

old output:

Former Member
0 Kudos

Hi Gurudatta,

As per requirement, you should keep the field separator parameter, but in field length maintain correct values.

Also, if the last column is not required in the file, then you should manage in the message mapping logic.

Regards,

Alka Panday.

Former Member
0 Kudos

Hi Gurudattta,

You have used .fieldSeparator along with .fieldFixedLengths, which is conflicting as per file content conversion.

Also, the fixed length that you have supplied, which is 50,  does not match with the ACC Document number field.

If you are not sure of the field lengths then I would advise you to use only the .fieldSeparator parameter.

Regards,

Alka Panday.

gurudatta
Participant
0 Kudos

Hi Alka,

Thank you for the reply,

I want to ignore the last field from displaying so for last field i have used fixed field lengths  so that i can ignore last field company code which should not be displayed in .CSV file

Former Member
0 Kudos

Hi,

In case that you have to use fixed field length, you will have to mention the correct field lengths for all the fields and remove the field separator parameter.

Regards,

Alka.

azharshaikh
Active Contributor
0 Kudos

Hi Guru


In case you want to ignore the fields, then handle it in the mapping by not mapping them to the target message.


Regards,

Azhar

former_member184720
Active Contributor
0 Kudos

which version of MS office you got? we had such issues in older version(i don't remember) where in long number gets rounded off.

However did you open with any other tools such as notepad++/wordpad?

I don't think you'll see that issue there.


Please share your findings..

gurudatta
Participant
0 Kudos

Hi Hareesh,

The same file when i open with notepad the correct value is displayed but there are some folders created on client servers where the file gets generated and we just double click that .CSV file and when i see the file the  1st digit zero is removed and last some digits are removed and its appended by 0000 from the second column field name-acct doc numb

former_member184720
Active Contributor
0 Kudos

So it's not an issue with PI or your configuration.

It's an issue with the Microsoft tools. Either you have to upgrade to newer version or use different tools to process these files.