2008 May 29 4:38 AM
Hi Experts
I am using the following code, but am getting the error message as,
UC_OBJECTS_NOT_CONVERTIBLE
What could be the reason, pls anyone help me.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'C:\ '
FILETYPE = 'DAT'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks in advance.
Regards
Rajaram
Hi Experts
I am using the following code, but am getting the error message as,
UC_OBJECTS_NOT_CONVERTIBLE
What could be the reason, pls anyone help me.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'C:\ '
FILETYPE = 'DAT'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks in advance.
Regards
Rajaram
2008 May 29 4:40 AM
hi there....
you are not specifying any file name in the function module. iun abap it is not possible to upload a directory in its entirety. which is something ur code is trying to do. correct it and the error will resolve.
do reward if helpful or get bak with further issues.
2008 May 29 5:04 AM
Hi Prem
I tried the following code also,
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'C:\sample.txt'
FILETYPE = 'DAT'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
.
IF SY-SUBRC <> 0.
but still am getting the same error as follows,
Data objects in a Unicode program are not convertible.
What could be the reason, pls advise me.
2008 May 29 5:06 AM
can u try with a different file type or leave that blank (default)
2008 May 29 5:08 AM
Hi Raja,
in SAP, whenever you use single quotes, u need to specify everything in capitals. one thing....
another thing is the file type is DAT which i think should be TXT. try these out and lemme know if problem solves or not.
2008 May 29 5:21 AM
Hi Prem
I have tried ur suggestion like
FILENAME = 'C:\SAMPLE.TXT'
FILETYPE = 'DAT'
but still its showing the same error and also tells that
E12: duplicate child ID : 'UPLD'
What it means actually.
Pls explain me.
2008 May 29 5:25 AM
did u chk the upper post... i have mentioned that for DAT file type, u need to put in the tab spaces.. hav u used that....???
2008 May 29 6:11 AM
Hi Prem
I have used and i put the spaces between the fields also,
but still am getting the same error yar.
help me pls.
2008 May 29 4:50 AM
What is your input file data and ITAB fields?
Check if they are compatible.
2008 May 29 5:06 AM
2008 May 29 5:10 AM
This is my itab fields, and i have flat file also in the same order.
DATA : BEGIN OF ITAB OCCURS 0,
BLDAT LIKE BKPF-BLDAT, " Document Date
BUKRS LIKE BKPF-BUKRS, " Company Code
BUDAT LIKE BKPF-BUDAT,
PRCTR LIKE COBL-PRCTR,
ZUONR LIKE BSEG-ZUONR,
WAERS LIKE BKPF-WAERS,
MONAT LIKE BKPF-MONAT,
BUPLA LIKE BSEG-BUPLA,
BLART LIKE BKPF-BLART, "Type
XBLNR LIKE BKPF-XBLNR, "Reference
BKTXT LIKE BKPF-BKTXT, "Document Header Text
NEWBS LIKE RF05A-NEWBS,"Posting Key
NEWKO LIKE RF05A-NEWKO,"Account
NEWUM LIKE RF05A-NEWUM,"Special GL Indicator
WRBTR LIKE BSEG-DMBTR, "Amount
GSBER LIKE BSEG-GSBER, "Business Area
SGTXT LIKE BSEG-SGTXT, "Long Text
ZTERM LIKE BSEG-ZTERM, "Payment terms
ZFBDT LIKE BSEG-ZFBDT, "Baseline date
END OF ITAB.
2008 May 29 5:16 AM
hi ..
following are the various file types allowed.....
File type (ASCII, binary ...)
Possible values
'ASC' : ASCII file
The file is loaded line by line in the transferred table and this should have one-column and be of the type C. The file size is returned in the parameter FILELENGTH.
'TRU' : ASCII file + line wrap
If a line in a file does not fit into a row in a table, then the row is filled completely, and the rest of the line is written to the next row in the table. Words are not split, instead they are put into the next row of the table.
'BIN' : Binary file
The file is loaded into the transferred table which should have one-column and be of the type X. The table is filled line by line in this case. In this case, the last line need not necessarily be completely filled. For this reason, the parameter FILELENGTH must be used during further processing. The table may be a maximum of 1022 characters 'wide'!
'DAT' : ASCII file with tab formatting
The file is loaded line by line into the transferred table. Tabs in the file mean a change of field.
The file size is returned in the parameter FILELENGTH.
chk if these help.
2008 May 29 6:39 AM
Can you tell me what does your internal table looks like?
Also i want to see the data which you are trying to upload.
2008 May 29 7:27 AM
hi
the internal table is given above and if you want the flat file tell me ur mail id, i will send to you.,
pls help me.
2008 May 29 4:59 AM
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = ' '
FILETYPE = 'DAT'
TABLES
DATA_TAB = IT_PROG.
This is the right way of using this function module
If you wish to pass the file name
declare a variable
filename and pass that field to the function module.
eg:
constants:filename type rlgrap-filename value '
p33440\Server\GeoLocation\Documentation\ZIP\Z5gold_short1.txt'.
2008 May 29 5:13 AM
It seems this is caused by a program which is not UNICODE compatible.
pls check this link to get more idea[http://www.sapfans.com/forums/viewtopic.php?p=571614&sid=246b47c08f64240c5bec296d6f7d4252]
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |