cancel
Showing results for 
Search instead for 
Did you mean: 

How to create select options

Former Member
0 Kudos

Hi,

Please guide me to implement select options in webdynpro.

Regards,

Ratheesh BS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please help to disable the tool bar buttons

uday_gubbala2
Active Contributor
0 Kudos

Hi Ratheesh,

You can disable them using the SET_GLOBAL_OPTIONS method of the IF_WD_SELECT_OPTIONS class. Something like this:

wd_this->m_handler->set_global_options(  i_display_btn_cancel  = abap_false
                                                              i_display_btn_check   = abap_true
                                                              i_display_btn_reset     = abap_true
                                                              i_display_btn_execute = abap_true ).

Regards,

Uday

Former Member
0 Kudos

Hi Uday,

As i am new to webdynpro , can you explain me what is this 'm_handler' is it any method of type event . Please help.

Regards,

Ratheesh BS

uday_gubbala2
Active Contributor
0 Kudos

Hi Ratheesh,

Sorry for the late reply. The m_handler is just a normal reference variable of type if_wd_select_options. Within the WDDOINIT methos you would be calling the interface controller method init_selection_screen to get the helper class. You just need to use this reference for calling the method set_global_options with your desired criteria. Just try go through the sample code fragment below:

METHOD wddoinit .
  DATA: lr_select_options TYPE REF TO iwci_wdr_select_options.
  DATA lr_helper TYPE REF TO if_wd_select_options.
  DATA: lt_range TYPE REF TO data.
  DATA: lr_comp_usage TYPE REF TO if_wd_component_usage.

" This code is to instantiate the component WDR_SELECT_OPTIONS
  lr_comp_usage = wd_this->wd_cpuse_select_options( ).
  IF lr_comp_usage->has_active_component( ) IS INITIAL.
    lr_comp_usage->create_component( ).
  ENDIF.
" call the interface controller method init_selection_screen to get the helper class
  lr_select_options = wd_this->wd_cpifc_select_options( ).
" You are getting the necessary reference to the component into lr_helper here
  lr_helper = lr_select_options->init_selection_screen( ).
" Use the helper class to create a range table for the data element S_CARR_ID
  lt_range = lr_helper->create_range_table( i_typename = 'S_CARR_ID' ).
" Add a Selection Screen Field
  lr_helper->add_selection_field( i_id   = 'S_CARR_ID'
                               it_result = lt_range ).

" Removing the Cancel button from the toolbar displayed
  lr_helper->set_global_options(  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_true
                                  i_display_btn_reset   = abap_true
                                  i_display_btn_execute = abap_true ).

ENDMETHOD.

Hope this helps resolve your problem.

Regards,

Uday

adil_gndz
Explorer
0 Kudos

Hi,

I did all of them, they are valuable but i have a problem. At the beginning of the select-options there is a writing : \TYPE=D:

My date type is D. It must be about it but i can't solve that problem.

please help.

Answers (4)

Answers (4)

raja_narayanan2
Active Participant
0 Kudos

hi...

check this link.... [select options|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/1a3c52e7-0b01-0010-ed81-f31d4868c5d6]

Regards

Raja

Former Member
0 Kudos

Hi,

Please go through the following link. It may help you to resolve your problem.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c09fec07-0dab-2a10-dbbe-c9a26bdf...

Thanks.

Nitesh

Former Member
0 Kudos

Hi,

Go through this link it might help u a lot and can solve your query.

http://help.sap.com/download/documentation/additional/getstart/ecc50/GettingStarted_ECC50_EN.pdf

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

anand prakash rai

How in any way is the link you provided related to the question at hand? I have warned you once already today about posting unrelated links as answers to forum threads. Randomly throwing out links you found with a search engine will not be tolerated in this forum.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
Former Member
0 Kudos

Hi,

My requirement is getting data from 4.6c server to ECC 6 server,

User is interacting with webdynpro application running in ECC 6 the data is from 4.6c, so my select options also need to get data from 4.6c . So can you tell me if it is possible to fetch data from 4.6c to my select option in ECC 6.

Regards,

Ratheesh BS

Former Member
0 Kudos

Hi,

I have created select option as per my requirement , but i am getting a toolbar with cancel, check, reset,copy , is it possible to disable this feature ?

Thanks in advance,

Ratheesh BS

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi,

> I have created select option as per my requirement , but i am getting a toolbar with cancel, check, reset,copy , is it possible to disable this feature ?

> Thanks in advance,

> Ratheesh BS

Yes you can disable the eleents of the toolbar. You can use the SET_GLOBAL_OPTIONS method of the component interface (IF_WD_SELECT_OPTIONS) to disable any or all of the buttons on the standard toolbar.

Here is a link to the online help on the subject:http://help.sap.com/saphelp_nw70/helpdata/EN/47/a0c2fd687d0795e10000000a42189b/frameset.htm

And there is a demo application:

WDR_TEST_SELECT_OPTIONS

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi,

> My requirement is getting data from 4.6c server to ECC 6 server,

> User is interacting with webdynpro application running in ECC 6 the data is from 4.6c, so my select options also need to get data from 4.6c . So can you tell me if it is possible to fetch data from 4.6c to my select option in ECC 6.

>

> Regards,

> Ratheesh BS

It depends upon what you expect when yo usay fetch data form 4.6C to my select-option. Do you actually mean the value help attached to the select-option? If so that is rather complicated. There is no built in remote value help. You would have use a search help exit, an OVS, or a freely programmed value help to read the value help possible values remotely. This means programming for each value help individually.

Now if you just want to use the select-options in a SQL statement on 4.6C - that isn't difficult at all. A select-option is really just an internal table with a ranges type definition. You can pass the internal table as a parameter over RFC so that it can be used in the selection on the 4.6c side.

Former Member
0 Kudos

Hi,

Can you tell me how can i call the below mentioned method of the component interface method?

"Yes you can disable the eleents of the toolbar. You can use the SET_GLOBAL_OPTIONS method of the component interface (IF_WD_SELECT_OPTIONS) to disable any or all of the buttons on the standard toolbar. "

Regards,

Ratheesh BS