Skip to Content
0
Former Member
Jan 26, 2007 at 10:36 AM

Checking whether checkbox is inactive

25 Views

Hello!

My report outputs lines from DB to a list. In the list, there are lines with checkboxes. I mark a checkbox -> do an operation on the specified line -> return to the list. I make the checkbox in the line inactive through the following statement:

DATA markfield TYPE c.

DO lines TIMES.

READ LINE sy-index FIELD VALUE markfield.

MODIFY LINE sy-index FIELD VALUE markfield

FIELD FORMAT markfield INPUT OFF.

ENDDO.

Now, I want to check if the checkbox (markfield variable) is inactive and change it to active. How the logical expression should look like in the condition of IF statement?

I had this idea:

DO lines TIMES.

READ LINE sy-index FIELD VALUE markfield.

IF FIELD VALUE markfield FIELD FORMAT markfield INPUT OFF

MODIFY LINE sy-index FIELD VALUE markfield

FIELD FORMAT markfield INPUT OFF.

ENDIF.

ENDDO.

or:

DO lines TIMES.

READ LINE sy-index FIELD VALUE markfield.

MODIFY LINE sy-index FIELD VALUE markfield

FIELD FORMAT markfield INPUT ON

WHERE ....... " what condition?

ENDDO.

Count on your help 😊

Regards