Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing the selection screen

madhuchandan
Discoverer
0 Kudos
333

Hi . I have a transaction for my report and I have designed the screen using module pool screen for selection option. Whenever I enter to transaction it shows the previous entered data I have cleared my work area also I am unable to clear my field in my transaction could any one help me to clear the field value initially and only enter manual data

Thanks

3 REPLIES 3

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
279

madhuchandan

You can use the following code to clear the screen in ABAP:

CLEAR: wa_field1, wa_field2.
Copy

This will clear the values of the fields wa_field1 and wa_field2. You can replace these fields with the fields you want to clear1.

To clear the field value initially, you can set the initial value for the field in the module pool screen. You can also use the following code to clear the field value:

CLEAR: wa_field.
Copy

This will clear the value of the field wa_field. You can replace this field with the field you want to clear2.

xiswanto
Active Participant
279

providing the code would be easier to check the root problem

raymond_giuseppi
Active Contributor
0 Kudos
279

You could dynamically in event INITIALIZATION or AT SELECTION-SCREEN OUTPUT

  • Read current content of selection-screen using FM RS_REFRESH_FROM_SELECTOPTIONS
  • Loop at returned values and CLEAR parameters fields (kind = 'P') and select-options (kind = 'S') internal range tables, in second case use selecrit[] /or/ even use FM RS_SELECTIONSCREEN_UPDATE)

NB: But check also, why those data are persistent, are some parameters or select options carrying a MEMORY ID pid (in this case remove this option, or insure your program doersn't change their values, saving values at start of program, and restoring those at end)