Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

gui_upload CSV problem

Former Member
0 Likes
1,131

Hi Guys,

I am facing problem in gui_download FM,kindly help ASAP pls.

itab which I am passing in FM is comma seperated and fields are thousand seperated so they contain comma as well

.As the FM is seperating the fields at comma , so for eg if field value is 123,45.90 ..it is seperating the field at 123 and 45.90 ...please help.

5 REPLIES 5
Read only

Former Member
0 Likes
863

take another field

when you are getting from internal table concatenate them

Read only

Former Member
0 Likes
863

You need to change one of them to avoid the confusion for Function Module.

Read only

former_member723628
Active Participant
0 Likes
863

Naveen,

For any comma separated variable length (.CSV) file you can not have commas in a numeric field. Every occurance of comma identifies beginning of new column. For csv file if comma is part of value then that value needs to be delimited by double quotes like below. This rule applies to all types of fileds.


Mr. A,"278, Wallnut Street",London,UK,"132,323.34"
Mr. B,"123, Chestnut Street",London,UK,"2,342,091.23"

The easiest way to handle this situation is convert the comma containing fields to character type and concatenate double quote sign ( " ) at the beginning and end of the value.

Hope this helps.

Gajendra

Read only

Former Member
0 Likes
863

Hi Naveen,

Its the excel settings when installed.

I faced similar issue but realised the below things:

1. CSV is charactr separated file and not just comma.

1. Indian or Asian or USInstallation of excel gives a CSV file as comma separated and the currencies are with decimals.

like : abc,122.55,555.00

2. European countries ue the comma as a decimal separator.

Here the CSV is semicolon seprated.

like : abc;122,55;555,00

This way in our case we applied the following logic.

If string CS ';' then delimeter = semilolon and comma are in currncy.

else

delimeter = comma and decimals in currenc.

The CSV files when generated by excel gives this.

If you try to create the test data yourself in notepad, its not the correct way.

Hope this helps.

Read only

Former Member
0 Likes
863

a