• 屏幕里输入字段值后的检查 SCREEN FIELD CHECK ON INPUT


      FIELD: zbpmt003-equnr
     MODULE zbpmt003_equnr_change ON INPUT.

    *&---------------------------------------------------------------------*
    *&      Module  ZBPMT003_EQUNR_CHANGE  INPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE zbpmt003_equnr_change INPUT.
    
      PERFORM frm_equnr_change.
    
    ENDMODULE.
    
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *  -->  p1        text
    *  <--  p2        text
    *----------------------------------------------------------------------*
    FORM frm_equnr_change .
    
      IF zbpmt003-equnr IS NOT INITIAL.
        "select EQKT-EQKTX
        CLEAR: zbpmt003-eqktx.
        SELECT SINGLE eqktx INTO zbpmt003-eqktx
                 FROM eqkt
                WHERE equnr EQ zbpmt003-equnr
                  AND spras EQ sy-langu.
        IF sy-subrc NE 0.
          SHIFT zbpmt003-equnr LEFT DELETING LEADING '0'.
          CONCATENATE TEXT-021 zbpmt003-equnr TEXT-022 INTO DATA(lv_msg) SEPARATED BY space.
    * DATA(lv_msg) = '设备' && zbpmt003-equnr && '不存在'.
          MESSAGE e003 WITH lv_msg.
        ENDIF.
    
        CLEAR: zbpmt003-tplnr,zbpmt003-kostl.
        "EQUZ-EQUNR=ZBPMT002-EQUNR, EQUZ-DATBI=”9999.12.31”,
        "ILOA-ILOAN=EQUZ-ILOAN, select ILOA-TPLNR
        SELECT SINGLE b~tplnr b~kostl INTO ( zbpmt003-tplnr,zbpmt003-kostl )
                 FROM equz AS a
                 JOIN iloa AS b
                   ON a~iloan EQ b~iloan
                WHERE a~equnr EQ zbpmt003-equnr
                  AND a~datbi EQ '99991231'.
        IF zbpmt003-tplnr IS INITIAL.
          MESSAGE i003 WITH TEXT-023. "'设备号找不到功能位置'.
        ENDIF.
        IF zbpmt003-kostl IS INITIAL.
          MESSAGE i003 WITH TEXT-024."'设备号找不到成本中心'.
        ENDIF.
    
        "get Submit Department提出部门
        CLEAR: zbpmt003-ingpr1.
        SELECT SINGLE ingrp INTO zbpmt003-ingpr1
                 FROM equz
                WHERE equnr EQ zbpmt003-equnr
                  AND datbi EQ '99991231'.
        IF zbpmt003-ingpr1 IS INITIAL.
          MESSAGE i003 WITH TEXT-025."'设备号找不到提出部门'.
        ENDIF.
      ENDIF.
    
    ENDFORM.
  • 相关阅读:
    [HAOI2014]贴海报
    【模板】高斯消元法
    2015FAI
    ASP.NET网站图标,始终不显示是怎么回事
    小说自动生成项目
    电脑写小说可行吗?(四)情绪的本质
    电脑写小说可行吗?(三)智能体
    电脑写小说可行吗?(二)情感理论
    电脑写小说可行吗? (一)电脑能做什么
    留言板
  • 原文地址:https://www.cnblogs.com/rainysblog/p/14213873.html
Copyright © 2020-2023  润新知