Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Getting error while uploading image in mime

hiii

I am upload image from my PC to MIME

This is My bsp view page.

<htmlb:form method="post" encodingType="multipart/form-data">
                     <htmlb:fileUpload id       = "myUpload"
                        size     = "20"
                        onUpload = "OnInputProcessing()" />
                     </htmlb:form>

In DO_HANDLE_EVENT using this code\

DATA: lr_mime_rep TYPE REF TO if_mr_api.
DATA: file_name TYPE string.

DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD.
      fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                              request = request
                              id      = 'myUpload'
                              name    = 'fileUpload' ).

      file_name      = fileUpload->file_name.

and i m getiing error here

 
cl_gui_frontend_services=>gui_upload(
  EXPORTING
    filename                = file_name    " Name of file
    filetype                = 'BIN'
  IMPORTING
    filelength              =  lv_length   " File length
  CHANGING
    data_tab                = lt_data    " Transfer table for file contents
  EXCEPTIONS
    OTHERS                  = 19 ).

this meathod is not gui supported.

plz tel me how it works in BSP.

Former Member
Former Member replied

Hi Prashant,

I also faced the similar issue and I got the solution which you can find in [this|https://forums.sdn.sap.com/click.jspa?searchID=24609379&messageID=6684222] thread.

You are right, you can not use cl_gui_frontend_services in BSP.

Hope this helpful.

Regards,

Abhinav

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question