cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with creating an adobe form in a Abap webdynpro

AntonPierhagen
Active Participant
0 Kudos

Hi experts!

Problem

I have the following problem:

"Sometime the user can not retrieve the adobe form it should get via an abap webdynpro." 

Background story

I have made an abap webdynpro. The whole abap webdynpro exists of one component --> "The interactiveForm Component".

See "attachement_1".

I have linked "the interactieform component" with the adobe form object i have created.

Via the 'wizard' the attributes  "datasource, pdfSource en templateSource" are filled of the interactiveForm component.

Also the correct context is created for this component in my view.

When i test it, it works fine. Afterwards, when the testteam had test it, it also works fine.

The Abap webdynpro is transported to the production system

In the production system, the form is daily beiing used between 10.000 and 20.000 times a day.

In most of the cases the form work fine. In  0,1% <-> 0,2% (between 10 and 20 times a day) it does not work.

The user retrieves the error as to be seen in "attachement"

What i have learned so far

  1. The error starts with "%PDF". So the Adobe reader can not open the file because for the Adobe Reader it is not a PDF file. The program read the header of the file. When the first characters are not "%PDF" the Adobe Reader interpret the file not as an Adobe Form and the error message is send to the user.
  2. So, somewhere the file is going corrupt. The "%PDF" are not in the file, or the charachters "%PDF" are not the first characters of the (header) of the file.
  3. The dataSource in the Abap webdynpro component "InteractiveForm" is of the type "XSTRING".
  4. I know with ABAP code, the following can be done:
    1. Call the ADS
    2. With the ADS, a PDF document is created.
    3. The function module which creates this PDF document returns a table which contains the PDF file in binary characters
    4. With another function module these binary characters can be translated to a XSTRING format
    5. The 4 steps above are done with default SAP code? In the InteractiveForm component in the ABAP webdynpro
  5. This XSTRING object is used by the INTERACTIVEFORM component to create the PDF document

My Questions

  1. Because most of the forms are correctly build ( 99,9 <-> 99,8 % ) i won't think it is my own code/solution in the webdynpro,or am i wrong?
  2. The file is corrupt, so somewhere it most go bad. Out of my perspective, it could go bad:
    1. Creation of the PDF via the ADS
    2. Creation of the retuning binary object
    3. Translation to the XSTRING object
    4. Use of the XSTRING object in the InteractieForm component of the ABAP webdynpro, do you have any expierience with this?
    5. When i was developing adobe forms on anonther project, the ADS which creates the PDF objects,was sometimes corrupt. It returned strange errors, of made corrupt PDF document. We made a workaround. The workaround tries 3 times to create the PDF document via the ADS. Most of the times the first or second attempt did not work. The third attempt the PDF file was created via the ADS service. Could this also be the problem i am facing?
    6. Or is there something else i should look for?

Accepted Solutions (0)

Answers (1)

Answers (1)

AntonPierhagen
Active Participant
0 Kudos

The attachements won't work

Former Member
0 Kudos

Hello Anton,

does the error occur only for specific users at specific clients? May be the browser plug-in has a wrong version. I remember that i had the "%PDF" error in the past sometimes.

Take a look: http://forums.adobe.com/message/5280469

Regards Andreas

Former Member
0 Kudos

Hi Anton,

Please do a consistency check of your code with program - fp_check_batch_pdf_return

I am sure something is wrong on the ADS side or may be output params which might not be catering to the data being converted to PDF using ADS.

I'd strongly recommend you to refer this and make out the differences.

Pls reward points if it helps you.