DATA(LV_LINES) = REDUCE I( INIT X = 0 FOR LS_TEMP IN GT_ALV WHERE ( SEL = 'X' AND LIGHTS = '@08@') NEXT X = X + 1 ). IF LV_LINES = 0. MESSAGE '请选择要操作的数据,红灯数据不能操作' TYPE 'S' DISPLAY LIKE 'E'. LK_FLAG = 'X'. ENDIF. IF LK_FLAG = 'X'. RETURN. ENDIF.