Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to change a button attributes dynamically?

hi friends,

I have to change attributes of a button dynamically when another button clicked.

In my BSP there are 2 buttons.

1. CHANGE

2. UPDATE

i have to change only DISABLED attribute of these two.

Now when i clicked on CHANGE automatically UPDATE BUTTON has to be ENABLED and CHANGE BUTTON has to be DISABLED.

How can i change attributes in event handler.

Thanks & Regards,

Shankar.

replied

Hi,

Try this.... On input processing

DATA: event type REF TO cl_htmlb_event,
      button type  ref TO cl_htmlb_button.
event ?= cl_htmlb_manager=>get_event( runtime->server->request ).
 clear: status.
  if event is not INITIAL.
   case event->id.
    when 'btn_up'.
      status = 'false'.
       status1 = 'true'.
      when 'btn_ch'.
         status = 'true'.
        status1 = 'false'.
        endcase.
        endif.
On create
status = 'false'.
status1 = 'false'.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question