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

clearing screen elements at a time

Former Member
0 Likes
291

hi gurus,

can i have a technique by which i can clear all the screen elements at a time. I mean to reset that screen elements.

One option i have is to call that transaction once again but that has its own limit i,e 6.

other is to manually clear it as many elements we have like p_matnr = ' ',p_mtart = ' '. but it takes time. Can i have a technique which can clear all the elements in a screen at a time.

Thanks in advance,

Gaurav

1 REPLY 1
Read only

RaymondGiuseppi
Active Contributor
0 Likes
262

You could try to do this in the Process Before Output or AT SELECTION-SCREEN OUPUT block :

Sample :

REPORT ZCLRSEL.
TABLES: mara.
PARAMETER para LIKE mara-matnr.
SELECT-OPTIONS selo FOR mara-matnr.

FIELD-SYMBOLS: <fs> TYPE ANY,
               <so> TYPE ANY TABLE.

DATA: fieldname LIKE screen-name,
      dummy.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CHECK screen-input = 1. " only input fields
    IF screen-name CS '-LOW' " SELECT-OPTIONS
    OR screen-name CS '-HICH'.
      SPLIT screen-name AT '-' INTO fieldname dummy.
      CONCATENATE fieldname '[]' INTO fieldname.
      ASSIGN (fieldname) TO <so>.
      REFRESH <so>.
    ELSE. " single PARAMETERS
      fieldname = screen-name.
      ASSIGN (fieldname) TO <fs>.
      CLEAR <fs>.
    ENDIF.
  ENDLOOP.

Regards