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. tarroni music

    1,tarroni http://www.tarronishoes.it/audio.php 2, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1 ...

  2. jvm感知docker容器参数

    docker中的jvm检测到的是宿主机的内存信息,它无法感知容器的资源上限,这样可能会导致意外的情况. -m参数用于限制容器使用内存的大小,超过大小时会被OOMKilled. -Xmx:  默认为物理 ...

  3. JDK、JRE与JVM的关系

  4. [UE4]HorizontalBox,整体向右对齐

  5. Course List for Student

    题目描述 Zhejiang University has 40000 students and provides 2500 courses. Now given the student name li ...

  6. 基于Boost的同步TCP通信

    1:客户端 #include <iostream> #include <boost/asio.hpp> using namespace boost; using namespa ...

  7. Java 6- Java 运算符

    计算机的最基本用途之一就是执行数学运算,作为一门计算机语言,Java也提供了一套丰富的运算符来操纵变量.我们可以把运算符分成以下几组: 算术运算符 关系运算符 位运算符 逻辑运算符 赋值运算符 其他运 ...

  8. Solr使用in语法查询

    Solr可以用AND.||  布尔操作符 表示查询的并且, 用OR.&&  布尔操作符 表示或者 用NOT.!.-(排除操作符不能单独与项使用构成查询)表示非 如果要用在查询的时候使用 ...

  9. 并发编程:GIL,线程池,进程池,阻塞,非阻塞,同步,异步

    一  GIL(global interpreter lock) GIL中文叫全局解释器锁,我们执行一个文件会产生一个进程,那么我们知道进程不是真正的执行单位,而是资源单位,所以进程中放有解释器(cpy ...

  10. Vue学习记录(一)

    一.引入js文件(直接采用CDN): http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js 二.简单实例: (1)HTML代码: &l ...