cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error while uploading image in mime

former_member459142
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

former_member459142
Participant
0 Kudos

hi anubhav

Thanks for replying,

I have seen ur thread but i m not able to understand the solution .

I think u have creted this application . so plz tel me the code for upload or tel me exact solution.

i would appreciated ur reply .

Thanks & Regards

prashant Gupta

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

Do not open many threads for the same topic.