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

diff b/w cl_gui_frontend_services=>gui_upload and call function gui_upload

Former Member
0 Likes
1,823

Hi,

please tell me the difference between cl_gui_frontend_services=>gui_upload

and

call function gui_upload.

Before i have used call function gui_upload

now i want to change cl_gui_frontend_services=>gui_upload

i dont know oop abap.

if if use cl_gui_frontend_services=> any changes i have to do in my program ????.

Thanks is Advance

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
1,026

Hi,

It is a way of represeinting the same funciton in procedural language using CALL FUCNTION and in classes (OOPS based) .

CALL FUNCTION is a traditional approach, using the classes is a OO approach

Just call the class CL_GUI_FRONTEND_SERVICES in the Pattern button to call a class, in that ABAP Object Patterns specify the class name CL_GUI_FRONTEND_SERVICES, method name specify the GUI_UPLOAD.

this way we can call the Class. As this class is the STATIC class there is no need of creating a object for it. We can directly use this class in the program.

Just pass the apt variables, strcutures to the class etc as you were doing in the traditionl approach . Rest all is the same.

cl_gui_frontend_services=>gui_upload(

  • EXPORTING

  • FILENAME = SPACE

  • FILETYPE = 'ASC'

  • HAS_FIELD_SEPARATOR = SPACE

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = SPACE

  • CODEPAGE = SPACE

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE

  • IMPORTING

  • FILELENGTH = FILELENGTH

  • HEADER = HEADER

CHANGING

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

  • NOT_SUPPORTED_BY_GUI = 17

  • ERROR_NO_GUI = 18

).

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

We go for this OO as there are changes made to the SAP R/3 where most of the things are OO. The Operating system or Kernel of the SAP lastest veriosns support OO. For easy implementations and resuability we go for OO.

Regards

Lekha

Read only

Former Member
0 Likes
1,026

Both are same.

cl_gui_frontend_services=>gui_upload is OOPS method.

Read only

Former Member
0 Likes
1,026

Hi,

Gui_upload is written in Normal ABAP and cl_gui_frontend_services=>gui_upload is written in oop ABAP

its an updated version of gui_upload.

Read only

Former Member
0 Likes
1,026

Hi,

Gui_upload : it is normal function module to upload the File and XL Sheet Data into Internal table.

Call function Gui_upload : this Functionality used in OOPS.

Thanks&Regards,

naresh