Skip to Content
avatar image
Former Member

dialog program - clear all screen fields

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 09, 2010 at 10:06 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 09, 2010 at 10:12 AM

    Hi,

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hey

      thanks for the intel .

      any other ideas ?

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

  • avatar image
    Former Member
    Apr 09, 2010 at 10:20 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • Apr 09, 2010 at 11:02 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 09, 2010 at 12:34 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2010 at 05:57 PM

    clear all relevant structures ...

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 19, 2015 at 01:06 PM

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

    Add comment
    10|10000 characters needed characters exceeded