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: 

dialog program - clear all screen fields

Former Member
0 Kudos

hey ,

i have a dialog program type 1 that is called from a tranascation code to a menu in screen 100 .

from screen 100 i'm calling several screen by using 'CALL SCREEN XXX'.

when i'm coming back to screen 100 by using 'LEAVE TO SCREEN 100' all of the screen fields in screen XXX

is not cleared .

can i clear all of the screen fields at once some how or sould i use other commands beside call screen to navigate

between the screens ?

Regards

ASA

1 ACCEPTED SOLUTION

Former Member
0 Kudos

there is no CLEAR SCREEN statement in ABAP as far as i know.

So you need tomanually clear all the fields on that screen in PBO. maybe you need some criteries to check cause there might be some cases where you dont want to clear your fields, tho i cant know that.

10 REPLIES 10

Former Member
0 Kudos

there is no CLEAR SCREEN statement in ABAP as far as i know.

So you need tomanually clear all the fields on that screen in PBO. maybe you need some criteries to check cause there might be some cases where you dont want to clear your fields, tho i cant know that.

Former Member
0 Kudos

Hi,

Clear all fields in PBO of screen 100, can not clear in one go , as we don't have any control then.

0 Kudos

hey

thanks for the intel .

any other ideas ?

maybe calling the screens by call transaction or change to prog type to module pool ?

Former Member
0 Kudos

Before you go back to screen 100 (with LEAVE TO SCREEN...) clear the screen fields. That should do the trick.

E.g.

CLEAR: screen100_field1, screen100_field2,... and so on.

LEAVE TO SCREEN 100.

0 Kudos

i have over 100 fields ( many subscreens ) so i want to use something more efficient

ASA

0 Kudos

Most simple way: define your screen fields in a structure and then clear the structure.

E.g.

data: begin of wa_screen100,
            field1,
            fielld2,
            and so on....
         end of wa_screen100.


clear wa_screen100.

kesavadas_thekkillath
Active Contributor
0 Kudos

Hi,

Generally we declare a single UI structure which consists of all the fields used in the screen.

so

data:wa type zuistructure.

name the screen fields like wa-field1,wa-field2 etc

clear wa. "I think this will clear all fields.

Former Member
0 Kudos

In the PBO part of screen 100.

include clear statements for all fields which you need to be blank when you return to screen 100.

for example :

clear wa_vbap-vbeln.

clear wa_vbap-posnr.

clear wa_vbap-cmpre.

hope this solves your problem..

Former Member
0 Kudos

clear all relevant structures ...

0 Kudos

Please check that in the "lay out"  the set and get parameters, are not checked, other wise you cannot clear the values