Background of the issue:
– A Web dynpro ABAP Application is holding a custom Adobe Interactive form on the view. There is a button named ‘Back’ on the same view on click to which the end user will be navigating to the previous view.
– In the case when the navigation to the previous view is done, the data displayed on the Adobe form is not cleared even though the code of setting the values of fields to null/space is written on the BACK button event.
– Due to this when the User comes back to the Adobe form (second view) from the first view page, still the Adobe form displays the old data in it.
– Use of simple set_attribute method for clearing (set to space/null) is not sufficient.
– The ‘INVALIDATE’ method has to be used to invalidate the WD_CONTEXT holding Adobe data as described below.
1) Web Dynpro Application is created in SE80 Tcode by creating the Web Dynpro component with two views as ‘View1’ and ‘View2’.
View1 has nothing but simple text to display and a button that takes the end user to the next view ‘View2’.
View2 is holding a custom button (‘BACK’) type (UI element ‘BUTTON’) and an Adobe interactive Form.
The interface for the Adobe interactive form is a XML Schema based ‘generated’ interface. The adobe form is of type ‘ZCI Layout’.
The context node in View2 ‘Adobe_data_src’ is bind with the Data source for the Adobe form.
2) When the Button of ‘Back’ is clicked all the Data fields on the adobe form should be set to blank/space (like below).
3) Create an application for the component and test it via running it in the IE browser.
Click on the ‘Next’ button of View1 (default view) launched. This will take the user to the next view (View2.
Enter the text in the input field on Adobe form. Then click on Back button.
Once the View1 is displayed, click on the ‘Next’ button and again navigate back to View2.
This proves that just clearing the context variables is not sufficient.
4) So now let’s change the code on the BACK button event handler (ONACTIONBACK) to the following and activate the component.
5) Now test the application and it will work. The data entered on the adobe form no longer will be stored in adobe form (Context of component) and it will be completely invalidated as soon as BACK button will be clicked.