【ABAP系列】SAP ABAP POPUP_TO_CONFIRM 弹出框总结
前言部分
大家可以关注我的公众号,公众号里的排版更好,阅读更舒适。
正文部分
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
* TITLEBAR = ' '
* DIAGNOSE_OBJECT = ' '
TEXT_QUESTION =
* TEXT_BUTTON_1 = 'Ja'(001)
* ICON_BUTTON_1 = ' '
* TEXT_BUTTON_2 = 'Nein'(002)
* ICON_BUTTON_2 = ' '
* DEFAULT_BUTTON = '1'
* DISPLAY_CANCEL_BUTTON = 'X'
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
* IV_QUICKINFO_BUTTON_1 = ' '
* IV_QUICKINFO_BUTTON_2 = ' '
* IMPORTING
* ANSWER =
* TABLES
* PARAMETER =
* EXCEPTIONS
* TEXT_NOT_FOUND = 1
* OTHERS = 2
POPUP_TO_CONFIRM in ECC600 have to be used instead of the obsolete function module: POPUP_FOR_INFO
POPUP_TO_CONFIRM_LOSS_OF_DATA
POPUP_TO_CONFIRM_STEP
POPUP_TO_CONFIRM_WITH_MESSAGE
POPUP_TO_CONFIRM_WITH_VALUE
POPUP_TO_CONFIRM_WITH_VALUE_2
POPUP_TO_DECIDE
POPUP_TO_DECIDE_WITH_MESSAGE Even if most of these function modules are obsolete also in SAP 4.7, I would like to analyze it because are largely used. Below for each obsolete function module I give the new coding (default use) through POPUP_TO_CONFIRM.
1. POPUP_FOR_INFO:
CALL FUNCTION 'POPUP_FOR_INFO'
EXPORTING
INFO1 = text-
TEXTLINE1 = text-
TITEL = text-.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-
TEXT_QUESTION = text-
DISPLAY_CANCEL_BUTTON = ' '.
2. POPUP_TO_CONFIRM_LOSS_OF_DATA:
CALL FUNCTION 'POPUP_TO_CONFIRM_LOSS_OF_DATA'
EXPORTING
TEXTLINE1 = text-
* TEXTLINE2 = ' '
TITEL = text-
* START_COLUMN = 25
* START_ROW = 6
* DEFAULTOPTION = 'N'
* IMPORTING
* ANSWER =
.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-
DIAGNOSE_OBJECT = 'CACS_CONFIRM_LOSS_OF_DATA'
TEXT_QUESTION = text-
DISPLAY_CANCEL_BUTTON = ' '
POPUP_TYPE = 'ICON_MESSAGE_WARNING'.
3. POPUP_TO_CONFIRM_STEP:
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
* DEFAULTOPTION = 'Y'
TEXTLINE1 = text-
* TEXTLINE2 = ' '
TITEL = text-
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
* IMPORTING
* ANSWER =
.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-
TEXT_QUESTION = text-.
4. POPUP_TO_CONFIRM_WITH_MESSAGE:
CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'
EXPORTING
* DEFAULTOPTION = 'Y'
DIAGNOSETEXT1 = text-
* DIAGNOSETEXT2 = ' '
* DIAGNOSETEXT3 = ' '
TEXTLINE1 = text-
* TEXTLINE2 = ' '
TITEL = text-
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
* IMPORTING
* ANSWER =
.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-
DIAGNOSE_OBJECT = 'Z_CONFIRM_WITH_MESSAGE'
TEXT_QUESTION = text-.
Z_CONFIRM_WITH_MESSAGE should be created as shown in image below from Transaction SE61
5. POPUP_TO_CONFIRM_WITH_VALUE
This function creates a popup with a dynamic text with this pattern <TEXT_BEFORE><OBJECTVALUE><TEXT_AFTER>.
OBJECTVALUE could be any type of parameter that could be implicitly converted to a sequence of chars.
CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_VALUE'
EXPORTING
* DEFAULTOPTION = 'Y'
OBJECTVALUE = lv_value
* TEXT_AFTER = ' '
TEXT_BEFORE = text-
TITEL = text-
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
* IMPORTING
* ANSWER =
* EXCEPTIONS
* TEXT_TOO_LONG = 1
* OTHERS = 2
.
DATA: TEXT_QUESTION() TYPE C,
TEXT_BEFORE() TYPE C,
TEXT_AFTER() TYPE C,
VALUE() TYPE C. VALUE = lv_value.
TEXT_BEFORE = text-.
TEXT_AFTER = text-. CONCATENATE TEXT_BEFORE VALUE TEXT_AFTER INTO TEXT_QUESTION SEPARATED BY SPACE. IF SY-SUBRC = .
* TO DO: text too long
ENDIF. CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-
TEXT_QUESTION = TEXT_QUESTION.
DATA: PARAMETERS LIKE SPAR OCCURS WITH HEADER LINE. MOVE lv_value TO PARAMETERS-VALUE.
MOVE 'VALUE' TO PARAMETERS-PARAM. 'PARAM must have the same name of the symbol in the dialog text
APPEND PARAMETERS. CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-002
DIAGNOSE_OBJECT = 'Z_CONFIRM_WITH_VALUE'
TEXT_QUESTION = ''
TABLES
PARAMETER = PARAMETERS.
Z_CONFIRM_WITH_VALUE is a dialog text created with SE61 with a symbol named &VALUE&.
6. POPUP_TO_CONFIRM_WITH_VALUE_2
This function is very similar to POPUP_TO_CONFIRM_WITH_VALUE but it uses only one parameter to generate test before and test after value. Separating char is '&'.
In ECC6 this function module is no longer usable because it generates a dump.
See POPUP_TO_CONFIRM_WITH_VALUE.
7. POPUP_TO_DECIDE
This function creates a popup with customizable button. This function is a default in the new POPUP_TO_CONFIRM.
CALL FUNCTION 'POPUP_TO_DECIDE'
EXPORTING
* DEFAULTOPTION = '1'
TEXTLINE1 = text-
* TEXTLINE2 = ' '
* TEXTLINE3 = ' '
TEXT_OPTION1 = 'TEXT_OPTION1'
TEXT_OPTION2 = 'TEXT_OPTION2'
* ICON_TEXT_OPTION1 = ' '
* ICON_TEXT_OPTION2 = ' '
TITEL = text-
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
* IMPORTING
* ANSWER =
.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = text-
TEXT_QUESTION = text-
TEXT_BUTTON_1 = 'TEXT_OPTION1'
TEXT_BUTTON_2 = 'TEXT_OPTION2'.
8. POPUP_TO_DECIDE_WITH_MESSAGE
This function is the same as POPUP_TO_DECIDE, but with a DIAGNOSE TEXT.
CALL FUNCTION 'POPUP_TO_DECIDE_WITH_MESSAGE'
EXPORTING
* DEFAULTOPTION = '1'
DIAGNOSETEXT1 =
* DIAGNOSETEXT2 = ' '
* DIAGNOSETEXT3 = ' '
TEXTLINE1 =
* TEXTLINE2 = ' '
* TEXTLINE3 = ' '
TEXT_OPTION1 =
TEXT_OPTION2 =
* ICON_TEXT_OPTION1 =
* ICON_TEXT_OPTION2 =
TITEL =
* START_COLUMN = 25
* START_ROW = 6
* CANCEL_DISPLAY = 'X'
* IMPORTING
* ANSWER =
.
See POPUP_TO_DECIDE and POPUP_TO_CONFIRM_WITH_MESSAGE.
Finally it's very important to know how to manage the answer. In the old popup answer is a char with 3 possible value: 'J' (Yes), 'N' (No) and 'A' (Abort); in the function module POPUP_TO_CONFIRM the output answer could be: 1 (Yes), 2 (No) and 'A' (Abort), so pay much attention when you make the substitution of obsolete function with the new one.
Suggestions and critics are welcome.
In the next article I would like to analyze the class CL_GUI_FRONTEND_SERVICES.
【ABAP系列】SAP ABAP POPUP_TO_CONFIRM 弹出框总结的更多相关文章
- 04.LoT.UI 前后台通用框架分解系列之——轻巧的弹出框
LOT.UI分解系列汇总:http://www.cnblogs.com/dunitian/p/4822808.html#lotui LoT.UI开源地址如下:https://github.com/du ...
- ABAP分享一 弹出框函数的简单示例
在开发中经常会使用到弹出框这个功能,在SAP中有很多函数可以实现类似的功能,这里介绍一个比较简单常用的函数 POPUP_TO_CONFIRM 下面是一个实现的简单示例: TABLES sscrfie ...
- 【ABAP系列】SAP ABAP POPUP弹出框自建内容
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP ABAP POPUP弹出框自 ...
- ABAP 弹出框 函数
POPUP_GET_VALUES_USER_HELP 是一个和用户交互信息的函数,用户能够填写信息,并且我们还能够依据实际的需求对弹出框进行F1 F4 以及用户的需求进行增强.具体的实现能够參考系统标 ...
- JS组件系列——Bootstrap寒冬暖身篇:弹出框和提示框效果以及代码展示
前言:对于Web开发人员,弹出框和提示框的使用肯定不会陌生,比如常见的表格新增和编辑功能,一般常见的主要有两种处理方式:行内编辑和弹出框编辑.在增加用户体验方面,弹出框和提示框起着重要的作用,如果你的 ...
- 小解系列-解决WebUploader在谷歌浏览器下弹出框打开慢,在Bootstrap模态框内部多次点击才能触发的问题
WebUploader百度前端团队开源的上传组件,用起来感觉真心不错的,标题的两个问题是我实际使用过程中遇到的问题,经过百度和谷歌查到解决方案, 特分享一下,以供遇到此问题的童靴. 谷歌浏览器弹出框打 ...
- JavaScript插件——弹出框
(JavaScript插件——弹出框) 前言 阅读之前您也可以到Bootstrap3.0入门学习系列导航中进行查看http://www.cnblogs.com/aehyok/p/3404867.htm ...
- 玩转Bootstrap(JS插件篇)-第1章 模态弹出框 :1-1导入JavaScript插件
导入JavaScript插件 Bootstrap除了包含丰富的Web组件之外,如前面介绍的下拉菜单.按钮组.导航.分页等.他还包括一些JavaScript的插件. Bootstrap的JavaScri ...
- Bootboxjs快速制作Bootstrap的弹出框效果
Bootboxjs是一个简单的js库,简单快捷帮你制作一个Bootstrap的弹出框效果. 一.简介 bootbox.js是一个小的JavaScript库,它帮助您在使用bootstrap框架的时候快 ...
随机推荐
- 如何在 Visual C# 中执行基本的文件 I/O
演示文件 I/O 操作 本文中的示例讲述基本的文件 I/O 操作.“分步示例”部分说明如何创建一个演示下列六种文件 I/O 操作的示例程序: 注意:如果要直接使用下列示例代码,请注意下列事项: 必须包 ...
- JDK的二进制安装
JDK的二进制安装步骤 1. Jdk1.8二进制包下载路径http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads- ...
- MyEclipse使用教程:使用主题自定义工作台外观
[MyEclipse CI 2019.4.0安装包下载] 您可以通过选择Window>Preferences>General>Appearance来使用主题自定义的工作台外观,可以从 ...
- python---注册表操作
手动打开注册表 WIN+R regedit 利用QSettings 一.创建子健和键值对 settings = QSettings("HKEY_CURRENT_USER\\So ...
- 【leetcode】1227. Airplane Seat Assignment Probability
题目如下: n passengers board an airplane with exactly n seats. The first passenger has lost the ticket a ...
- JS Null 空 判断
JS判断对象是否为空 https://www.cnblogs.com/mountain-mist/articles/1600995.html http://www.cftea.com/c/2007/0 ...
- mysql COUNT()函数 语法
mysql COUNT()函数 语法 作用:返回匹配指定条件的行数.博智达直线电机平台 语法:SELECT COUNT(*) FROM table_name mysql COUNT()函数 示例 // ...
- luogu P1077 摆花 x
P1077 摆花 题目描述 小明的花店新开张,为了吸引顾客,他想在花店的门口摆上一排花,共m盆.通过调查顾客的喜好,小明列出了顾客最喜欢的n种花,从1到n标号.为了在门口展出更多种花,规定第i种花不能 ...
- 【CodeChef】LECOINS(同余最短路,背包DP)
题意:给定n个物品,每个物品可以取无限次,每个物品有两种属性:价值v和颜色c 现在有q个询问,每次询问是否能取出价值和为S的方案,如有多解输出不同颜色种数的最大值 题意:看到BZOJ评论区有好心人说C ...
- Spring Cloud Config教程(五)客户端使用
要在应用程序中使用这些功能,只需将其构建为依赖于spring-cloud-config-client的Spring引导应用程序(例如,查看配置客户端或示例应用程序的测试用例).添加依赖关系的最方便的方 ...