• 屏幕里输入字段值后的检查 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.
  • 相关阅读:
    Hadoop之MapReduce
    Hadoop之序列化
    Hadoop之mapreduce 实例五
    Hadoop之hive和hadoop的交互流程
    protel总结1
    将正数十进制转换为2~16进制数
    基于verilog分频器总结
    MATLAB设计FIR滤波器
    centos7+hadoop完全分布式集群搭建
    Linux下常用配置文件
  • 原文地址:https://www.cnblogs.com/rainysblog/p/14213873.html
Copyright © 2020-2023  润新知