Table controls and tabstrip controls
本文转载自http://www.cnblogs.com/clsoho/archive/2010/01/21/1653268.html
ONTROLS
Syntax Forms
Declaration of Table Controls 表控件的声明
1. CONTROLS contrl TYPE TABLEVIEW USING SCREEN screen no.
Declaration of Tabstrip Controls 选项卡控件的声明
2. CONTROLS contrl TYPE TABSTRIP.
Effect
With the CONTROLS statement, for each screen used in the program, all table controls and tabstrip controls that are defined there have to be declared in the declaration section, otherwise an untreatable exception occurs when the corresponding screen is called. For contrl, the name of the control that is defined in the screen has to be specified directly. After TYPE, TABLEVIEW or TABSTRIP must be used to specify whether it is a table control or a tabstrip control.
在对控件的描述中,程序中的每个屏幕上所有的表控件和选项卡控件都必须在程序的声明部分进行定义,否则当在调用相关的屏幕时就会产生一个难以处理的异常。对于在屏幕中定义的contorl控件必须直接指定名字,在TYPE之后,TABLEVIEW或者是TABSTRIP必须用来指定它是表控件还是选项卡控件。
For each control, the CONTROLS statement creates a structure with the name of the control in the ABAP program. The structure components enable the respective control to be processed in the ABAP program.
对于每个表控件,控件表会在ABAP程序中创建一个以控件名称命名的结构。这个结构的字段使其对应的各自的控件在ABAP程序中被处理。
Note
For table controls, corresponding loops have to be programmed in the screen flow logic. For tabstrip controls, suitable subscreens have to be called.
注:
对于表控件而言,相关的loops语句必须在屏幕逻辑流中进行编写。对于选项卡控件而言,必须调用匹配的子屏幕。
CONTROLS - TYPE TABSTRIP
Syntax 语法
CONTROLS contrl TYPE TABSTRIP.
Effect 作用
If you specify the type TABSTRIP in the CONTROLS statement, a deep structure is created with the name of the control and the type CXTAB_TABSTRIP of the type group CXTAB. From this structure, only the component ACTIVETAB is required in the program.
如果你在CONTROLS定义语句中指定类型TABSTRIP,一个深层结构将会被以控件的名字和类型组CXTAB的CXTAB_TABSTRIP类型创建。从这个结构中,程序中只有字段ACTIVETAB要求输入。
During the PBO processing, the active tabstrip page is specified by assigning the function code of a tab title to the component ACTIVETAB. The first tabstrip page is active by default. When scrolling in the SAP GUI, the tabstrip control can thus be initialized. For any scrolling in an ABAP program, the tabstrip page selected by the user must be activated by this assignment. You must also ensure that the desired subscreen is included in the screen flow logic using the CALL SUBSCREEN statement.
在PBO处理期间,通过为选项标题字段ACTIVTAB分配功能码来指定活动的选项卡。第一个选项卡默认为活动的。当滚动SAP GUI时,选项卡控件可以被这样初始化。对于在ABAP程序中的任何滚动,被用户选中的选项卡必须通过这样的分配被激活。你也必须确定用CALL SUBSCREEN语句需要的子屏幕被包含在屏幕逻辑流中。
During PAI processing, the component ACTIVETAB contains the function code of the active tab title. When scrolling in the SAP GUI, you can thus ascertain which tabstrip page is currently displayed.
在PAI处理期间,ACTIVETAB字段包含激活的选项卡头的功能码。当在SAP GUI中滚动时,你可以这样确定当前显示的是哪个选项卡。
Note 注
The same applies to the inclusion of subscreens of tabstrips using CALL SUBSCREEN as for normal subscreens.
用CALL SUBSCREEN 同样适用于选项卡包含的子屏幕就像普通子屏幕那样。
Example 例子
If, on a subscreen, a tabstrip control is defined with three untyped tab titles with the function codes "TAB1", "TAB2", and "TAB3" and a subscreen area SUB, the scrolling can be programmed in ABAP as follows. In a PBO module, prepare_tabstrip, the component activetab of the structure tab_strip created using CONTROLS is assigned the function code of the first tab title. After a tab title has been selected, this component is set to the relevant function code in the PAI module handle_user_command. The number of the desired subscreen screen is assigned to the data object dynnr that is used for including the subscreen in the screen flow logic. The corresponding programming of the screen flow logic can be seen in the example for CALL SUBSCREEN.
如果,在一个子屏幕上,一个选项卡控件被定义成三个不同类型的选项卡标题具有功能码"TAB1", "TAB2", 和 "TAB3"并且一个子屏幕区域SUB,滚动可以在ABAP中编写如下。在一个PBO 模块,prepare_tabstrip,用controls创建的结构tab_strip的字段activetab 被分配第一个选项卡的功能码。在一个选项头被选择之后,这个字段在PAI MOUDLE handle_user_command中被设置成相关的功能码。需要的子屏幕数量被分配给用来在屏幕逻辑流中包含子屏幕的数据对象dynnr。屏幕逻辑流相关的编程可以参见例子CALL SUBSCREEN。
CONTROLS tab_strip TYPE TABSTRIP.
DATA: ok_code TYPE sy-ucomm,
dynnr TYPE sy-dynnr.
...
MODULE prepare_tabstrip OUTPUT.
IF tab_strip-activetab IS INITIAL OR
dynnr IS INITIAL.
tab_strip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
ENDMODULE.
MODULE handle_user_command INPUT.
CASE ok_code.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
...
ENDCASE.
IF ok_code(3) = 'TAB'.
tab_strip-activetab = ok_code.
ENDIF.
ENDMODULE.
TABLEVIEW结构包含以下字段:
字段名 类型 用途
fixed_cols integer 表格左端不可 移动列数。 固定列后面 的所有列都 可以移动, 并能在表格 中重新排序 。
lines integer 表格中的可显 示的行数。 如果使用表 格控制来显 示内表,那么,lines 将给出能在 屏幕上显示 的总行数。(如果内表不包含行, 则屏幕表格将在结尾包 含空行)。系统还使用 lines 来设置滚动 条的显示以示意用户在表格中向下滚动了多远 。
top_line integer 屏 幕开始显示 的表格行。
current_line integer 循环内当前正被处理的行 。该字段是 绝对(非相 对)指标, 其值为top_line + sy_stepl.-1
left_col integer 最左边非固定的列。因为用户可以滚 动显示的非 固定部分, 所以该字段 控制着出现 在固定列后 面的列号。 left_col 给出列的绝 对(非相对 )值,不管 用户是否重 新排列了列 的顺序。
line_sel_mode integer 允许使用行选 择。取值: 0=不选, 1=只选一 行,2=允 许选多行。
col_sel_mode integer 允许使用列选 择。取值: 0=不选, 1=只选一 列,2=允许选多列。
line_selector char 1 指示器: 显示行选择 栏,这是一 个能在 abap/4 程序中进行 检查的一般 复选框。用 户单击某复 选框时,系 统就将它设 置为 x。
h_grid char 1 指示器: 显示水平网 格线
v_grid char 1 指示器: 显示垂直网 格线
cols (occurs 10) tab_column 嵌入内表:表 格中每个列 的一个表格 条目。
tab_column 结构中的字段说明了屏幕表格中的单个字段及其列:
字段名 类型 用途
screen screen 嵌入screen结构:所有的字段出自screen系统表格的单个行。
index integer 显 示中列的当前位置(用 于用户重新 排列了列顺 序的情况) 。
selected char 1 用户单击 该列时,( 系统)将它 设为 x。
vislength int1 字段的可见长 度(字符数 )。最大的允许长度为 255 个字符。
“ 屏幕”类型指的是 screen 表格,系统表格说明了屏幕中的所有字段。
Table controls and tabstrip controls的更多相关文章
- TWebBrowser 调用最新版的Ie Internet Feature Controls (B..C)
Internet Feature Controls (B..C) Updated: July 2012 This article describes feature controls with n ...
- Walkthrough: Arranging Controls on Windows Forms Using Snaplines
https://msdn.microsoft.com/en-us/library/t5b5kc41(v=vs.110).aspx Spacing and Aligning Controls Using ...
- Coding4Fun.Phone.Controls的使用
Coding4Fun.Phone.Controls的使用: windows phone的应用一直有一个特色,那就是方块(磁贴).之前的应用中,我一直都XXXX 来实现,原来其实一直有一个更加好的方法, ...
- threejs path controls example html
<!DOCTYPE html> <html lang="en"> <head> <title>three.js webgl - pa ...
- Creating Reusable XAML User Controls with Xamarin Forms
In the previous post on making fancy layouts with Xamarin Forms we saw how you can design a Dashboar ...
- 【转载】foreach+Control.Controls无法一次性移除所有子控件解决方法
博客转载地址:http://www.mzwu.com/article.asp?id=2254 //在panel1中添加20个Button ; ; ; i <= ; i++) { ) row++; ...
- asp.net Page.Controls对象(找到所有服务器控件)
前台 复制代码 代码如下: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="De ...
- Qt Quick Controls 与 Qt Quick Controls 2的区别(详细对照)
Qt Quick Controls 原本是为支持桌面平台而开发的,后来又加入了移动平台和嵌入式平台的支持.它们应用非常广泛,因为它们提供了足够灵活的样式系统,以允许开发具有平台相关或者无关风格的应用程 ...
- ABAP 中 Table Control例子
实现了Table Control的主要的一些功能,可以作为例子参考,实现的功能有是否可编辑切换,选择某一条记录点击按钮显示详细信息,新增记录,删除记录,选择所有记录,选择光标所有记录,取消选择所有,排 ...
随机推荐
- Spring MVC或Spring Boot配置默认访问页面不生效?
相信在开发项目过程中,设置默认访问页面应该都用过.但是有时候设置了却不起作用.你知道是什么原因吗?今天就来说说我遇到的问题. 首先说说配置默认访问页面有哪几种方式. 1.tomcat配置默认访问页面 ...
- 【PY从0到1】第二节 字符串和数字
#本课程都以代码形式呈现.现在进入Python的基础内容的学习. #由于本课程是从0开始分享,所以Python的基础内容是必不可少的.这也是Python量化的必经之路. #下面进入正题. #一般用'# ...
- 移动端 CSS3动画属性
一.transform 转换属性 #1. translate位移 transform : translate(50px,100px); //把元素水平移动 50 像素,垂直移动 100 像素 tran ...
- Office__自动保存和恢复
#1.前言 在您埋头辛苦编辑Excel.Word或PPT文档的时候,如果突然发生断电.系统崩溃.意外误操作,本文将以Excel2010为例详细阐述其中自动保存功能的工作机理和恢复文件的访问方法,Exc ...
- 处理xls文件
package com.cn.peitest.excel; import java.io.File; import java.io.FileInputStream; import java.io.Fi ...
- JAVA多线程下高并发的处理经验
java中的线程:java中,每个线程都有一个调用栈存放在线程栈之中,一个java应用总是从main()函数开始运行,被称为主线程.一旦创建一个新的线程,就会产生一个线程栈.线程总体分为:用户线程和守 ...
- Node.js躬行记(5)——定时任务的调试
最近做一个活动,需要用到定时任务,于是使用了 node-schedule 库. 用法很简单,就是可配置开始.结束时间,以及重复执行的时间点,如下所示,从2020-12-23T09:00:00Z开始,每 ...
- CentOS 搭建 SVN 服务器 及使用教程
服务器与客户端 1.搭建SVN服务器 ① CentOS安装SVN 命令: yum -y install subversion 检查是否安装成功 命令: svn --version 如果显示如下内容说明 ...
- API企业级网关设计
前言 摘自--https://github.com/aCoder2013/blog/issues/35 假设你正在开发一个电商网站,那么这里会涉及到很多后端的微服务,比如会员.商品.推荐服务等等. 那 ...
- Dubbo 就是靠它崭露头角!(身为开源框架很重要的一点)
Hola,我是 yes. 经过了 RPC 核心和 Dubbo 微内核两篇文章后,今天终于要稍稍深入一波 Dubbo 了. 作为一个通用的 RPC 框架,性能是很重要的一环,而易用性和扩展性也极为重要. ...