01-26-2007 10:36 AM
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
01-26-2007 11:01 AM
check these useful tips
if checkbox = 1. " It is marked and inactive
= X " it is marked and active
= 0 " it is not marked and inactive
= space " it is not marked and active
u can modify ur code accordingly
01-26-2007 10:53 AM
Hi
READ LINE sy-index FIELD VALUE markfield into flag.
IF FLAG = 'X'.
-
> Checkbox active
ELSE.
ENDIF.
Max
01-26-2007 10:57 AM
DO lines TIMES.
READ LINE sy-index FIELD VALUE markfield into field.
if field <> 'X'.
write ' Check Box is Inactive'.
endif.
MODIFY LINE sy-index FIELD VALUE markfield
FIELD FORMAT markfield INPUT ON
WHERE ....... " what condition?
ENDDO.
01-26-2007 11:01 AM
check these useful tips
if checkbox = 1. " It is marked and inactive
= X " it is marked and active
= 0 " it is not marked and inactive
= space " it is not marked and active
u can modify ur code accordingly
01-26-2007 11:36 AM