Hi Praveen,
Please see the below sample code to clear the list box value in selection screen.
in below report we have three list box selection
Message Type
Basic type
Extension
first user will select message type then basic type and if he click on message type again then you can clear the previously selected basic type.
use the user command extension while defining list box and depend on sy-ucomm you can clear the old values of dependent list box.
hopefully this will serve your requirement.
REPORT ZTEST_LIST_BOX.
tables:EDIMSG.
PARAMETERS:
MESTYP LIKE EDIMSG-MESTYP AS LISTBOX VISIBLE LENGTH 30 USER-COMMAND chx1,
IDOCTYP LIKE EDIMSG-IDOCTYP AS LISTBOX VISIBLE LENGTH 30 USER-COMMAND chx2,
CIMTYP LIKE EDIMSG-CIMTYP AS LISTBOX VISIBLE LENGTH 30.
AT SELECTION-SCREEN..
if sy-ucomm = 'CHX1'.
CLEAR: IDOCTYP,CIMTYP.
ELSEIF sy-ucomm = 'CHX2'.
CLEAR CIMTYP.
ENDIF.
Regards
Chudamani Gavel