cancel
Showing results for 
Search instead for 
Did you mean: 

abap objects

kvenkatesh-in
Explorer
0 Kudos

hi,

what is the major difference using

call method cl_gui_frontend_services->gui_upload.

instead of

call function gui_upload

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello and welcome,

at least in Rel. 4.6C nothing - as you can see from source code:

method GUI_UPLOAD.

  • ...

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = FILENAME

FILETYPE = FILETYPE

HAS_FIELD_SEPARATOR = HAS_FIELD_SEPARATOR

HEADER_LENGTH = HEADER_LENGTH

IMPORTING

FILELENGTH = FILELENGTH

HEADER = HEADER

TABLES

DATA_TAB = DATA_TAB

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.

CASE SY-SUBRC.

....

Maybe in higher releases there's a difference.

Regards Wolfgang

athavanraja
Active Contributor
0 Kudos

ECC5 no difference

Answers (3)

Answers (3)

Former Member
0 Kudos

The difference is one is object oriented and other one is not. Other than that there is no difference. Whatever advantages you have with going towards an object oriented coding, will be available with the method.

Srinivas

antony_john
Explorer
0 Kudos

internally the class also uses GUI_UPLOAD ..........

but its better to use the class method because of compatibility issues to later versions

sreemsft
Contributor
0 Kudos

Hi Venkatesh,

SAP is now moving towards Netweaver.

So after some versions these function modules will become Obsolete.

As GUI_UPLOAD replaced UPLOAD in 4.7 version, CL_GUI_UPLOAD_SERVICES->GUI_UPLOAD replaces GUI_UPLOAD in future versions.

Thanks,

Sreekanth

athavanraja
Active Contributor
0 Kudos

Welcome to SDN.

if you look at the code inside

cl_gui_frontend_services->gui_upload they use gui_upload function.

there is no difference.

Regards

Raja