Skip to Content
0
Former Member
Mar 17, 2015 at 07:49 AM

file not getting created in the application server path.

385 Views

HI GUYZ,

i have a requirment where i need to transfer my output file from alv/classical into application server path ie 'd:\old\scbbank\auto.txt'

i have used this particular code but its showinf file unable to create..

its not gettinf moved from it_final to wa_final nor from wa_final to my filename for application server..

this is my code please help me out in this..

DATA : LV_DATA TYPE STRING,

GV_FILE TYPE C.

GV_FILE =' D:\OLD\SCBBANK.txt'.

OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.

MESSAGE 'Unable to create file' TYPE 'I'.

EXIT.

ENDIF.

LOOP AT IT_FINAL INTO WA_FINAL.

CONCATENATE wa_final-augbl

N_AMT

wa_final-bukrs

wa_final-gjahr

wa_final-belnr

G_AMT

T_AMT

N_AMT

INTO LV_DATA

SEPARATED BY ','.

TRANSFER LV_DATA TO GV_FILE.

CLEAR WA_FINAL.

ENDLOOP.

CLOSE DATASET GV_FILE.

Regards,

Nawaz