‎2009 Feb 12 5:49 AM
Hi,
in ecc6 when i call upload function then a system message appears that "upload function is obselete-do not use". what should i use?
Thanks.
‎2009 Feb 12 5:55 AM
Hi,
Gui_upload Function you can use.
WS_upolad is obselete.
Regards,
Gurpreet
‎2009 Feb 12 5:55 AM
‎2009 Feb 12 6:16 AM
hi,
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'D:\FILEINTERFACE\file.txt'
* FILETYPE = 'ASC'
has_field_separator = 'X' " Use this flag if you have tabbed delimited file
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
data_tab = t_kna1 " Internal table with similar structure of file
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR = 7
* BAD_DATA_FORMAT = 8
* HEADER_NOT_ALLOWED = 9
* SEPARATOR_NOT_ALLOWED = 10
* HEADER_TOO_LONG = 11
* UNKNOWN_DP_ERROR = 12
* ACCESS_DENIED = 13
* DP_OUT_OF_MEMORY = 14
* DISK_FULL = 15
* DP_TIMEOUT = 16
* OTHERS = 17
.
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
Sharath
‎2009 Feb 12 6:43 AM
‎2009 Feb 12 6:47 AM
Hi,
This kind of error messages appears for all those FM that were used in the older versions and have been replaced by some other FM in the newer versions.
They say these are obselete ,better not to use them ...but they still work but for best practice not to use them and use the newer FM provided. use GUI_UPLOAD/ALSM_EXCEL_TO_INTERNAL_TABLE /'KCD_EXCEL_OLE_TO_INT_CONVERT'/TEXT_CONVERT_XLS_TO_SAP and many other present.
You need to serach the forum for finding the best one as per your requirement.
Pooja