Showing results for 
Search instead for 
Did you mean: 

Regarding Checkbox for input field

Former Member
0 Kudos

Hello everyone,

I have a requirement where in the input field should be visible for the user to input when the check box is marked otherwise it should be invisible. Thanks in advance for ur replies.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In your context, have an attribute 'visible' of type char01. Read the checkbox value by reading the context element. If the checkbox is checked, this will be 'X' or else it will be space. If it is 'X', set the attribute 'visible' as true. You should do that as



name = 'visible'

value = abap_true).

Bind the 'visible' property of the input field to the visible context attribute. So when the context gets set, the visibility of the element will be manipulated accordingly. You could insert this code into the event handler for the checkbox toggle event.



0 Kudos


You can implement it in a simple way.Your check box UI element will be bound a context attribute of type char1 (xfeld) .Now in your textbox bind the visibility property to the same attribute.

Which means that , if the checkbox is ticked , the text box will be visible.Else not..



Former Member
0 Kudos

Thankyou Nithya and Mohammed. Your answers were helpful and solved my prob too.