cancel
Showing results for 
Search instead for 
Did you mean: 

Button Action not triggering?

Former Member
0 Kudos

Hi All,

I created one table, with toolbar contains 3 buttons. when browser started first time only i button in enable mode, when user select any row on table 2 and 3 buttons should enable. up to this working file. but button actions are not triggering. 1 button action is triggering 2 and 3 button actions are not triggering? could any body help where is the problem???

Thanks,

kris.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

have you declared event\ action on click on button 2 and 3. I don't see any other reason.

Regards

Manas Dua

Former Member
0 Kudos

Hi manas

I created actions for all buttons. These buttons are working fine without enable/disable functionality, i mean(at starting i want 1st button enable after selecting row in a table, then 2 and 3 buttons should be enable). without this, if i place 3 buttons enable at starting, actions are working fine. i am creating buttons in a button row, and i displayed all buttons in 1 row. i am not getting where is the problem?

Thanks,

kris.

Former Member
0 Kudos

hi,

How and when are you enabling/disabling the button?

Can u post the code?

Thnks,

aditya.

Former Member
0 Kudos

Hi Aditya,

i have 3 buttons , first button is enable at starting, while user select any row in a table, then 2nd and 3rd buttons wil enabled, that is working fine. buttons actions are not triggering.

i create one attribute of type wdy_boolean, and i bind this to 2nd and 3rd buttons enabled property. In table at onleadselection, i create one event, here is the code..

DATA lo_nd_changing TYPE REF TO if_wd_context_node.

DATA lo_el_changing TYPE REF TO if_wd_context_element.

DATA ls_changing TYPE wd_this->Element_changing.

DATA lv_set_enable TYPE wd_this->Element_changing-set_enable.

  • navigate from <CONTEXT> to <CHANGING> via lead selection

lo_nd_changing = wd_context->path_get_node( path = 'EMP_CHANGING` ).

  • get element via lead selection

lo_el_changing = lo_nd_changing->get_element( ).

  • @TODO handle not set lead selection

  • get single attribute

lo_el_changing->set_attribute(

EXPORTING

name = `SET_ENABLE`

value = '02' ).

Thanks,

kris.

Former Member
0 Kudos

HI,

I guess , You have to use values 'X' and ' ' to enable and disable the buttons.

Because WDY_BOOLEAN has the following values.

'X' = true.

'' = false.

May be you can try doing this , in your set_attribute() pass values 'X' and '' instead of '00' or '02'.

Please let us know if it works.

Regds,

aditya.

Former Member
0 Kudos

Hi Aditya,

Thats greate. WDY_BOOLEAN works with 'X' and ' '.

Tahnks,

kris

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Instead of X and blank you should really use the constant ABAP_TRUE and ABAP_FALSE.

Answers (1)

Answers (1)

phil_soady
Participant
0 Kudos

check you have entries in the context and that the fields/buttons are active.

eg dynamic active based on context ?

Former Member
0 Kudos

hi soady

thanks for your reply, i am not getting what you are saying. dynamic active??.. all are in active state only... help please

Thanks,

kriss.