cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Offline PDF form validation

Ratherfish
Explorer
0 Likes
1,124

I'm in the process of developing an offline interactive adobe form in order to automate the update of multiple ECC custom tables.  I'm going to perform the table update using a Web Dynpro application.  Within the Web Dynpro I want to validate the data in the form to ensure that all the required data is in place for the eventual update of the ECC tables.  In the event that there is an error with the data I want to inform the user the field in error and the required input.

The Web Dynpro has two views.  A main view for the user to select the form to be uploaded and a second view to display the form and contain a button to validate/submit the update data.

I'm familiar with how to build the form, use the required field option, scripting functionality etc...  The form is built with numerous input fields and numerous dropdown lists which have tables that are dynamically bound to them.  There is also a dynamic table that has the remove and add instance instanceManager methods coded.

Where I'm hitting the snag is in the validation-user notification process within Web Dynpro.  There is an on action event button  (outside the InteractiveForm UI element) on the view containing the PDF that triggers the validation.  I identify that there is an error with the data and display the error message in the Message Area of the view containing the form.

The problem is that after the error notification the form now only has the data that was filled in.  The drop down list fields have just the value selected not all the previously available values.  The dynamic table gets cleared losing all the data entered.  The fields with a single value are ok.  I want to give the user uploading the form the ability to correct the data in the form and retry the update but the form now doesn't have all the functionality that it did prior to the validation.

How do I refresh the InteractiveForm UI element so that the form is back in the pre validation state?

I've found bits and pieces to the solution but I don't know how to put it all together.

Component     Release     SP-Level      Support Package     Description

SAP_BASIS     740             0004             SAPKB74004        SAP Basis Component

SAP_ABA        740             0004             SAPKA74004        Cross-Application Component

View Entire Topic
Ratherfish
Explorer
0 Likes

I managed to resolve this myself.  Not sure if it's advisable but it worked for me.

In the WDDOMODIFYVIEW method I captured the VIEW reference to a global attribute of the view.

Within the validation method I capture the "pdfSource" to a global attribute of the view using the get_attribute method.

I created an action that I only call programmatically (after I issue the error message) that sets the "pdfSource" to the global attribute value using the set_attribute method.

In the WDDOAFTERACTION method I execute the reset_view method using the global attribute captured earlier in the WDDOMODIFYVIEW as the reference.

ramakrishnappa
Active Contributor
0 Likes

Hi Gerald,

Please close the discussion by marking answers as helpful / correct answers if those helped you in resolving issue.

Regards,

Rama