Skip to Content
0
Former Member
Apr 25, 2005 at 01:32 PM

regarding Open dataset

93 Views

I have two questionshere.

1-i want create text file in Application server.

in below directory is it possible.

E_FILE LIKE RLGRAP-FILENAME VALUE

'DIR_HOME\payhome.txt'.

(does my path will create file in this virtual direcotry)

2-for each loop i want to write one line

in text file.

should i have to include delimeter while transfer data to file or write to file.

my below piece of code is correct?

DATA E_FILE LIKE RLGRAP-FILENAME VALUE

'DIR_HOME\payhome.txt'.

OPEN DATASET E_FILE FOR OUTPUT IN TEXT MODE.

LOOP AT ITAB_LIFNR.

PERFORM LISTDATA.

ENDLOOP.

CLOSE DATASET E_FILE.

In PERFORM LISTDATA.

....................

WRITE : / PAGENO,

SUBNO,

DATAKBN,

ITAB_LIFNR-LIFNR,

ITAB_LIFNR-NAME2(20),

P_PAY_T,

GLT0-TSL01,

GLT0-TSL02,

GLT0-TSL03,

GLT0-TSL04,

GLT0-TSL05 TO E_FILE.

......................

ENDFORM.

ambichan