cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello,

I have a problem with generating a PDF file with ABAP WebDynpro. I have an ALV and there I read a line. From this line I want to build a smartform which should be converted into PDF. I think my coding works. I have no syntax errors and when I debug the coding, everything looks good. I also get my popup that I want to have. But then I got an error: "File does not begin with '%PDF-'."

I look for this error here in SDN but I could not find a solution. I have also tried to do what is mentioned in note 1042424.

Can anybody helps me?

Regards, Markus

0 Likes
View Entire Topic
Former Member
0 Likes

Ok,

I have another WebDynpro Test-Application where I want to implement the PDF on only one view. It is the main view. But there I have the same problems. I see nothing on my screen.

In the application with the popup, I generate a seperate view and window.


*Popup für PDF öffnen
data:   l_cmp_api         type ref to if_wd_component,
        l_window_manager  type ref to if_wd_window_manager,
        M_PDF_POPUP_1     type ref to if_wd_window.


l_cmp_api         = wd_comp_controller->wd_get_api( ).
l_window_manager  = l_cmp_api->get_window_manager( ).

if M_PDF_POPUP_1 is initial.

M_PDF_POPUP_1 = l_window_manager->create_window(

window_name = 'PDF_POPUP' "
*PDF_POPUP is window containing the second view

).
endif.

M_PDF_POPUP_1->open( ).

Former Member
0 Likes

Hi,

well create_window is not supported, because it generates a popin in the same browser window.

Display it in the same view, which is not a popin.

Configure InteractiveForm like this:

displayType: activeX

height: 700px

visible = true (just after pdf was generated)

with = 100%

pdfSource = contextField