01-08-2008 6:10 AM
01-08-2008 6:20 AM
Hi,
Binary mode.in binary mode it opens the file as binary file.Both while reading a binary file
or writing to a binary file,the content transfered is in unchanged form.
it is same both in unicode and in non-unicode programs.
TEXTMODE:
for Text mode, it opens the file as text file. "Encoding " addition is specified
to define how the characters are represented in the txt file.if data type is char and flat, trailing blanks are removed.if datatype si stirng, trailing blanksa are not removed.
in unicode programs, only the content in char type data objects can be read or write into text file and encoding addition must be specified.
we can omit encoding addition for non unicode programs.
TExt mdoe encoding line feed.
regards,
Omkar.
01-08-2008 6:13 AM
Hi
hope it will help you.
File interface
In the file interface, the OPEN DATASET statement has been completely overhauled and the following enhancements added for USs:
The IN TEXT MODE addition
OPEN DATASET dsn IN TEXT MODE ...
The file is opened so that it can be read or written to line-by-line. Final space characters are deleted in this mode.
Addition:... ENCODING (DEFAULT | UTF-8 | NON-UNICODE)
The keyword ENCODING specifies the character set used to edit the data. In a US the DEFAULT is UTF-8, while in an NUS it is NON-UNICODE. NON-UNICODE means that the system uses the code page specified either when the user logs on to the R/3 System or in the SET LOCALE LANGUAGE statement.
Addition:... REPLACEMENT CHARACTER rc
Specifies the replacement character that is used if a character is not available in the target character set when the file is converted. The default replacement character is the hash symbol (#).
The IN BINARY MODE addition
OPEN DATASET dsn IN TEXT MODE ...
The file is opened to be read or written to, without any line breaks. In both the US and the NUS, the exact content of memory is copied.
The IN LEGACY MODE addition
OPEN DATASET dsn IN LEGACY TEXT MODE [(LITTLE | BIG) ENDIAN ]
[ CODE PAGE cp ].
The file is opened so that it can be read or written to line-by-line, in a format compatible with TEXT MODE in the NUS.
You use the ENDIAN addition to specify the byte order that the system will use to process numbers of type I or type F. If you omit this addition, the operating system of the application server specifies the byte order. If the byte order declared differs from that used by the operating system, the data is converted as appropriate for the statements READ DATASET and TRANSFER. You can also specify a REPLACEMENT CHARACTER, rc, in this statement.
The CODE PAGE addition specifies the code page used to display text from the file dsn. If this addition is missing, the system uses the code page used to read or write to the file.
OPEN DATASET dsn IN LEGACY BINARY MODE [(LITTLE|BIG) ENDIAN)]
[ CODE PAGE cp ].
The file is opened to be read or written to without any line breaks, in a format compatible with NUS BINARY MODE. The additions ENDIAN and CODE PAGE are used as described above. You can also specify a REPLACEMENT CHARACTER, rc, in this statement.
For each of the above variants, you can use the IGNORING CONVERSION ERRORS addition to make the system suppress conversion errors at runtime when reading or writing to a file. In general, reading or writing to a file causes a runtime error, unless this file has already been opened using an OPEN DATASET statement.
reward if help.
01-08-2008 6:13 AM
Friend,
The file is opened to be read or written to without any line breaks, in a format compatible with NUS BINARY MODE. The additions ENDIAN and CODE PAGE are used as described above. You can also specify a REPLACEMENT CHARACTER, rc, in this statement.
http://help.sap.com/saphelp_nw70/helpdata/en/79/c554a0b3dc11d5993800508b6b8b11/frameset.htm
01-08-2008 6:20 AM
Hi,
Binary mode.in binary mode it opens the file as binary file.Both while reading a binary file
or writing to a binary file,the content transfered is in unchanged form.
it is same both in unicode and in non-unicode programs.
TEXTMODE:
for Text mode, it opens the file as text file. "Encoding " addition is specified
to define how the characters are represented in the txt file.if data type is char and flat, trailing blanks are removed.if datatype si stirng, trailing blanksa are not removed.
in unicode programs, only the content in char type data objects can be read or write into text file and encoding addition must be specified.
we can omit encoding addition for non unicode programs.
TExt mdoe encoding line feed.
regards,
Omkar.
01-08-2008 6:20 AM
hi,
We can read a file from 2placeses.
1. presentation server.
2. application server.
what do we mean by opening a file in binary mode
A file is placed in application server that file is read from that place ie stcode-AL11
Using the function module ie GUI_DOWNLOAD.
Rewardpoints if helpful
01-08-2008 6:25 AM
Hi,
You can get this information at the following link:
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c99358411d1829f0000e829fbfe/frameset.htm
Regards,
Priyanka.