DESCRIBE TABLE

Syntax 语法

DESCRIBE TABLE itab [KIND knd] [LINES lin] [OCCURS n].

Extras: 选项

1. ... KIND knd

2. ... LINES lin

3. ... OCCURS n

Effect 作用

This statement determines some properties of the internal table itab and assigns them to the specified variables. The various additions enable you to determine the table type, the number of currently filled rows and the initial memory requirement.

这个语句判断内表itab的某些属性并把它们指定到指定的变量中。不同的选项使你能够判断表类型,当前字段行数和初始化需要的内存大小 。

In addition, the system fields sy-tfill and sy-tleng are filled with the current number of table rows and the length of a table row in bytes.

另外,系统字段sy-tfill和sy-tleng保存着当前表行数量和以字节计的表行长度。

Notes

  • For detailed information about an internal table, you should use the methods of RTTS instead of the statement DESCRIBE TABLE.

为了更详细的关于内表的信息,你应该用RTTS的方法代替语句describe table.

  • Without the specification of an addition, the statement DESCRIBE TABLE only sets the system fields sy-tfill and sy-tleng.
    没有指定一个附加项,语句describe table只设置系统字段sy-tfill 和sy-tleng的值。

Addition 1 选项1

... KIND knd

Effect 作用

The table type of the internal table itab is determined and a corresponding one-digit identification is assigned to the data object knd. A character-type data type is expected for the data object. The identifications are "T" for standard tables, "S" for sorted tables and "H" for hashed tables. These values are also defined as constants sydes_kind-standard, sydes_kind-sorted, and sydes_kind-hashed in the type group SYDES.

判断内表itab的表类型并且把一个相应的一字符的标识赋给字符型的数据类型的数据对象knd. 标识为T时代表是标准表,为S时为排序表,为H是为哈唏表。这些值在类型组SYDES中也被定义成常量sydes_kind-standard,sydes_kind-sorted,sydes_kind-hashed。

Addition 2 选项2

... LINES lin

Effect 作用

The current number of table rows of the internal table itab is determined and is assigned to the data object lin.The data type i is expected for the data object.

决定内表表行的当前数量并且把值赋给数据对象lin。Lin为I类型的数据对象。

Note

As of release 6.10, the current number of rows of an internal table can also be determined using the in-built function lines.

在版本6.10中,内表表行的当前数量也可以用内建函数lines来判断。

Addition 3 选项3

... OCCURS n

Effect 作用

The initial memory requirement defined during the creation of the internal table with the addition INITIAL SIZE or the obsolete addition OCCURS is determined and assigned to the data object n. The data type i is expected for the data object.

在内表用选项initial size或者老式的选项ocurs创建期间决定内表所需的初始化内存大小并且把值赋给数据对象n.N为i类型的数据对象。

Example 例子

Descending sorting of a generically typed internal table in a subprogram. Since sorted tables cannot be sorted in a descending order, the table type is checked to avoid an exception that cannot be handled.

在一个子程序中对一个一般内表进行递减排序。因为排序表不能降序排列,所以会进行表类型检查来避免不能处理的异常。

TYPE-POOLS sydes.
...
FORM sort_descending CHANGING itab TYPE ANY TABLE.
  DATA tabkind(1) TYPE c.
  DESCRIBE TABLE itab KIND tabkind.
  IF tabkind = sydes_kind-standard OR
     tabkind = sydes_kind-hashed.
    SORT itab DESCENDING.
  ELSEIF tabkind = sydes_kind-sorted.
    MESSAGE '...' TYPE 'E'.
  ELSE.
    MESSAGE '...' TYPE 'E'.
  ENDIF.
ENDFORM.

转载于:https://www.cnblogs.com/clsoho/archive/2010/03/10/1682175.html

DESCRIBE TABLE相关推荐

  1. PostgreSQL“ DESCRIBE TABLE”

    如何在PostgreSQL中执行等效于Oracle DESCRIBE TABLE的命令(使用psql命令)? #1楼 DESCRIBE TABLE的psql等效项是\\d table . 有关更多详细 ...

  2. table control的修改/排序/删除功能实现实例

    本实例仿照SAP DEMO而写 DEMO名称是:demo_dynpro_tabcont_loop_at,自动动手写一次的目的是把将该程序的注释写明白一点,希望本文对刚入门的博友在理解table con ...

  3. SAP-ABAP DESCRIBE FIELD 用法

    DESCRIBE 语句一共有三类用法,先简述一下 DESCRIBE FIELD的用法: Field Properties 1. DESCRIBE FIELD ...  Properties of an ...

  4. TC(Table Control)自定义F4

    原文出自: http://blog.chinaunix.net/uid-8527621-id-2029501.html REPORT z_barry_tc_f4 . CONTROLS: tc01 TY ...

  5. ABAP内表(internal table)有关的系统变量

    SY-TABIX – 内表当前行的索引号.SY-TABIX 的值可以被以下命令修改,但是只适用于索引表(index table).对于哈希表(Hashed table),这个系统变量的值为空或0. A ...

  6. ABAP DESCRIBE语句

    DESCRIBE. 17 DESCRIBE FIELD.. 17 TYPE typ. 17 LENGTH ilen. 19 DECIMALS dec. 19 OUTPUT-LENGTH olen. 1 ...

  7. SAP 中Table的使用(一、显示数据)

    TABLE是我目前学习ABAP中遇到的最复杂的控件,它就相当于NET中的GRIDVIEW,但功能远没有GRIDVIEW强大和方便.但是,人家是SAP所以我们也只能随从. 1.将工具栏中的table图标 ...

  8. create and alter table

    create talb HBase建表是非常简单的,最简单举例如下: hbase(main):005:0> help 'create' Creates a table. Pass a table ...

  9. ABAP性能实例七例

    一.SQL Interface 1.Select ... Where vs. Select + Check 用Select - Where语句效率比Select + Check语句要高,例如: SEL ...

最新文章

  1. Hibenate工具类(实现增/删/改/查)
  2. Easyui主要组件用法
  3. [HTML]去除li前面的小黑点,和ul、LI部分属性
  4. 多个apple苹果设备(iphone,mac,pad,icloud)之间同步数据
  5. ThinkPHP框架的增删改
  6. 【胡学长 带你学 Global Mapper 】新手必看 入门指南
  7. PDCA循环——快速提升软件质量的必备工具
  8. oracle+suspend+参数,oracle数据库的挂起(Suspending)和恢复(Resuming)
  9. Safari无法验证网站身份
  10. linux通过文件修改密码,如何通过Linux系统来修改密码
  11. 1.4、云计算HCIA虚拟化存储基础知识
  12. Invertible Image Rescaling 可逆图像缩放:完美恢复降采样后的高清图片(ECCV 2020 Oral )
  13. word-spacing无效
  14. 【编程笔试】美团2021校招笔试-通用编程题第6场(附思路及C++代码)
  15. 让蔡徐坤来教你实现游戏中的帧动画(中)
  16. 《离散数学及其应用》读书笔记【三】计数
  17. Rhinoceros 建模简介1
  18. Odoo与浪潮合资研发PS Cloud之使用产品变体
  19. MySQL创建索引-阿里云开发者社区
  20. 区块链赋能供应链,不让中间商赚差价!

热门文章

  1. 怎么判断自己启动的线程是否执行完成 java_Java面试笔记(上)
  2. 2012.4.13总结(一)
  3. 2021 考研线代知识点整理
  4. fasterrcnn论文_论文笔记:Fast(er) RCNN
  5. java 抽象类与接口的区别及其在jdk中的应用
  6. 程序局部性(时间局部性与空间局部性)与循环展开原理详解
  7. Linux嵌入式开发_设置时钟频率
  8. 从0开始html前端页面开发_CSS设置图像透明度
  9. 【CentOS 7笔记43】,防火墙和iptables filter表#
  10. vs2015 + opencv3.4.0 + qt msvc2015_64-5.7.1 显示图像