‎2007 Dec 06 8:50 AM
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
‎2007 Dec 06 9:11 AM
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