cancel
Showing results for 
Search instead for 
Did you mean: 

File does not begin with '%PDF' error when displaying the images in interactive form

giri_pailla
Explorer
0 Kudos

Hi experts,

I have requirement to save the images from an ABAP Report and then populate those images in webdynpro.

Images data is in XSTRING format and I'm displaying that in Interactive form UI element.

But I am getting the error as " File does not begin with '%PDF' , Local\EWHp+bsu5i- ".

Can anyone suggest how to overcome this scenario.

Thanks

Regards,

Giri.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Giri,

Please try to use below way to display images.

        lv_filename = ls_files_list-filename.

         lv_mimetype = ls_files_list-mime_type.

         cl_wd_runtime_services=>attach_file_to_response( EXPORTING i_filename      = lv_filename

                                                                    i_content       = l_bin_content (--> is of type xstring)

                                                                    i_mime_type     = lv_mimetype

                                                                    i_in_new_window = abap_true ).

I am using linktoaction UI in webdynpro.

Hope this helps.

Thanks

Phani

klaudio_lilo
Explorer
0 Kudos

This might be useful to you

former_member184578
Active Contributor
0 Kudos

Hi,

Use image UI element to display images. Interactive form is for displaying PDF xstring files.

For your requirement, you can check this blog for reference:

hope this helps,

Regards,

Kiran

giri_pailla
Explorer
0 Kudos

Hi Kiran,

Thanks for your advice.

I tried the above approach by using Image UI element but still I couldn't able to achieve this.

Below is the screen that I could see, not the Image.

I'm just asking you, will there be any note I need to apply.

Thanks,

Regards,

Giri

former_member184578
Active Contributor
0 Kudos

Hi,

Have you changed the xstring data to cached response as mentioned in the document provided!!

Please refer this document

hope this helps,

Regards,

Kiran

giri_pailla
Explorer
0 Kudos

Hi Kiran,

I tried the given approach but I'm getting the below error. I have searched and I came to know that I need to apply few notes to overcome from this issue.

will there be any issue if we are not interested in applying the notes ?.

Because Images will be uploaded from a ZREPORT(i.e, pure ABAP) and those images I should populate in Webdynpro screen.

Thanks

Regards,

Giri