on ‎2008 May 13 3:39 PM
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
Request clarification before answering.
Hi Sebastian,
I tried to open an external window and it works. Now I have to put the data from my first windwo to the second window. I have never done this before.
To open the PDF in a popin does not work. You were right.
Regards, Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I have to put the data from my first windwo to the second window
The views within both windows share the same component - and therefore they share the same component controller context. Just structure you data there and then you can map your context into both views. Data is shared via reference - meaning that there is only one copy of the data in the component controller context and each view had immediate access to the latest version of the data.
Hi Thomas,
is that true. As I knew so far an external window opening a new browser window would have a new session.
I thought context mapping would just be able by having the new window within a pop in.
If I am wrong, is this new? Because I tried it, and the context was lost in a new window.
Regards
>
> Hi Thomas,
>
> is that true. As I knew so far an external window opening a new browser window would have a new session.
> I thought context mapping would just be able by having the new window within a pop in.
>
> If I am wrong, is this new? Because I tried it, and the context was lost in a new window.
>
> Regards
My fault for skimming the thread. I didn't catch that this was an external window. Yes as soon as you open in an external window, you would have a new session - no way around that. I suppose you would have to fall back to some old BSP tricks to pass the data between windows. You could use a Server Cookie (basically just an entry in the database - but with some nice administrative features to clean them up) to pass the data.
>
> Thanks
>
> I would prefer passing elementary parameters as URL parameter. For example:
>
> component_url?parameter_name=value.
>
> Therefore create Importing Parameter in HANDLE_DEFAULT:
>
> paramter_name importing type string.
URL parameters are nice and work just fine from WDA as you have described. You just have to be cautious that you don't go beyond the max lenght of a URL (1024) and know that hyou can only pass simple elements - and they all have to be converted to character data type.
That is where Server Cookies can be nice. Like like to take entire internal tables or even classes and serialize them to XML. I can then just store the one byte string as a server cookie and pass the GUID key for the cookie as a URL parameter. That way you get around all the limitations.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.