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.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.