I have the below program, some how i need to get this data in table to application server as file under /usr/sap/tmp directory of AL11 transaction code.
Can you advice what could be wrong in this, why is it not loading the file. there are no errors but i cannot see any file uploaded in AL11.
TYPES : BEGIN OF ST_DEMO, REG_NO(10) TYPE C, NAME(20) TYPE C, ADDR(20) TYPE C, END OF ST_DEMO. DATA : WA_DEMO TYPE ST_DEMO, IT_DEMO TYPE TABLE OF ST_DEMO, L_FNAME TYPE STRING . PARAMETERS: P_FNAME(128) TYPE C DEFAULT '\usr\sap\tmp\down.txt' OBLIGATORY. L_FNAME = P_FNAME. WA_DEMO-REG_NO = '100001'. WA_DEMO-NAME = 'ANAND'. WA_DEMO-ADDR = 'NAGARKOVIL'. APPEND WA_DEMO TO IT_DEMO. WA_DEMO-REG_NO = '100002'. WA_DEMO-NAME = 'VIKRAM'. WA_DEMO-ADDR = 'CHENNAI'. APPEND WA_DEMO TO IT_DEMO. OPEN DATASET P_FNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. WRITE :5 'REG NUM',16 'NAME',37 'ADDRESS' . LOOP AT IT_DEMO INTO WA_DEMO. IF SY-SUBRC = 0. TRANSFER WA_DEMO TO P_FNAME. WRITE :/5 WA_DEMO-REG_NO,16 WA_DEMO-NAME,37 WA_DEMO-ADDR. ENDIF. ENDLOOP.
Edited by: MercAMG on Sep 15, 2011 7:49 PM