Application Development and Automation 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: 
Read only

dialog program - clear all screen fields

Former Member
0 Likes
4,530

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
Read only

Former Member
0 Likes
2,479

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
Read only

Former Member
0 Likes
2,480

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.

Read only

Former Member
0 Likes
2,479

Hi,

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

Read only

0 Likes
2,479

hey

thanks for the intel .

any other ideas ?

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

Read only

Former Member
0 Likes
2,479

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.

Read only

0 Likes
2,479

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

ASA

Read only

0 Likes
2,479

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.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,479

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.

Read only

Former Member
0 Likes
2,479

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..

Read only

Former Member
0 Likes
2,479

clear all relevant structures ...

Read only

0 Likes
2,479

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