通过 Function Module 弹出窗口,在用户确认或修改数据后,返回变更后的数据内容及用户提交或否定。
所属 Function Group : SPO4
所属 Package : SZP

DATA:rcode TYPE c LENGTH 1.

DATA:mytable TYPE STANDARD TABLE OF sval WITH HEADER LINE.

mytable-tabname = ‘USR02′.
mytable-fieldname = ‘BNAME’.
APPEND mytable.
CLEAR mytable.

mytable-tabname = ‘USR02′.
*mytable-FIELDNAME = ‘BCODE’."Internal type X is not supported
mytable-fieldname = ‘CLASS’.
mytable-value = ‘test’.
APPEND mytable.
CLEAR mytable.

mytable-tabname = ‘MARA’.
mytable-fieldname = ‘MATNR’.
mytable-value = ’01234567′.
mytable-FIELD_ATTR = ’03′.
mytable-FIELDTEXT = ‘MAT’.
APPEND mytable.
CLEAR mytable.

CALL FUNCTION ‘POPUP_GET_VALUES’
  EXPORTING
*   NO_VALUE_CHECK        = ‘ ‘
    popup_title           = ‘title’
   start_column          = ’5′
   start_row             = ’5′
 IMPORTING
   returncode            = rcode
  TABLES
    fields                = mytable
 EXCEPTIONS
   error_in_fields       = 1
   OTHERS                = 2
          .
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

CASE rcode.
  WHEN ”.
    WRITE:’YES’.
  WHEN ‘A’.
    WRITE:’NO’.
ENDCASE.

*someting about TABLES fields:

*TABNAME (table name)
*The table must be active in the Data Dictionary.

*FIELDNAME (name of the field to be displayed)
*The field must belong to the table TABNAME.
*If a field is to appear twice, the second field must be passed on
*with ‘*’ before the table name (for example, *T001).

*VALUE (field value)
*VALUE can be assigned a value when the function module is called up.
*This value is displayed.  If the user does not cancel the action,
*VALUE contains the value entered by the user.
*The values must be converted to character format with Move not with
*Assign.

*FIELD_ATTR (field attribute)
*The field attribute determines the layout attribute of the field and
*must have one of the following values:
" " (Space) normal display, ready for input
"01" highlighted, ready for input
"02" normal display, protected against input
"03" highlighted, protected against input
"04" field is not displayed
"05" normal display, not ready for input, 2-dimensional

*FIELD_OBL (obligatory)
*This indicator determines whether or not the field is obligatory
*and must have one of the following values:
" " (Space) The field is optional
"X" The field is obligatory

*FIELDTEXT (keyword)
*In FIELDTEXT the keyword of the field can be specified if the
*dictionary keyword is not to be used.
*
*COMP_CODE
*The field is not required for this function module.
*
*COMP_TAB
*The field is not required for this function module.
*
*COMP_FIELD
*The field is not required for this function module.
*
*NOVALUEHLP
*This indicator determines whether the value help button should be
*displayed or not, and must have one of the following values:
" " = The value help button is permanently displayed
"X" = The value help button is not displayed
"S" = The possible help key is displayed and calls the F4 help from
"        the Dictionary.
"        This parameter is only useful in combination with
*user-defined F4 help
"        (POPUP_GET_VALUES_USER_HELP and POPUP_GET_VALUES_USER_BUTTON),
"        when you decide at field level whether the user-defined F4
"        help or the appropriate
"        Dictionary F4 help is to be called.

结果:

————
注意:
1、可以填充 fieldname 的类型有限。
2、注意 TABLE fields 参数的说明,已附在上面。

POPUP_GET_VALUES相关推荐

  1. abap 弹出对话框函数POPUP_GET_VALUES的使用方法

    项目中,经常用到,点击按钮时弹出一个对话框,选择一些值,然后返回选择的值,进一步操作,下面是使用弹窗对话框函数POPUP_GET_VALUES返回日期的例子,当然后也可以时其他类型的,定义数据元素时, ...

  2. 销售单据条件价格明细表

    REPORT ZSDR_DDFYCX   NO  STANDARD  PAGE HEADING . TABLES :VBAK ,        LIKP ,        VBUK ,         ...

  3. SAP的标准对话框函数

    在用户设计sap的程序时,经常需要一些对话框,用户可以自己编写,但使用SAP系统中提供了的对话框函数将减少许多开发工作. 1.sap的函数组列表和用途说明 适用情况 Function group 提示 ...

  4. ABAPプログラム開発において使用実績のある汎用モジュール一覧

    ※バージョンの違いによって.汎用モジュールの名称とか機能とか異なる可能性があります. スプール系 [MONI_CALL_SPOOLSHOW] スプール画面を表示 [RSPO_OUTPUT_SPOOL_ ...

  5. 函数组:SPO1/2/3/4/5/6/8

    这些函数组里包含了各种弹出对话框. SPO1                           迅速保存的会话框 POPUP_TO_CONFIRM               标准对话弹出消息 PO ...

  6. 金色传说:SAP-ABAP-销售订单增强:记录销售订单修改信息和修改原因

    业务场景 为了记录从客户或经销商询单到正式下达销售订单的过程并分析,需要记录销售订单创建和修改时的关键信息,其中包括:客户.物料.订单数量.交货日期.更改原因. 解决方案 创建销售订单时自动记录关键信 ...

  7. SAP 常用BAPI

    系统 [MONI_CALL_SPOOLSHOW] 显示假脱机画面 [RSPO_OUTPUT_SPOOL_REQUEST] 假脱机打印 控制系统 [/SAPDMC/LSM_F4_SERVER_FILE] ...

  8. ABAP动态模式(Dynamic Pattern)

    在利用模式快速规范开发ABAP代码中,我们讨论了模式的基本特性和用法,以及如何创建自己的模式.我将进一步介绍,并演示如何将动态元素添加到模式中,从而使开发过程更加简化. SAP ABAP Dynami ...

  9. 【EPIC】自建平台付款建议程序EPIC

    程序片: 程序片:ZTRR0090 report ztrr0090.include ztri00090_top. "类型及内表申明 include ztri_popmesag. " ...

最新文章

  1. 博客摘录:网络管理员的两天
  2. 实战ALV OO技术实现添加工具条按钮
  3. huber loss
  4. Linux中sort、uniq、cut、wc命令详解
  5. mongodb安装_Windows系统安装运行Mongodb服务
  6. 深度学习《Life-Long Learning》
  7. ssas从mysql获取数据库_通过AMO获取SQL Server SSAS信息
  8. Uber宣布停止无人卡车项目,研发重心将转向无人小汽车
  9. JS获取HTML video标签视频第一帧
  10. Java使用GDAL
  11. CentOS安装中文包
  12. 运算服务器v9型号,V9服务器
  13. 魔百盒B863AV3.2-M,B863AV3.1-M2线刷+卡刷精简固件(S905L3A-B)
  14. Windows添加系统桌面常用图标
  15. 小学六年级下册计算机计划,小学信息技术六年级下册教学计划
  16. FileZilla连接ubuntu主机时选择21端口无法连接
  17. matlab gevfit,基于MATLAB和Scipy-GEV-fi的不同参数估计
  18. php 多个curl 很慢,PHP下CURL异常慢
  19. OSI七层——物理层介绍和安全
  20. 星球福利 | 读书的季节,送上豆瓣 Top10 区块链书单

热门文章

  1. 从路由原理出发,深入阅读理解react-router 4.0的源码
  2. set,env和export命令显示shell变量其区别,与环境变量扫盲(一)
  3. Linux下安装.bundle后缀的程序
  4. Python的线程/进程间通讯对象分析
  5. linux 常用查看网络连接方法及脚本
  6. 蓝色巨人将磁带定位为数据存储的集成归档层
  7. XML DOM Node List
  8. A good security site
  9. 前端必知必会HTTP请求系列(二)简单一点的HTTP协议
  10. 基于koa2开发的用户中心