【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框架的时候快 ...
随机推荐
- ul列表li元素横排显示的IE兼容性问题
目标: 使ul列表横排显示 现象: 谷歌OK,火狐竖排,IE竖排. 原因: ul原css代码: 首先,去除点号,list-style:none;为了使其横排,使用了display:contents;该 ...
- Gcd HDU - 6545 (基础数论)
wls 有一个整数 n,他想将 1 − n 这 n 个数字分成两组,每一组至少有一个数,并且使得两组数字的和的最大公约数最大,请输出最大的最大公约数. Input 输入一行一个整数 n. 2 ≤ n ...
- 用java写一个死锁
什么是死锁? 多个线程同时被阻塞,它们中的一个或者全部都在等待某个资源被释放.由于线程被无限期地阻塞,因此程序不可能正常终止. 不适当的使用“synchronized”关键词来管理线程对特定对象的访问 ...
- SQL语句 函数
6.4 Functions 6.4.1 Numeric abs/mod 绝对值/求模 sqrt/power/exp 求幂 ceil/floor/round 取整 trunc 截取小数点 sin/c ...
- <el-tree>文字显示不全解决办法(可以用省略号代替)
地址: https://www.jianshu.com/p/229f96b794d3
- 【NOIP2017模拟6.25】小W的动漫
题目 小W最近迷上了日本动漫,每天都有无数部动漫的更新等着他去看,所以他必须将所有的动漫排个顺序,当然,虽然有无数部动漫,但除了1号动漫,每部动漫都有且仅有一部动漫是它的前传(父亲),也就是说,所有的 ...
- python学习理论
结论 其实学python这本书 不一定要全部敲一遍 在“”动手试一试“”里面 把这篇学到的东西测试一下就算是掌握了 要在实际工作场景当中使用还需要进一步练习这样做的话 比较好一点 边学边测试 加深掌握 ...
- 双重Iterator 报错!!!!
List list = new ArrayList(); list.add(new String[]{"0","s1","0038",&qu ...
- NOIP2002-字串变换【双向BFS】
NOIP2002-字串变换 Description 已知有两个字串A,BA,B及一组字串变换的规则(至多66个规则): A_1A1 ->B_1B1 A_2A2 -> B_2B2 规 ...
- android存储路径问题
关于存储路径问题,如果是想要存储在应用本身的路径下,如果该应用卸载的时候,对应文件随之卸载, 如果使用的是android level 8以上的版本,采用的是: getExternalFilesDir( ...