统计这行有多少条数据

Posted on 2023-05-25 23:42  Chris的博客  阅读(7)  评论(0编辑  收藏  举报
  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.