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. 身高安排方法(基础dfs)

    P1085 时间限制: 0 Sec  内存限制: 128 MB提交: 64  解决: 44[提交][状态][讨论版][命题人:外部导入] 题目描述 Matrix67发现身高接近的人似乎更合得来.Mat ...

  2. WordPress无法显示Gravatar头像的解决方法

    最近捣鼓WordPress博客发现无法正常显示Gravatar头像,查找原因是因为国内屏蔽了Gravatar导致的,这导致无数国内Wordpress网站头像无法显示,并且影响到了相关页面的访问速度(如 ...

  3. oracle表空间不足时如何处理

    1 查看表在那个表空间select tablespace_name,table_name from all_tables where table_name='T_BM_GOODS_BASE'; 2   ...

  4. lvm的磁盘管理知识点整理

    首先感谢参考的博客网址: http://blog.51cto.com/dreamfire/1084729 https://www.cnblogs.com/kevingrace/p/5825963.ht ...

  5. MFC 控件使用教程

    combo box控件用法: 下拉选择控件,首先将控件拖动到你需要使用控件的地方,用ClassWizard为它关联一个变量,我们注意到变量类型是CString型的.右击属性,General中可以设置一 ...

  6. 1136 A Delayed Palindrome (20 分)

    Consider a positive integer N written in standard notation with k+1 digits a​i​​ as a​k​​⋯a​1​​a​0​​ ...

  7. 初始Golang

    Golang初识 字节跳动也就是我们常说的今日头条 1.今日头条基于Go语言构建千亿级微服务的实践 今日头条当前后端服务超过80%的流量是跑在Go构建的服务上 微服务数量超过100个 高峰QPS超过7 ...

  8. JSP基础解析

    EL表达式     https://www.cnblogs.com/zhouguanglin/p/8117406.html EL(Expression Language) 是为了使JSP写起来更加简单 ...

  9. layui之select的option叠加问题解决

    小编我在使用layui,在select的地方遇到了坑,select里的值居然无法清空,select里的option还有叠加问题,为了解决这个问题,也达到我的功能,我研究了下,让有同样需求的小伙伴不踩坑 ...

  10. 【CF1132F】Clear the String (DP)

    /* 区间dp题目, 考虑当前区间l,r 是可以枚举最后一次拿的分界点来考虑最右边节点是不是具有贡献 */ #include<cstdio> #include<algorithm&g ...