ALV的输出字段中触发消息

FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM
    SELFIELD TYPE SLIS_SELFIELD.
*  READ TABLE ITAB1 INDEX SELFIELD-TABINDEX.
*  CHECK SY-SUBRC = 0.
  CASE UCOMM.
    WHEN '&IC1'.
    DATA MSG TYPE STRING.
    FIELD-SYMBOLS <LINE> LIKE LINE OF ITAB1.
      READ TABLE ITAB1 INDEX SELFIELD-TABINDEX ASSIGNING <LINE>.
      CHECK SY-SUBRC = 0.
      CASE SELFIELD-SEL_TAB_FIELD.
        WHEN  '1-FLAG1' .
          CONCATENATE '优先级为1可能性不为100;策略不为2的项,T,L的成本核算相关检查' <LINE>-FLAG1 INTO MSG SEPARATED BY SPACE.
          MESSAGE MSG TYPE 'I'.
        WHEN '1-MATNR' .
          SET  PARAMETER  ID  'MAT'  FIELD  ITAB1-MATNR.
          CALL TRANSACTION  'CS02'  AND  SKIP  FIRST  SCREEN.
        WHEN  '1-FLAG2' .
          CONCATENATE '同一个物料对应重复的组件' <LINE>-FLAG1 INTO MSG SEPARATED BY SPACE.
          MESSAGE MSG TYPE 'I'.
        WHEN  '1-FLAG3' .
          CONCATENATE '同组的项目文本不唯一' <LINE>-FLAG1 INTO MSG SEPARATED BY SPACE.
          MESSAGE MSG TYPE 'I'.
        WHEN  '1-FLAG4' .
          CONCATENATE '同组中的项目优先级无序的项,同组中优先级必有一个不为1的项' <LINE>-FLAG1 INTO MSG SEPARATED BY SPACE.
          MESSAGE MSG TYPE 'I'.
        WHEN  '1-FLAG5' .
          CONCATENATE '后继物料和终止物料的组要相同' <LINE>-FLAG1 INTO MSG SEPARATED BY SPACE.
          MESSAGE MSG TYPE 'I'.
        WHEN  '1-FLAG6' .
          CONCATENATE '后继物料和终止物料的组要相同,且两者数量一致,项目文本相同' <LINE>-FLAG1 INTO MSG SEPARATED BY SPACE.
          MESSAGE MSG TYPE 'I'.
      ENDCASE.
  ENDCASE.
ENDFORM.                    "USER_COMMAND

你可能感兴趣的:(字段)