cancel
Showing results for 
Search instead for 
Did you mean: 

Collapase Select Options Tray

Former Member
0 Kudos

Hi All,

I am reusing Select Options( WDR_SELECT_OPTIONS ) in my screen.

Is there a way to collapse the Tray(  if_wd_select_options=>mc_block_type_tray ) of Select Options when the page is initially loaded.

This is  my code for Adding a tray and adding select option fields using add_selection_field later.

* create a block
  wd_this->l_handler->add_block(  i_id         = 'ID01'
                                  i_block_type            = if_wd_select_options=>mc_block_type_tray
                                  i_title                      =  ' '

                                  i_width                    = '100%').

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Santosh,

There is no standard method available to control the behaviour BLOCK  of WDR_SELECT_OPTION.

You need to do an enhancement in view SELECTION_SCREEN of component and use the post exit of WDDOMODIFYVIEW( ) method.

Sample code;


  IF FIRST_TIME EQ ABAP_TRUE.

    DATA LO_TRAY TYPE REF TO CL_WD_TRAY.

      LO_TRAY ?= VIEW->GET_ELEMENT('ID01').

  if lo_tray is bound.

      LO_TRAY->SET_EXPANDED( ABAP_FALSE ).

  endif.

  ENDIF.

Note: the changes made in WDR_SELECT_OPTIONS may impact globally for other applications. Instead you can copy the component WDR_SELECT_OPTION and do the necessary changes.

Hope this helps you.

Regards,

Rama