DATA text TYPE c LENGTH 8 VALUE '12345678'.

FIELD-SYMBOLS: <fs1> TYPE ANY,
               <fs2> TYPE ANY.

ASSIGN text+3(3) TO <fs1>.”456分配给<fs1>解释红字部分2

DO 8 TIMES.

ASSIGN <fs1>(sy-index) TO <fs2>.

IF <fs2> IS ASSIGNED. ”解释红字部分1
    WRITE / <fs2>.
  ENDIF.

ENDDO.

运行结果:

4
45
456
4567
45678

解释:

In the first ASSIGN statement, the area limits of the data objecttext are assigned to<fs1>. In the secondASSIGN statement,<fs2> takes on these limits. Starting from the second loop run, the system will attempt to assign a larger storage area to<fs2>. However, in Unicode programs, the logical expression afterIF is no longer true, while in non-Unicode programs the larger storage area is assigned.----1

Notes

  • If the area limits are the same as the data area of the ABAP program, you must ensure that this data area also contains the administration information fordeep data objects because otherwise errors could occur if these are exceeded unintentionally.
  • Up to Release 6.10, the specification of range_spec was not possible. The area limits were independent of the name of the data object and were determined by thedata area of the ABAP program. If the data area of the ABAP program has been exceeded, it can trigger an exception that cannot be handled.

Effect in Unicode Programs

If there is no specification made for range_spec, the area limits inUnicode programs are defined as follows:

  • If you have specified an elementary data object fordobj inmem_area, the storage area of this data object determines the area limits.
  • If you have specified a field symbol for dobj in mem_area, and this field symbol has an elementary data object assigned to it, the field symbol<fs> of the current statement takes on the area limits assigned to this field symbol.-----2
  • 如果您已经指定了一个mem_areadobj领域符号,和这一领域的象征对象分配给它的一个基本数据,当前语句的字段符号<fs>分配给该地区这一领域的象征限制。
  • If you have a structure or a field symbol specified for dobj inmem_area, and one of these points to a structure, the system checks whether the structure has a character-type initial section (up to the firstalignment gap). This then determines the area limits.
  • 如果你有一个结构或为dobjmem_area,这些结构之一指定的字段符号,系统将检查结构是否有一个字符类型的初始部分(第一对齐差距)。这就决定了区域限制。就是第二个分配语句的写照。

If these area limits are exceeded, no storage area is assigned for the static variant ofmem_area after theASSIGN statement. Also, the logical expression<fs> IS ASSIGNED is incorrect, whilesy-subrc is set to 4 in the dynamic variant

如果超过了这些地区的限制,没有存储区域分配mem_area静态变种后ASSIGN语句。此外,被分配的逻辑表达式<fs>,是不正确的的,而SY - SUBRC设置在动态的变4。 程序中 sy-index = 5以后就是这种情况,不做输出。

Effect in Non-Unicode Programs

If no specification is made for range_spec, the area limits innon-Unicode programs are defined as follows:

  • If the name of a data object is not specified directly in the specification of the storage areamem_area, , the area limits are determined by thedata area of the ABAP program.
    如果一个数据对象的名称是不直接指定规格的存储区域mem_area,区域限制是由ABAP程序的数据区。
  • If the name of a data object is specified dynamically for the specification of the storage areamem_area, the area limits are determined by the dynamically specified data object.
  • 如果数据对象的名称被指定为动态存储区域mem_area的规范,区域限制是由动态指定的数据对象。

If these area limits are exceeded, an exception that cannot be handled will be triggered.

如果超过了这些地区的限制,无法处理的异常将被触发。

附录:

Unicode(统一码、万国码、单一码)是一种在计算机上使用的字符编码。它为每种语言中的每个字符设定了统一并且唯一的二进制编码,以满足跨语言、跨平台进行文本转换、处理的要求。1990年开始研发,1994年正式公布。随着计算机工作能力的增强,Unicode也在面世以来的十多年里得到普及。

  Unicode定义了大到足以代表人类所有可读字符的字符集。

释疑の字段符号 FIELD-SYMBOLS相关推荐

  1. Elasticsearch中字段类型(Field Type)详解

    ElasticSearch 7.7 字段类型(Field datatype)详解 字符串, object, 数值, 日期, 数组, 0x00 字符串: text, keyword 5.0以后,stri ...

  2. Java | 字段(Field)

    Java 字段 前言 概述 声明字段 修饰符 类型 字段名 分类 访问字段 引用静态字段 引用非静态字段 更改实例变量值 前言 本文原创作者为 Blume,版权归原创作者所有. 本文主要内容根据 Ja ...

  3. CodeGen字段循环Field Loop

    CodeGen字段循环Field Loop 字段循环是一个模板文件构造,它允许迭代CodeGen拥有的有关字段的集合.这些字段定义可以来自以下两个位置之一: •如果基于从存储库结构中获取的信息生成代码 ...

  4. 【转载】字段符号在ABAP OOP中的应用

    字段符号在ABAP OOP中的应用 字段符号是ABAP中类似于指针的一种应用,字段符号并不保存数据,其仅仅指向数据内存地址.ABAP的字段符号可以较为方便灵活地访问数据,字段符号使用尖括号" ...

  5. 如何理解Java的类变量、成员变量、常量、类属性、实例属性、字段(field)、成员方法、类方法

    文章目录 变量相关概念 变量/常量 类变量/静态变量 成员变量/实例变量 类属性/实例属性/对象属性 什么是 field 成员变量和类变量的区别 两个变量的生命周期不同 访问方式不同 数据存储位置不同 ...

  6. ArcGIS中进行shp矢量文件和EXCEL进行字段连接Field Join关联遇到:提示没有OID字段问题。(地理国情监测)解决步骤

    ArcGIS中进行shp矢量文件和EXCEL进行字段连接Field Join关联遇到:提示没有OID字段问题.(地理国情监测)解决步骤: (1)将你的excel表先通过excel转表工具,转化成表就生 ...

  7. java short字段_Java Field setShort()用法及代码示例

    java.lang.reflect.Field的setShort()方法用于将字段的值设置为指定对象的缩写.当您需要将对象的字段值设置为短时,可以使用此方法在对象上设置值. 用法: public vo ...

  8. Solr字段类型field type的定义

    摘要: Solr的字段类型定义了Solr如何解析字段数据并将数据检索出来,了解Solr的字段类型定义有助于更好的配置与使用Solr. 字段类型的定义 字段类型的定义主要包含如下四个方面的信息: 名称 ...

  9. SAP Cloud for Customer 2102版本如何使用Key User Tool创建扩展字段 - extension field

    点击Start Adaptation,进入Adaptation模式: 进入order header区域,点击drill down: 点击Add Field: 这里会显示一个表格,罗列了系统当前创建的所 ...

最新文章

  1. 安卓串口中InputStream数据接收不完整
  2. 线性表的链式表示——单链表
  3. 多用户使用一台计算机可设置,多用户使用一台计算机的情况经常出现,这时可设置()...
  4. 地图查询定位功能(Flex API)
  5. BugKuCTF 加密 简单加密
  6. c语言宿舍管理查询软件,宿舍管理查询软件--数据结构,c语言
  7. namespace for c++
  8. iptables 执行清除命令 iptables -F 要非常小心的
  9. ERROR: Could not find a version that satisfies the requirement absl (from versions: none) ERROR: No
  10. 驱动开发:BSOD 0xC4_f6 句柄问题
  11. 清除一键还原精灵开机热键F11的正确方法
  12. AUTOCAD——矩形命令
  13. 用github写开源书籍
  14. Flutter 图片组件Image、本地图片、远程图片、图片剪切、圆形图片
  15. CrystalDiskInfo硬盘检测工具 标准版及萌妹版
  16. pythondcnda算法聚类_分层聚类ahc算法
  17. 淘宝聚划算怎么玩?其实也就是这些营销手段及功能
  18. 计算机四年级上册语文教案,人教版四年级上册语文教案
  19. 金蝶K3案例教程固定资产后台配置
  20. LaTex 数学公式中的空格

热门文章

  1. Mesos Framework开发指南 一
  2. 真执着 卡巴斯基和Palo Alto找到了BlackEnergy和ExPetr的相似代码
  3. 树莓派3b配置耳机音频输出
  4. Python PhantomJS 爬虫 示例
  5. javascript创建多行字符串的方法(转)
  6. [转] Boost智能指针——scoped_ptr
  7. 【haproxy初始化】init_haproxy.sh
  8. [THUPC2019]不等式/[51Nod1598]方程最小值
  9. 特斯拉提升安全监控等级,推出“哨兵模式”
  10. NASA重金悬赏 太空尿片最佳解决方案