cancel
Showing results for 
Search instead for 
Did you mean: 

Process data of a PDF file

Former Member
0 Kudos

Is there a developer out there who is familiar with the use of ABAP-class CL_FP_PDF_OBJECT to process the data of a PDF file.

I'm working on an Active Form which is being sent to a customer.

After the customer has filled in his or her data the form is sent back to us.

After that I need to process this data from the form and process it in SAP.

I would very much like a sample of a piece of code that actually works...

Attention: we're not working with WebDynpro yet, so it has to be ABAP processing only!

Regards

Wouter Heuvelmans

SABIC Europe

SAP Competence Center

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I hope this exercise should solve your problem.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977...

Regards,

Raja Sekhar

Former Member
0 Kudos

Hi Raja

Thanks for your reply.

But I do have some questions regarding the exercise.

Some of the data variables are not specified in the document and I wonder what they should be.

In the part "Set Document" there is a reference to a variable called pdf_data.

This variable is of type XSTRING but what data should be put in before the method is called? If you leave it empty, the program ends with a system exception.

I guess the outcome of the upload of the pdf file must be used here but I'm not sure how.

Do you have a working example?

Regards

Wouter

Former Member
0 Kudos

Hi Wouter,

I have the same problem. I have loaded the pdf_data table with the following, though I am not too sure if this is what is expected. Maybe you can give it a try and see if you get further than me.

DATA: LINE TYPE TLINE,

L_PDF_XSTRING TYPE XSTRING.

FIELD-SYMBOLS <P> TYPE X.

CLEAR L_PDF_XSTRING.

LOOP AT LT_RAWTAB INTO LINE.

ASSIGN LINE TO <P> CASTING TYPE X.

CONCATENATE L_PDF_XSTRING <P> INTO L_PDF_XSTRING

IN BYTE MODE.

ENDLOOP.

PDF_DATA = L_PDF_XSTRING.

This manages to pass the exception that you are having but bombs out at 'LO_PDFOBJ->EXECUTE( )'.

It would be good to see a complete working example.

Julian