这一篇笔记主要用来记录Dynamic Text。和前面的Text Module与Include Text不同,Dynamic Text的全部内容均是通过外部传入的。而传入的参数则和ABAP开发过程中使用的文本框内表变量结构一致。
Adobe Form 显示 Dynamic Text
一、介绍
这一篇笔记主要用来记录Dynamic Text。和前面的Text Module与Include Text不同,Dynamic Text的全部内容均是通过外部传入的。而传入的参数则和ABAP开发过程中使用的文本框内表变量结构一致。
二、功能实现
1.Interface
(1)创建Interface
使用事物代码 SFP 打开Form的创建界面,填入Interface的名称后点击创建按钮。

(2)填写描述

(3)创建输入参数
双击左侧的Form Interface中的Import页签,在右侧新建一个用于传入文本内容的表类型变量。

填写完成之后点击保存和激活按钮。其中输入参数的类型 TSFTEXT 是一个表类型。其中的结构如下所示。

2.Adobe From
(1)创建Form
使用事务代码 SFP 回到创建界面,输入Form的名称,然后点击创建按钮。

(2)绑定Interface并填写描述

(3)添加输入参数与文本对象
将从Interface中传递过来的输入参数 IT_TSFTEXT 导入 Context 中。

添加完成参数对象后,在Context上右键创建Text对象。

(4)设置文本对象属性
变更文本类型为Dynamic Text,并在 Field 行中输入传入参数 IT_TSFTEXT 。

(5)设置Layout
转到Form的Layout页签中,点击Insert插入一个文本对象。


(6)添加Floating Field
在Form中新建的文本对象中添加一个 Floating Field 。该对象在之前的笔记中介绍过,可以动态的变更文本对象的内容。添加上该对象后再将通过接口传入的 IT_TSFTEXT 对象的 Text 内容绑定。


完成上面的操作之后保存并激活表单对象。
三、Form 测试
1.运行Form表单

2.填写文本内表的数据

3.执行表单

四、参考资料
SAP Adobe Interactive Form Tutorial. Part IX. Displaying Dynamic Text in Adobe Forms