cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable button in WDA

Former Member
0 Kudos

Dear All,

I have requirement that i have to disable save button after saving contents means it has to be enable for only one time and it has to save the contents into DBT.

but in my case if i click save button on 10 times it is saving 10 times.so how to disable my save button after inserting data into DBT.

I have seen code for this in SDN but everyone has suggested to write code in modifyview but here in my application iam not changing anything in view.

how to disable button.

please help out.

thanks in adv.

reg

shiv

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Create an attribute disable of type WDY_BOOLEAN in context. Now bind the enable property of the button to the created attribute.

In onAction of Save button , after saving to data base, if sy-subrc = 0. set the attribute disable to abap_false.

Hope this helps u.,

Regards,

Kiran

Answers (1)

Answers (1)

Former Member
0 Kudos

create a attribute type wdy_boolean in context and bind thsi with button visibility.

on save button action  change this attribute value so it will change visibility of your button.