Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

upload function

Former Member
0 Likes
637

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.

5 REPLIES 5
Read only

Former Member
0 Likes
614

Hi,

Gui_upload Function you can use.

WS_upolad is obselete.

Regards,

Gurpreet

Read only

Former Member
0 Likes
614

Hi,

Which one u r using, use GUI_UPLOAD.

Read only

Former Member
0 Likes
614

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

Read only

Former Member
0 Likes
614

HI

I HAVE USED NORMAL UPLOAD FUNCTION I.E. "UPLOAD"

Read only

Former Member
0 Likes
614

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