Saturday, December 18, 2010
REPORT  zvenkitest.
DATA fname(60) VALUE '.\myfile2'.
DATA num TYPE pa0008-bet01.

OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
"opens the file for writing(OUTPUT)
DO 10 TIMES.
num = num + 1.
TRANSFER num TO fname.
"This statement passes the content of data object(num) to the file specified in fname.
ENDDO.
CLOSE DATASET fname.
"this statement closes the file specified in fname.

OPEN DATASET fname FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
READ DATASET fname INTO num.
IF sy-subrc <> 0.
EXIT.
ENDIF.
WRITE / num.
ENDDO.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.