cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro ABAP Image saving options

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)