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. 极速开发之Spring Boot五种热部署方式
  2. Rails 4:如何使用带有turbo-links的$(document).ready()
  3. UNILEVER STUDENT PROJECTS EVENT
  4. 从思维导图学习操作系统(一)
  5. URAL1297 Palindrome【manacher算法】
  6. 某云,下载.ncm格式自动转换为flac、MP3格式工具
  7. 使用mask雕刻镂空背景
  8. 《读者》的“卷首语” (五)
  9. 系统工程师之路----送给自己和技术道路迷茫的朋友们
  10. 分分钟搞定python破解无线wifi
  11. ipad未能与itunes连接到服务器,为什么无法连接到iTunes Store?iPhone/iPad解决方法
  12. Keystore was tampered with, or password was incorr
  13. Android学习——APP内容共享
  14. uniapp开发微信小程序生成二维码海报
  15. 穿透代理获取用户真实IP地址
  16. Java实现搜索在Bait游戏中的应用研究
  17. Win10常用的快捷键和触摸板操作合集
  18. EXE4J_JAVA_HOME错误
  19. 【乐逍遥网站设计】网站设计的流程与时间
  20. 小学认识计算机课件ppt课件,小学生认识计算机PPT教育课件.ppt

热门文章

  1. 高中计算机学ppt吗,高中信息技术人工智能教学培训课件选修5ppt
  2. java地址有什么构成_IP地址采用分层结构,由(     )组成。
  3. docker使用_Docker的基本使用
  4. 系统学习NLP(二十三)--浅谈Attention机制的理解
  5. Linux_开机自动挂载磁盘
  6. 百度AI城市又搞事情!一天三场签约 上海市民要全面迎来AI了
  7. CukeTest新版本公测邀请-Windows应用自动化
  8. centos5安装PHP5时遇到问题
  9. 精彩回顾|DBDI 数据智能技术研讨沙龙(杭州站)顺利举办
  10. qemu 的方式安装debian 模拟powerpc