SAP 实例 9 Text output
2024-09-18 03:42:18
REPORT demo_show_text. CLASS demo DEFINITION.
PUBLIC SECTION.
CLASS-METHODS main.
ENDCLASS. CLASS demo IMPLEMENTATION.
METHOD main.
DATA: text TYPE REF TO cl_demo_text,
text_table TYPE cl_demo_text=>t_text,
text_line TYPE cl_demo_text=>t_line. text = cl_demo_text=>get_handle( ). text_line = 'First line of text'.
text->add_line( text_line ).
text->add_line( ' ' ).
DO 10 TIMES.
CLEAR text_line.
text_line(3) = sy-index.
text_line = |Table line { text_line }|.
APPEND text_line TO text_table.
ENDDO.
text->add_table( text_table ).
text->add_line( ' ' ).
text_line = 'Last line of text'.
text->add_line( text_line ). text->display( ). text->delete( ).
text->add_line( 'New text' ).
text->display( ). ENDMETHOD.
ENDCLASS. START-OF-SELECTION.
demo=>main( ).
Description
The program uses the methods of the class CL_DEMO_TEXT, which was designed for this purpose. The class encapsulates the usage of a Textedit Control in a dialog window.
Wrapper like this can replace the usage of the statement WRITE for simple text outputs.
最新文章
- Android 6.0 运行时权限处理完全解析
- 剑指Offer面试题:4.从尾到头打印链表
- android第一行代码-6.自定义控件的实现
- S2SH CRUD 整合
- ab基本用法
- 小明系列问题——小明序列(Lis 相距大于d的单调上升子序列)
- Linux内核启动代码分析二之开发板相关驱动程序加载分析
- SQL Server-聚焦ROW_NUMBER VS TOP N性能
- 强化学习(三)用动态规划(DP)求解
- EXPLAIN 命令详解
- 学习笔记TF066:TensorFlow移动端应用,iOS、Android系统实践
- Keras bug in model.predict
- Mysql Group by 使用解析
- Spring_AOP动态代理详解(转)
- Jenkins忘记用户名密码
- angular(二)
- Android如何定制一个下拉刷新,上滑加载更多的容器
- Windows利用命令行快速清除以及建立密码
- The return types for the following stored procedures could not be detected
- A1055 The World's Richest(25 分)
热门文章
- linux3种安装软件、yum仓库、防火墙、乱码
- [翻译] 使用 TensorFlow 进行分布式训练
- SpringMVC踩坑3——前后端传值问题
- vue3 操作修改数据
- Codeforces Round #754 (Div. 2), problem: (A) A.M. Deviation泪目 万万没想到狂wa是因为这
- 【大学物理实验】01 单摆测重力加速度 的 g 计算代码
- tomcat的搭建和介绍
- jquery 动态 给select赋值
- ChCore Lab4 多核处理 实验笔记
- 巧用 Docker 快速部署 GPU 环境