cancel
Showing results for 
Search instead for 
Did you mean: 

ASCII vs. CSV

Former Member
0 Kudos

Hello,

What are the advantages of loading ASCII file over CSV file and vice versa ? I know the what they are but I'm not sure what the best practice using either one of them. It would be great if someone can give a real life example and experience

Many Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Uncle D,

Between ASCII and CSV I use CSV almost exclusively and I find this is the most common format to request data from other people and applications that I don't have a DB Connect to - probably a defacto standard you could say.

CSV is more robust and easier to generate although issues arise with delimiters accidentally getting embedded in some data fields - usually comment/long text fields. Selection of an uncommon delimiter (e.g. "|") usually solves the problem.

ASCII is meant to be faster I understand, however nowadays the performance issue is marginal and would perhaps only be of significance on very high volumes.

Former Member
0 Kudos

The ASC file format got changed after I've posted the message. Consider that the ASC file have the fixed column length in all the rows. It doesn't vary from row to row where as it may vary for CSV

-Shashi

Former Member
0 Kudos

Hi,

The basic difference between ASC and CSV is the "Column Width.

ASC format has fixed column width for each field where as in CSV, each field is seperated by a character like ",".. (The seperator could be anything otherthan comma like "|" or any character.

At the time of data load, we will select the file format based on the source file provided.

Ex:

ASC file: (Extension ".txt")

Sl No Name Country Category

0010 Charles USA A

0011 David UK B

In the above example, each field has a fixed length no matter of the value (SlNo (10), Name(20), Country(10), Category(10))

CSV file: (Extension ".csv")

Sl No,Name,Country,Category

0010,Charles,USA,A

0011,David,UK,B

There are some scenarios where you should select CSV even the source file is not ".csv".

Ex: (Extension ".txt")

SlNo|Name|Country|Category

0010|Charles|USA|A

0011|David|UK|B

In the above example, the file format is not ".csv" it is ".txt" but we'll load it as a csv file In the "Data Seperator Field" of InfoPackage, you have to mention it as "|".

There is no specific scenario given in the requirement. That depends upon the file format given. Let me know if I could answer your question.

Regards,

Shashi

raghu_ram
Active Contributor
0 Kudos

hii,

The ultimate goal of BW/BI is to generate a report at the top level. So we get the report in Excel sheet. It has rows n colums in it. We save the file in CSV format as it is comma separated. If u open the CSV excel file in notepad u can see the records separated by commas. It is easy to understand the file. So it is the main advantage of using a CSV format rather that going for ASCII.

So most of the times infact majority who use the flat files save the file in .CSV format.

hope it helps,

regards,

raghu.

Former Member
0 Kudos

thanks for the answer,

like i said, i know what they are.What i am looking for is what are the typical scenario to use either CSV or ASCII. Requirments, nature or data etc. For example, use CSV for this or use ASCII for that

Former Member
0 Kudos

Hi,

"The business reason is well known: better performance for a file with fixed fields length. Especially if you can place the file on the server."

Stolen from:

You should take a look... It is a blog about "How to create ASCII text file for upload to SAP BW" at the end you will found information for choosing the right format.

"If you want to upload a large amount of transaction data from a flat file, and you are able to specify the file type of the flat file, you should create the flat file as an ASCII file. From a performance point of view, uploading the data from an ASCII file is the most cost-effective method. In certain circumstances, generating an ASCII file might involve a larger workload."

From:

http://help.sap.com/saphelp_nw04/helpdata/en/1f/0e3237e5875249e10000009b38f936/frameset.htm

Additional info:

Regards

Andreas