1.界面

2.代码

 *&---------------------------------------------------------------------*
*& Report ZRICO_TEST21
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report zrico_test21.
tables: sscrfields.
data: itab_code type standard table of char72.
data: v_line type i.
data: s_message type trmsg.
data: v_word type char72.
data: v_report type syrepid value 'Z_TEST_REPORT_11'.
data: v_time1 type i.
data: v_time2 type i.
data: v_repid type sy-repid.
data: x_docking type ref to cl_gui_docking_container,
x_editor type ref to cl_gui_textedit.
parameters:p_report() default 'REPORT zrico_test23.'.
selection-screen skip .
selection-screen begin of line.
selection-screen comment () v_text.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment () v_text1.
selection-screen end of line.
selection-screen function key . initialization.
v_repid = sy-repid.
v_text = 'Report Z_TEST_REPORT_11 will be generated'.
v_text1 = 'This is a small utility program to get the run time for the given code.'.
sscrfields-functxt_01 = 'Check syntax'. at selection-screen output.
loop at screen.
if screen-name = 'REPORT'.
screen-input = .
modify screen.
endif.
endloop.
if x_docking is initial .
create object x_docking
exporting
repid = v_repid
dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_bottom
extension = ''
exceptions
cntl_error =
cntl_system_error =
create_error =
lifetime_error =
lifetime_dynpro_dynpro_link = .
endif .
if x_editor is initial.
create object x_editor
exporting
parent = x_docking
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position =
max_number_chars = .
endif . at selection-screen.
check sy-ucomm = 'FC01'.
perform code_and_syntax_check. start-of-selection.
perform code_and_syntax_check.
insert report 'Z_TEST_REPORT_11' from itab_code.
if sy-subrc <> .
message i398() with 'Errors in generating'.
leave list-processing.
endif.
generate report 'Z_TEST_REPORT_11'.
if sy-subrc <> .
message i398() with 'Errors in generating'.
leave list-processing.
else.
message s398() with 'Code generated successfully'.
endif.
get run time field v_time1.
submit (v_report) and return.
get run time field v_time2.
v_time2 = v_time2 - v_time1.
write: / 'Run time in micro seconds = ', v_time2.
*&---------------------------------------------------------------------*
*& Form code_and_syntax_check
*&---------------------------------------------------------------------*
form code_and_syntax_check.
refresh: itab_code.
call method x_editor->get_text_as_r3table
importing
table = itab_code
exceptions
error_dp =
error_cntl_call_method =
error_dp_create =
potential_data_loss =
others = .
if sy-subrc <> .
message i398() with 'Error in getting the code'.
leave program.
endif.
insert p_report into itab_code index .
syntax-check for itab_code message s_message line v_line word v_word.
if sy-subrc <> .
message i398() with s_message-msgtext 'Line' v_line.
leave list-processing.
else.
message s398() with 'No syntax errors'.
endif.
endform. " code_and_syntax_check

ABAP-语法检查的更多相关文章

  1. SAPGUI里实现自定义的语法检查

    需求:在SAPGUI里点击这个语法检查的小图标或者直接按快捷键Ctrl+F2可以执行ABAP标准的语法检查. 如果需要实现SAPGUI里自定义的语法检查,比如,某团队强制要求应用程序类的每个方法的实现 ...

  2. 如何在Texstudio内加载语法检查词典?

    如何在Texstudio编辑软件内加载"语法检查词典"? How to make dictionary work in TexStudio I am using TexStudio ...

  3. emacs配置eslint 语法检查.找不到node解决

    使用emacs配置eslint 当调用语法检查时报错 Suspicious state from syntax checker javascript-eslint: Checker javascrip ...

  4. [No000013]在Office中关闭自动拼写检查和自动语法检查

    大家知道有时候语法检查很麻烦,搞得文档里都是红线和绿线.解决办法就是关闭自动拼写检查.现在我们来介绍怎么关闭office包括Word .Outlook .PowerPoint .OneNote .Pu ...

  5. 一个简单的C语言语法检查器的实现

    我自己的实现方法的核心过程:首先用一个非终结符代表所有要检查的程序代码,然后根据文法将这个整体的符号不断展开,以拼凑成按检查的程序的顺序排列的终结符序列,能成功说明语法正确,否则有错误. 关键词:分词 ...

  6. Grunt 之 使用 JavaScript 语法检查工具 jshint

    前端开发环境准备好了,我们准备开始进行开发. 前端开发的主力语言是 JavaScript,这是一种脚本语言,没有编译器,也就没有了编译器带给我们的语法检查,怎样保证代码的质量呢?jshint 是一个强 ...

  7. VIM 语法检查

    VIM Grammar Check 一.Language Tool Create by Dominique Pellé REFER:LanguageTool wikipedia REFER:Langu ...

  8. linux下常用语言的语法检查插件整理

    linux下常用语言的语法检查插件 可以结合vim语法检查插件syntastic使用,具体请参考syntastic使用说明 如php,sql,json,css,js,html,shell,c等语法插件 ...

  9. MySQL递归查询_函数语法检查_GROUP_CONCAT组合结果集的使用

    1-前言: 在Mysql使用递归查询是很不方便的,不像Sqlserver可以直接使用声明变量,使用虚拟表等等.如:DECLARE,BEGIN ...  END   ,WHILE ,IF 等等. 在My ...

  10. golang使用vet进行语法检查

    go tool vet是你的好朋友,不要忽视它. vet是一个优雅的工具,每个Go开发者都要知道并会使用它.它会做代码静态检查发现可能的bug或者可疑的构造.vet是Go tool套件的一部分,我们会 ...

随机推荐

  1. 一个简单的springmvc例子 入门(1)

    一直是从事棋牌游戏,平常用的东西 大多数只是使用一些javase的一些 api对spring 这方面 用到的比较少,每次学了都忘,始终记不住.为了 更轻松学习springboot,从新学习了sprin ...

  2. 数据库SQL语言学习--上级练习1(数据查询)

    上机练习1 1.              启动SQL Server 2008中的 SQL Server Management Studio. 2.              创建数据库Student ...

  3. sqlserver基本增删查语句

    use StudentManageDB go insert into Students (StudentName,Gender,Birthday,Age,StudentIdNo ,PhoneNumbe ...

  4. Ext.NET Ext.JS 常用代码片段摘录

    引言 最近写代码突然有"一把梭"的感觉, 不管三七二十一先弄上再说. 换别人的说法, 这应该是属于"做项目"风格法吧. 至于知识体系, 可以参考官方或者更权威的 ...

  5. crm SDK 设置用户的上级

    /// <summary> /// 设置用户的上级 /// </summary> /// <param name="service">服务< ...

  6. python数据类型总结

    按存值个数区分 标量/原子类型 数字,字符串 容器类型 列表,元组,字典 按可变不可变区分 可变 列表,字典 不可变 数字,字符串,元组 按访问顺序区分 直接访问 数字 顺序访问(序列类型) 字符串, ...

  7. Java - 28 Java 泛型

    Java 泛型 如果我们只写一个排序方法,就能够对整型数组.字符串数组甚至支持排序的任何类型的数组进行排序,这该多好啊. Java泛型方法和泛型类支持程序员使用一个方法指定一组相关方法,或者使用一个类 ...

  8. Hadoop2.6.5集群搭建

    一. Hadoop的分布式模型 Hadoop通常有三种运行模式:本地(独立)模式.伪分布式(Pseudo-distributed)模式和完全分布式(Fully distributed)模式.安装完成后 ...

  9. ubantu 上hadoop 搭建

    Hadoop安装教程_单机/伪分布式配置_Hadoop2.6.0/Ubuntu14.04 参考 http://www.powerxing.com/install-hadoop/ 2014-08-09 ...

  10. Linux的用户

    添加用户 添加删除用户 # useradd user # passwd user Changing password for user user. New password: BAD PASSWORD ...