Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9369

Re: How to clear contents of list box in abap

$
0
0

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


Viewing all articles
Browse latest Browse all 9369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>