‎2007 Aug 23 9:21 AM
Hi Friends,
I have a simple question, I have read the documents but couldn't find documentation.
While I am reading dataset using
DATA WA_DATASET(1).
OPEN DATASET D1 FOR INPUT.
OPEN DATASET D2 FOR OUTPUT.
DO.
READ DATASET D1 INTO WA_DATASET.
TRANSFER WA_DATASET TO D2.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET D1.
CLOSE DATASET D2.As seen above I am copying file. And my WA_DATASET length is 1. If I change this length to 1000, dataset D2 is not desired format. I mean that d2 is not true file. So, I am using the lentgth 1. In documentation legth is defined as 80. Is there a specific reason for 80? Or, what is the maximum size this lentgth to supply real copying operation.
Thanks.
‎2007 Aug 23 12:45 PM
Hi,
The max. length is 255 characters. Please change from 1000 to 255 & it should work.
Best regards,
Prashant
‎2007 Aug 23 12:48 PM
‎2007 Aug 23 3:55 PM
Hi again,
What is the logic of 255? And why there is error in my file when length is 1000?
I want to learn the logic of READ DATASET and TRANSFER.
When it is reading 1000, it is writing 255?
Thanks.
‎2007 Aug 24 11:40 AM
I mean that, why I am getting when th length is 1000? How can I believe in this length should be smaller than 255? If length is 1000 'sometimes' my file is bad, but sometimes it is true. When length is 1000, where is the error? Can you explain the logic of read and transfer based on length.
Thanks.