cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in Select Options

Former Member
0 Kudos

Hi all,

Iam doing a development in which iam using select option component. i have 4 selection para meters. When i use the Component iam getting 4 default buttons RESET, COPY etc.

Is this 4 buttons mandatory? i also know we can remove the buttons via abap code but stil when i remove Copy button my select options doesnt get any input from screen . Same PO when i use with Copy button (after pressing copy button) its recognising.

Kindly help me in resolving this issue

thanks

dhinesh

Accepted Solutions (1)

Accepted Solutions (1)

P1029777
Explorer
0 Kudos

Hi Dhinesh ,

As far as concerned about SELECT-OPTION in ABAP WEBDYNPRO, I dont think, if we use SELECT-OPTION, it comes with any button.

For select option ,

1. we use SELECT-OPTIONS type WDR_SELECT_OPTIONS IN your COMPOENET, under USED COMPONENT

2. we use VIEW_CONTAINER_UI_ELEMENT and we write code -generally in WD_INIT METHOD

3. M_HANDLER and M_WD_SELECT_OPTIONS attribute

Please Follow below link for better example.

http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages

I hope it will be helpful for you.

Regards.

Gyanendra

Former Member
0 Kudos

hi gya,

Thanks for your reply..

i have gone to a standard component.. WDR_TEST_SELECT_OPTIONS.

In which you can see 4 buttons cancel check reset copy. those were the buttons i was talking about

thanks

dhinesh

Kishore25sap
Explorer
0 Kudos

Hi Dinesh,

Use this code

DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .

lo_interfacecontroller = wd_this->wd_cpifc_select_options( ).

DATA lo_r_helper_class TYPE REF TO if_wd_select_options.

lo_r_helper_class = lo_interfacecontroller->init_selection_screen(

).

CALL METHOD lo_r_helper_class->set_global_options

EXPORTING

i_display_btn_cancel = ABAP_false

i_display_btn_check = ABAP_false

i_display_btn_reset = ABAP_false

i_display_btn_execute = ABAP_false

.

Regards

Kishore

Edited by: kishore venkat on Aug 23, 2011 12:05 PM

saravanan_narayanan
Active Contributor
0 Kudos

Hello Dhinesh,

Just a clarification. How are you saying the values entered in the select options are not populated? Did you trigger any server roundtrip?

For the select option values to be populated in the range table, you need to trigger a server roundtrip. It can be either by standard COPY button provided by the selection component or via a custom button (say 'Go') created by us.

BR, Saravanan

bhargavab4
Explorer
0 Kudos

Hi dinesh,

Try with the m_handler attribute instead of the standard helper class object .

Regards,

Bhargava

0 Kudos

Hi Dhinesh,

Hope the below snippet solves your purpose

DATA: LT_RANGE_TABLE TYPE REF TO DATA,

RT_RANGE_TABLE TYPE REF TO DATA,

LT_RANGE_TABLE1 TYPE REF TO DATA,

RT_RANGE_TABLE1 TYPE REF TO DATA,

READ_ONLY TYPE ABAP_BOOL,

TYPENAME TYPE STRING.

DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,

L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.

  • create the used component

L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_ZSELECT_OPTION( ).

IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

L_REF_CMP_USAGE->CREATE_COMPONENT( ).

ENDIF.

WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_ZSELECT_OPTION( ).

  • init the select screen

WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ).

WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(

I_DISPLAY_BTN_CANCEL = ABAP_False

I_DISPLAY_BTN_CHECK = ABAP_False

I_DISPLAY_BTN_RESET = ABAP_true

I_DISPLAY_BTN_EXECUTE = ABAP_False ).

  • create a range table that consists of this new data element

LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'Your Feild' ).

WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'Your Feild'

IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).

Answers (1)

Answers (1)

Former Member
0 Kudos

hi sri,

That solved my problem

thanks guys!!!