‎2008 Feb 18 4:49 AM
Hi all,
Using the code to read file data
DATA : Len type i,
str_name type string.
READ DATASET name INTO str_name LENGTH len .
but it only reads first 155 characters i.e. length is always 155 not more that that but as per requirement wants to read more that 155 charcters.
Any suggestions welcome,
Regards,
‎2008 Feb 18 4:52 AM
hi,
Check out if it works by removing LENGTH.
i.e,
READ DATASET name INTO str_name .
Regards,
Santosh
‎2008 Feb 18 5:02 AM
Still problem exist.....
1) Checked after removing len
2) Make it TYPE char512
‎2008 Feb 18 4:53 AM
DO.
READ DATASET p_ufile INTO in_file.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND in_file.
CLEAR in_file.
ENDDO.
‎2008 Feb 18 4:55 AM
Hi Navdeep,
use the following declarations:
data:
str_name type char512,
name type sxpgcolist-parameters.
This should solve the problem..
Thanks
Vijay
PLZ reward points if helpful
‎2008 Feb 18 4:59 AM
READ for Files
Reads a file.
Syntax
READ DATASET <dsn> INTO <f>
[MAXIMUM LENGTH <maxlen>]
[ACTUAL LENGTH <len>].
Reads the contents of the file <dsn> on the application server to the variable <f>. The amount of data can be specified using MAXIMUM LENGTH. The number of bytes transferred can be written to <len> using ACTUAL LENGTH.
Regards,
Priya.