Skip to Content

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

Webdynpro ABAP Image saving options


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..


Former Member
Former Member replied


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
      i_filename      = 'PICTURE.JPG'
      i_content       = content
      i_mime_type     = 'image/jpeg'
*     i_in_new_window = ABAP_FALSE
*     i_inplace       =  ABAP_FALSE


Best regards,


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