• 屏幕字段不允许直接输入,只能通过SearchHelp(F4)


    ---恢复内容开始---

    REPORT  z_barry_test NO STANDARD PAGE HEADING .

    PARAMETERS: p_date TYPE sy-datum ,
                p_bukrs LIKE t001-bukrs ,
                p_str(10).

    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CASE screen-name.
          WHEN 'P_DATE' OR 'P_BUKRS'.
            screen-input = 0.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_date. "方法一
      CALL FUNCTION 'F4_DATE'
        IMPORTING
          select_date = p_date.
      LEAVE SCREEN.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs. "方法二
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname     = 'T001'
          fieldname   = 'BUKRS'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'P_BUKRS'
          display     = 'F'.   " <-- Force

     
     
    如果是自定义的Screen,可以使用POV Process
    PROCESS ON VALUE-REQUEST  .
      FIELD P_bukrs MODULE mf4.
     
    然后使用方法二

    ---恢复内容结束---

    REPORT  z_barry_test NO STANDARD PAGE HEADING .

    PARAMETERS: p_date TYPE sy-datum ,
                p_bukrs LIKE t001-bukrs ,
                p_str(10).

    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CASE screen-name.
          WHEN 'P_DATE' OR 'P_BUKRS'.
            screen-input = 0.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_date. "方法一
      CALL FUNCTION 'F4_DATE'
        IMPORTING
          select_date = p_date.
      LEAVE SCREEN.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs. "方法二
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
        EXPORTING
          tabname     = 'T001'
          fieldname   = 'BUKRS'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'P_BUKRS'
          display     = 'F'.   " <-- Force

     
     
    如果是自定义的Screen,可以使用POV Process
    PROCESS ON VALUE-REQUEST  .
      FIELD P_bukrs MODULE mf4.
     
    然后使用方法二
  • 相关阅读:
    django缓存机制
    RBAC基于角色访问控制
    Book系列十大接口
    xadmin的使用
    JWT认证
    自动生成接口文档
    drf的过滤排序分页异常处理
    认证权限解析频率
    python学习之内置模块补充
    python学习之内置模块补充作业
  • 原文地址:https://www.cnblogs.com/libo2019/p/10629573.html
Copyright © 2020-2023  润新知