cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Generating PDF in Web-Dynpro

Former Member
0 Likes
2,098

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

View Entire Topic
Former Member
0 Likes

Thank you Sebastian,

I've found the mistake. I have written something wrong. A very very small mistake.

Now the PDF works.

But at the end I have another question. How I can get this PDF into a popup? You've said something about a new session.....

Thanks for your great help and your time you've spent for me.

Regards, Markus

Former Member
0 Likes

Well,

you need to user create_external_window instead of create_window.

In this case you open a new browser window. The context in there has nothing to do with the context of the caller component.

Therefore you usually call another component.

Passing variables can only be done by URL parameters. Therefore you need to generate a new URL.

Variables can be read in the default plug of the window, as Importing Parameter.

Therefore create an inbound parameter in the default plug, give it same name as URL-parameter and define it as string.

But you can give it a try, opening it in a popin. It's just what SAP says. I have not tried it out yet.

For more details search the forum. I do not have an example on hand.