09-23-2009 12:40 PM
hai all,
how to transfer application server data to a data base table, i am using this code
iF V_FILE = 'X'.
OPEN DATASET V_FILE2 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
DO.
READ DATASET V_FILE2 INTO DATA1.
SPLIT DATA1 AT C_COMMA INTO V_MATNR V_MTART V_WERKS V_LGORT.
IF SY-SUBRC = 0.
APPEND IT_MARA.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET V_FILE2.
but the data is not splitting from data1 to the defined variables.
09-23-2009 1:43 PM
09-23-2009 2:02 PM
Hi Kpsgoutam,
Check whether the data present in file in application server is comma delimited .It might be a tab separated one.check it in debugging mode whether its getting splitted or not
regards,
Lakshman.
09-23-2009 3:04 PM
check whats the separator in al11 or in debug mode..
it can be #, * , ',', or any other thing...
09-23-2009 3:10 PM
Where is your code to move V_MATNR etc. to IT_MARA?
Also, SPLIT could change SY-SUBRC to 4, so it might exit your loop even before the file was processed completely.
Thomas