Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Generating a PDF in Web Dynpro without using InteractiveForms

Hello All,

I have been following this tutorial <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial%20on%20working%20with%20the%20pdf%20document%20object%20-%2032.htm">http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial%20on%20working%20with%20the%20pdf%20document%20object%20-%2032.htm</a> from SDN and is currently stuck.

<u><b>What I'll like to achieve</b></u>

1) User logs on to the system and a table displaying a list of items for approval appears.

2) the user is then able to select a row item from the table and click on 'approve'. In doing so, my application should generate a pdf form in the background and attach it as an email attachment and sent that email to an appointed vendor.

<b><u>Problem</u></b>

As there is no InteractiveForm involved, I do believe I will need to provide the template (.xdp) so that the PDF can be generated. In the tutorial, it suggests doing this (I modified it a little to reflect my own path name):

InputStream templateSourceInputStream = getClass().getClassLoader().getResourceAsStream("d:
usr
sap
pdf
PDF
XBCRPDFPreviewView_InteractiveForm1.xdp");

However, I am given a NullPointerException when I attempt to do that. Does anyone has any idea what may have caused the error ? Thank you.

from

Kwok Wei

Former Member
Not what you were looking for? View more on this topic or Ask a question