cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear the form.

Former Member
0 Kudos

Hi Gurus,

I have an Adobe form developed in WDP abap. once the form is filled, it goes to second view. In the second view, I have put a link to come back to first form. I wanted the first form to be cleared before I come to the form. Now its showing the old values only.. Please let me know how the form is cleared.

Accepted Solutions (1)

Accepted Solutions (1)

amolgupta
Active Contributor
0 Kudos

hi David,

i just found out one more interesting thing.

for every view there are properties...

like Layout | Context | Properties

go to properties.

on the right hand side there is a Label... "View Properties"

below it is a dropdown...

which has two options...

1).framework controlled

2).when visible

1). <b>when "framework controlled" is choosen.</b> the context state is maintained over navigation to other views. ie when you come back to the view the <b>context state is maintained</b> but wdDoInit() method is not invoked the second time you visit the same page.

2). <b>when "when visible" is choosen. </b> the context state is not maintained over navigation to other views. ie when you come back to the view the <b>context state is not maintained</b> and wdDoInit() method is invoked every time you visit the same page.

so when you choose "when visible" the last context state will be forgotten.

PLUS wdDoInitmethod() will be available to you everytime you navigate to the same page.

with regards,

-amol gupta

Former Member
0 Kudos

Thanks a lot Amol, Its working.

Answers (2)

Answers (2)

amolgupta
Active Contributor
0 Kudos

hi david,

all the UI elements in the adobe form are generally connected to your web-dynpro Context.

whatever you type in the online adobe form is reflected in the respective <b>context attributes</b> of the <b>dynpro Context</b> of the view where "ur Interactive form UI element is".

that means you can yourself fill the contents of ur interactive form by working on the get/set methods of the context attributes.

Likewise you can clear the form by setting all context attributes to blank eg ""

so when you are navigating back to the first page clear the context values...

with regards,

-Amol Gupta

Former Member
0 Kudos

Hi,

You can implement a cleanup/reset method of your context nodes and attributes in the WDDOINIT method of the view containing your PDF.

Regards,

Francois

Former Member
0 Kudos

Hi Francois,

Thanks for your response.

Can you please let me know in detail with code, since I dont see any syntax for cleanup/reset anywhere.

Former Member
0 Kudos

Hi David,

Write the ABAP statements using CLEAR <field names>. in your WDA code in the initialization method.

- anto.