cancel
Showing results for 
Search instead for 
Did you mean: 

Creating interactive Forms (WD Java)

Former Member
0 Kudos

Hi everyone,

I'm developing a Web Dynpro for Java Application with an Interactive Form.

Basicallly it's a modification of the UploadDownload Exaple from SDN.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0d1d1ce-56ef-2910-ff88-f3d1afe0...

In the first step I download an interactive pdf document. Do I have to use an existing PDF document like in the example or can it be created from the Template (xdp file)?

Best regards,

Olaf

Accepted Solutions (1)

Accepted Solutions (1)

harman_shahi
Contributor
0 Kudos

Hi Olaf,

I think you should be able to use existing PDF, existing template (XDP), or create a new PDF. All PDF forms that are created in Web Dynpro have an XDP file in the background.

If you have an existing XDP file that you want to use, you should be able to use it as following:

Copy your XDP file at the following location: <your project folder> \src\configuration\Components\<package name>\ example.xdp.

Then in your Web DynPro View, change the templateSource property of your InteractiveForm object to example.xdp.

Hopefully this helps, Please let me know if you have any other questions

Harman

Former Member
0 Kudos

Hi Harman,

thank you for your answer. I have one more question to you:

I have an XDP File that I want to use for an UploadDownload Scenario. In the example from SAP a ready made PDF file is used to download from the server. The only thing I have is my custom made XDP File. How can I create the interactive PDF like in the example?

Best regards,

Olaf

harman_shahi
Contributor
0 Kudos

Hi Olaf,

You can do it couple of different ways. One is to use the method I described in my previous reply. After youu2019ve done those steps, and run your project, you should see the Adobe file (PDF) created. You can then save it, and use it.

Another way would be to just use Adobe LiveCycle Designer (you must have this installed if youu2019re planning to work with Adobe forms):

Open Adobe LiveCycle Designer, Goto File > Open > Select your XDF file, then goto the Preview Tab, Now you should be able to save the file locally.

Hope this helps,

Harman

Former Member
0 Kudos

Hi Harman,

I saved the PDF File as you described.

The PDF is not interactive. I get a message that I can't save the data entered in the form.

In the example from SAP the document is editable.

Best regards,

Olaf

harman_shahi
Contributor
0 Kudos

Hi Olaf,

In order to make the Adobe form interactive (so you can data within), you have to follow the first method (created Interactive Form object within webDynpro, and then run the project to retrieve the PDF file)

In addition to that, you need to do the following:

1) In your Adobe Livecycle Designer, Select, Edit > Form Properties, in the Default tab, set u201CPreview Typeu201D to u201CInteractive formu201D

2)

You have to Place the following code in the wdDoModifyView method of the View where the form is placed.

IWDInteractiveForm iForm1 = (IWDInteractiveForm) view.getElement("<name of your form here");
iForm1.setDynamicPDF(true);

See the following thread for details:

Hope this helps,

Harman

chintan_virani
Active Contributor
0 Kudos

Harman,

I have never used the above code as you mentioned and also seen on SDN quite a few times that above code helps people to create Dynamic forms.

As per my understanding if you have valid credentials, set Preview Type as Interactive in LiveCycel Designer, and set the enabled property as true for the InteractiveForm element in NWDS/Se80 you don't have to write any extra code.

So am I wrong here?

Chintan

Answers (0)