cancel
Showing results for 
Search instead for 
Did you mean: 

Select Option functionality with its buttons

Former Member
0 Kudos

Hello everybody,

I have used a Select Option functionality in a WDA application (WDR_SELECT_OPTIONS).

It looks very fine. There are at the above section 4 Buttons (Cancel,Check, Reset, Copy) which are automatically inserted .

How can I program a functionality for them. Currently on cklick these buttons nothing happens.

Regards

sas erdem

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Uday thank you very much you are the best

Problem is solved but more question:

What can I e.g. program inside of cancel ?

Reagrds

sas

uday_gubbala2
Active Contributor
0 Kudos

Well Sas,

That's entirely up to you as to what functionality you want to implement in there. If you feel like there isn't any need for this button then you can always suppress the same.

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

Answers (5)

Answers (5)

Former Member
0 Kudos

uday thank you very much.

May I ask to you always questions ?

bye

sas

Former Member
0 Kudos

Hello Ranganathan

You are saying :

Create a method in the view with the method type has Event. Then select the F4 help in the event column which will give u all the events in the used components. Select the one which should be linked.

How can I create a method type has Event. Didn' do ever before.

Regards

sas

uday_gubbala2
Active Contributor
0 Kudos

Hi Sas,

I will try to explain you the procedure to follow for creating the corresponding method for 1 event say ON_CANCEL.

1) First go to your desired view and declare a component usage of the WDR_SELECT_OPTIONS. ( Go to the properties tab of the view and click on the "Create Controller Usage" button. Select the corresponding usages)

2) Now go go the methods tab of your view and specify a method name under "Method", select the method type as "Event Handler" & in the Event column select 1 of the events that you would get from the F4 help. (Suppose you had chosen ON_CANCEL from here then you would have to double click on your method name & write the corresponding code in there. This code would get triggered by the system when the user presses on the CANCEL button.)

Hope that this helps clear the confusion that you are having with the button events.

Regards,

Uday

Former Member
0 Kudos

Hi ,

WDR_SELECT_OPTIONS has interface events (ON_CHECK, ON_CANCEL ...) . U can link those events to ur method created on the view. Then u can write the desired functionality to those methods. U can check the object WDR_TEST_SELECT_OPTIONS. It has a text view UI which will increase the count when the buttons are clicked.

Ranganathan.

Former Member
0 Kudos

When I create methods in my view how can I link those events to my method created on the view.

Regards

sas

Former Member
0 Kudos

Hi,

Create a method in the view with the method type has Event. Then select the F4 help in the event column which will give u all the events in the used components. Select the one which should be linked.

Ranganathan.

Former Member
0 Kudos

Hi,

Once you pass an Action Event in the layout then automatically an event will be created in the methods tab...check in methods tab and you can see your method say onaction(your event name)...just double click on the method and put your logic.

once you select the button in the screeen this logic will trigger.

Thanks,

Sree.

Former Member
0 Kudos

please read my question more carefully.

I am not speaking about standard buttons.

Former Member
0 Kudos

Hi ,

Hope this link will help you in programming Select options..

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac...

A presentation from Thomas Jung.

Ranganathan.