Skip to Content

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

Webdynpro ABAP Image saving options

Hi,

Is there any possibilities in webdynpro abap to save the image in the local desktop by right clicking it.

Please let me know the options..

Thanks

Former Member
Former Member replied

Hi,

You can create a LinkToAction or Button next to the image and download it with this event handler:

METHOD onactionondwnload .

  DATA: mr  TYPE REF TO if_mr_api,
  content TYPE  xstring.
  mr = cl_mime_repository_api=>get_api( ).
  mr->get( EXPORTING  i_url  = 'sap/bc/webdynpro/sap/APP_NAME/PICTURE.JPG' IMPORTING  e_content = content ).

  CALL METHOD cl_wd_runtime_services=>attach_file_to_response
    EXPORTING
      i_filename      = 'PICTURE.JPG'
      i_content       = content
      i_mime_type     = 'image/jpeg'
*     i_in_new_window = ABAP_FALSE
*     i_inplace       =  ABAP_FALSE
   .

ENDMETHOD.

Best regards,

Gabor

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