2009 Feb 24 5:46 AM
Hi,
I have a scenario where i have to access FTP server and get the file and process
1Q. Can i run .CSV file in background?
2Q. for the first question answer is "Yes". I have tried uploading .csv file using GUI_UPLOAD funny thing is when i just executed GUI_UPLOAD it uploads and shows 4 lines (input file has 4 lines) and data is comma separated, when i call this in program i get an error "Cannot interpret data in file" below is the code i am writing
REPORT ZZZZZZZZZZ.
TYPES : BEGIN OF RECORD_IN,
INVOICE_PSTNG_DATE TYPE BUDAT,
INVOICE_DOC_DATE TYPE BLDAT,
INOVICE_REF_DOC_NO TYPE XBLNR,
GRECEIPT_PSTNG_DATE TYPE BUDAT,
GRECEIPT_DOC_DATE TYPE BLDAT,
GRECEIPT_REF_DOC_NO TYPE XBLNR,
COMP_CODE TYPE BUKRS,
GROSS_AMOUNT TYPE BAPI_RMWWR,
PO_NUMBER TYPE BSTNR,
PO_ITEM TYPE EBELP,
ENTRY_QNT TYPE ERFMG,
END OF RECORD_IN.
DATA : IT_RECORD_IN TYPE TABLE OF RECORD_IN.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\OKTOPAY.CSV'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
REPLACEMENT = '#'
TABLES
DATA_TAB = IT_RECORD_IN
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
I looked into below link, couldn't get much out of it.
http://www.sap-img.com/ab004.htm
3Q. KCD_CSV_FILE_TO_INTERN_CONVERT i tried to use this function module and it is just reading first 132 characters only but my file row has more than 132 chars
Please help me
Thanks
asarath
2009 Feb 24 5:56 AM
If you are trying to user GUi_UPLOAD in backgroun it wont work. you have to call it from Applications server. I
If you are trying to user GUi_UPLOAD in backgroun it wont work. you have to call it from Applications server. I
2009 Feb 24 5:56 AM
If you are trying to user GUi_UPLOAD in backgroun it wont work. you have to call it from Applications server. I
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |