首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Jerry的ABAP原创技术文章合集

Jerry的ABAP原创技术文章合集

原创
作者头像
Jerry Wang
发布2018-02-04 12:37:18
1.8K0
发布2018-02-04 12:37:18
举报

我之前发过三篇和ABAP相关的文章:

  1. Jerry的ABAP, Java和JavaScript乱炖

这篇文章包含我多年来在SAP成都研究院使用ABAP, Java和JavaScript工作过程中的一些感悟: 三种语言里一些具体技术点的横向比较。随便提一些:

  • ABAP Load Vs Java Byte code
  • ABAP和Java的weak reference比较
  • ABAP和Java的垃圾回收比较
  • ADBC和JDBC
  • 用ABAP模拟闭包/柯里化/动态代理/Spring依赖注入

2. ABAP开发人员未来应该学些什么

这篇文章包含了一些关于ABAP开发人员如何保持竞争力这个话题我的一些个人看法。

3. Jerry 2017年的五一小长假:8种经典排序算法的ABAP实现


而本篇文章是我过去写的关于纯ABAP的技术分享文章的合集。这个合集里包含的文章有的是我对ABAP新知识的学习笔记,有的是解决一些具体问题的思路分享,还有的则是我如何用ABAP提升自己工作效率的分享。

总共有59篇文章。

1. A real example:how to leverage ABAP breakpoint with type "Exception"

介绍这种异常类型的断点在调试中的一个具体应用。

https://blogs.sap.com/2013/11/07/a-real-example-how-to-leverage-abap-breakpoint-with-type-exception/

2. Six kinds of debugging tips to find the source code where the message is raised

我2013年写的文章,应用场景是假设您在SAPGUI里遇到了一个错误信息,您想知道具体哪一行代码抛出的该错误信息?

文章里介绍了6种不同的办法。我个人认为灵活掌握了这些方法,不仅仅对于在SAPGUI环境的排错,还是对于在Web环境,比如Fiori或者WebClient UI, 都是很有用的。

往往有的朋友反映CRM中间件里报得很多错误信息都不是特别有用,看了之后仍然不知道从哪里入手来避免。我一般处理这种问题的办法就是通过本文介绍的方法找到具体哪一行代码抛出的错误信息,然后在附近一般就能找到检查的逻辑,因为这些错误信息几乎都是在检查失败之后的ELSE分支里抛的,通过阅读检查逻辑的代码我就能了解到正确的逻辑应该是怎样的,然后就能做对应的处理。

https://blogs.sap.com/2013/11/15/six-kinds-of-debugging-tips-to-find-the-source-code-where-the-message-is-raised/

3. Single step debugging on Macro

ABAP宏的单步调试。

很多编程语言里的宏都是无法单步调试的。我们得感谢SAPGUI, 在工具层面提供了宏的单步调试功能。

https://blogs.sap.com/2013/11/17/single-step-debugging-on-macro/

4. Have fun with system log – your debugging activity is being recorded by System

SAP不推荐直接在生产系统通过调试的方式修改数据或者在程序执行的时候通过调试器里的Shift+F12更改程序的执行流,这样可能造成生产系统的数据不一致或者程序执行出错。我们不能存在侥幸心理,认为自己悄悄在调试器里修改一个变量的值, 没人会知道。其实所有这一切都记录在系统日志里:

https://blogs.sap.com/2013/11/20/have-fun-with-system-log-your-debugging-activity-is-being-recorded-by-system/

5. Four different TEST ISOLATION techniques to build your ABAP unit test

设计并实现ABAP单元测试的一些技巧和方法论。SAP的标准开发对于新的功能代码的单元测试有很严格的要求。

https://blogs.sap.com/2013/11/21/four-different-test-isolation-techniques-to-build-your-abap-unit-test/

6. A compare tool: Download and analyze the runtime performance result from SAT

我自己写的工具,用于SAP内部项目。比如我在两个系统HN1和Q2U分别用SAT执行了同一段代码,我想side by side比较这两个系统里这同一段代码执行的性能。标准的事务码SAT只提供导出功能,但没有导入并比较的功能,所以我自己写了一个。

https://blogs.sap.com/2013/11/21/a-compare-tool-download-and-analyze-the-runtime-performance-result-from-sat/

7. ABAP Mesh in 740: Connect your internal table as BO node association

ABAP 740新语法的学习笔记,没有在实际项目中遇到。

https://blogs.sap.com/2013/12/06/abap-mesh-in-740-connect-your-internal-table-as-bo-node-association/

8. New Open SQL Enhancement in 740

ABAP 740 Open SQL的增强介绍:

https://blogs.sap.com/2013/12/06/new-open-sql-enhancement-in-740/

9. An example of AMDP( ABAP Managed Database Procedure ) in 740

ABAP存储过程,在我的公众号文章里提到的原型开发中使用到了这个技术。

https://blogs.sap.com/2013/12/10/an-example-of-amdp-abap-managed-database-procedure-in-740/

10. A small tip to find all classes which are registered to a given event – And how I find this tip via SM50

小技巧, 事务码SM50的另类用法:

https://blogs.sap.com/2013/12/10/a-small-tip-to-find-all-classes-which-are-registered-to-a-given-event-and-how-i-find-this-tip-via-sm50/

11. ABAP Class documentation generator

如何自动给ABAP class生成文档, 在SAPGUI里点击按钮之后能看到生成的文档:

https://blogs.sap.com/2013/12/12/class-documentation-generator/

12. ABAP static analysis tool SQF

事务码SQF介绍,强大的静态代码分析工具

https://blogs.sap.com/2013/12/23/abap-static-analysis-tool-sqf/

13. A small tip of class cl_system_transaction_state

工具类cl_system_transaction_state的介绍:

https://blogs.sap.com/2014/01/03/a-small-tip-of-class-clsystemtransactionstate/

14. A small tip to get a list of changed objects at the given time period

提高工作效率的小技巧:处于工作需要,我经常得快速找到在指定的时间段内我修改了哪些ABAP代码,用这个技巧很快能得到清单。

https://blogs.sap.com/2014/02/07/a-small-tip-to-get-a-list-of-changed-objects-at-the-given-time-period/

15. Use report RSDEPEND to analyze ABAP load dependencies

借助标准report RSDEPEND介绍ABAP load依赖管理原理

介绍了为什么下面这个程序进行语法检查时会遇到这个奇怪的错误消息?

https://blogs.sap.com/2014/02/07/use-report-rsdepend-to-analyze-abap-load-dependencies/

16. 用ABAP生成二维码(QRCode)

https://blogs.sap.com/2014/02/24/%E7%94%A8abap-%E7%94%9F%E6%88%90%E4%BA%8C%E7%BB%B4%E7%A0%81/

17. ABAP动态类型创建介绍

自己写了一个工具,能在运行期动态创建新的数据类型(RTTC Tool),用于内部工具开发。

https://blogs.sap.com/2014/02/28/a-handy-rttc-tool/

18. How to add a view into favourite

如何把视图添加到SAPGUI的收藏夹里

https://blogs.sap.com/2014/03/06/how-to-add-a-view-into-favourite/

19. General properties of ABAP Classes / Interfaces

介绍了这些CCDEF, CCIMP和CCMAC等等是什么鬼。

https://blogs.sap.com/2014/03/14/general-properties-of-abap-classes-interfaces/

20. A small tip of viewing RAWSTRING field in SE16

事务码SE16里不能直接查看这种类型为RAWSTRING的字段内容,需要一些技巧。

https://blogs.sap.com/2014/03/25/a-small-tip-of-viewing-rawstring-field-in-se16/

21. Favorite List Management Tool

SAPGUI里的收藏夹管理工具,我需要该功能但是SAPGUI不提供,只能自己写了一个。

https://blogs.sap.com/2014/04/24/favorite-list-management-tool/

22. Step by step to create, consume and trace web service in ABAP system

ABAP里如何创建,消费和监控Web Service

https://blogs.sap.com/2014/05/20/step-by-step-to-create-consume-and-trace-web-service-in-abap-system/

23. Learn more detail about Standard logon procedure

介绍这个登录过程的一些细节。

https://blogs.sap.com/2014/05/21/learn-more-detail-about-standard-logon-procedure/

24. Manipulate Docx document with ABAP

使用ABAP编辑Word文档

https://blogs.sap.com/2014/05/28/manipulate-docx-document-with-abap/

25. Create word attachment which consumes external web service

使用Word文档消费Web Service:

https://blogs.sap.com/2014/06/05/create-word-attachment-which-consumes-external-web-service/

26. One approach to trace a dedicated workprocess

介绍report RSTRC000的用法:

https://blogs.sap.com/2014/07/08/one-approach-to-trace-a-dedicated-workprocess/

27. An issue caused by implicit conversion during RFC call

15写成'15'引起的血案:

https://blogs.sap.com/2014/08/09/an-issue-caused-by-implicit-conversion-during-rfc-call/

28. An example to help you understand how does ADT work

ABAP in Eclipse的前台Java代码和后台ABAP Server的交互原理

https://blogs.sap.com/2014/08/12/an-example-to-help-you-understand-how-does-adt-work/

29. A Small tip to get all transparent tables used in ABAP code

小技巧: 如何得到一段ABAP代码里使用到的所有透明表(Transparent Table)的清单

https://blogs.sap.com/2015/06/15/a-small-tip-to-get-all-transparent-tables-used-in-abap-code/

30. Useful tips regarding ABAP code inspector that you may not know

ABAP Code inspector还能这样用:推荐ABAP开发人员浏览本文以了解这些隐藏功能

https://blogs.sap.com/2015/06/15/useful-tips-regarding-abap-code-inspector-that-you-may-not-know/

31. Do SAT trace on applications which could not be launched by SAT

使用事务码SAT对UI应用进行性能监控

这是我很喜欢的一个强大功能,性能监控仅仅是其用途之一。本文介绍的另一个用途是当我拿到一个陌生的UI应用,无论是Fiori, C4C UI还是CRM WebClient UI,假设我需要知道一段操作后台执行了哪些ABAP代码, 但是我对这个应用的后台实现一点都不了解,无从下手。此时我可以用SAT跑一次UI应用,所以后台执行的代码被SAT忠实地记录了下来,非常方便我研究。下图是一个例子:

这个技巧帮助我顺利完成了很多别人布置给我的研究任务。

https://blogs.sap.com/2015/07/11/do-sat-trace-on-applications-which-could-not-be-launched-by-sat/

32. ABAP keyword syntax diagram

介绍了ABAP帮助文档里的语法图

https://blogs.sap.com/2015/09/10/abap-keyword-syntax-diagram/

33. Step by Step to generate ABAP code automatically using Code Composer

介绍了ABAP Code Composer的概念

https://blogs.sap.com/2015/09/11/step-by-step-to-generate-abap-code-automatically-using-code-composer/

34. One order document application log read optimization

一个API性能优化案例,优化前后性能对比:

https://blogs.sap.com/2015/12/12/one-order-document-application-log-read-optimization/

35. A simple performance comparison against different types of internal tables

一个简单的性能评测: 标准表, 有序表和哈希表的读写性能比较

https://blogs.sap.com/2015/12/19/a-simple-performance-comparison-against-different-types-of-internal-tables/

36. An ABAP tool to get ABAP source codes line number

统计指定条件的ABAP代码的总行数,例如一个Package或者一个function group下面的所有ABAP代码总行数, 效果如下图:

https://blogs.sap.com/2016/04/03/an-abap-tool-to-get-abap-source-codes-line-number/

37. Three ways to achieve conditional break point in your ABAP program

三种方式实现ABAP条件断点: 这是SAP成都同事提的问题,需求是希望断点仅当满足特定条件时才触发。

https://blogs.sap.com/2016/05/26/three-ways-to-achieve-conditional-break-point-in-your-abap-program/

38. Some more technical details about SAP note

SAP note, 每一个SAP从业者都不陌生。这篇文章介绍了SAP note背后的一些技术细节,以及如何开发一些小工具来更高效地使用SAP note.

https://blogs.sap.com/2016/06/19/some-more-technical-details-about-sap-note/

39. Display content in table DDLOG

如何通过代码访问类型为LRAW的字段

https://blogs.sap.com/2016/06/22/display-content-in-table-ddlog/

40. An example of Database deadlock in SAP table

SAP ABAP开发人员面试题: 写一段会出现死锁的ABAP代码。先别急着看代码,看看您有思路么?

https://blogs.sap.com/2016/06/27/an-example-of-database-deadlock-in-sap-table/

41. ABAP开发面试题

说出下面4个打印语句的输出?

https://blogs.sap.com/2016/11/02/can-you-answer-this-simple-question-regarding-conversion-rule-correctly-without-hesitation/

42. ABAP调试脚本的两个具体使用案例

Use ABAP debugger script to view BOL entity content in an efficient way:https://blogs.sap.com/2016/11/03/use-abap-debugger-script-to-view-bol-entity-content-in-an-efficient-way/

Use ABAP debugger script to view dynamic query service selection parameter in an efficient way: https://blogs.sap.com/2016/11/04/use-abap-debugger-script-to-view-dynamic-query-service-selection-parameter-in-an-efficient-way/

43. CL_OBJECT_COLLECTION, iterator and Polymorphism

文末其他网友的回复里有干货。

https://blogs.sap.com/2016/11/05/cl_object_collection-iterator-and-polymorphism/

44. Use ABAP Multi-“Thread” programming to deal with a real performance issue

ABAP并发编程(Parallel Programming)的一次尝试:

https://blogs.sap.com/2017/02/10/use-abap-multi-thread-programming-to-deal-with-a-real-performance-issue/

45. Some small ABAP tools I write to improve daily work efficiency or just for fun

我自己写的一些ABAP小工具,有的能提升工作效率,有的用来恶作剧。

比如打印一个user在过去某个时间段使用事务码的次数,从高到低排列。

比如下图2017年3月,我总共使用了692次事务码SAT, 这让我很容易回忆起去年这个月我在处理一个和性能相关的ticket.

或者是这种,在某位同事聚精会神调试代码时,给TA的SAPGUI窗口填一个对话框出来,建议TA起身休息一会?

https://blogs.sap.com/2017/03/25/some-small-abap-tools-i-write-to-improve-daily-work-efficiency-or-just-for-fun/

46. ABAP里有三组关键字, 傻傻分不清楚

  • IS BOUND
  • IS INITIAL
  • IS ASSIGNED

https://blogs.sap.com/2017/04/01/is-bound-is-initial-and-is-assigned/

47. Implement Custom Syntax Check in SAP GUI

介绍如何增强SAPGUI的语法检查。我做了一个例子,强制要求每个类的方法源代码行数不得超过100行。当您点击SAPGUI语法检查的按钮或者快捷键Ctrl+F2时,一旦超过,会看到我自定义的错误消息:

https://blogs.sap.com/2017/04/13/implement-custom-syntax-check-in-sap-gui/

48. Bitwise operation ( OR, AND, XOR ) on ABAP Integer

用ABAP内表模拟的ABAP位操作,仅能用于教学目的,因为性能太差。不过ABAP应用的开发也几乎不会遇到需要借助像Java支持的那种位操作功能。

https://blogs.sap.com/2017/04/28/bitwise-operation-or-and-xor-on-abap-integer/

49. An interview question: Compare two integers without +,-,*,/ or > and <

ABAP面试题: 实现两个整数比较大小的方法,要求不能在方法体内使用加减乘除或者大小于比较符号。

https://blogs.sap.com/2017/04/29/an-interview-question-compare-two-integers-without-or-and/

50. Replicate ABAP database table definition to PostgreSQL

把ABAP数据库表的定义导入到PostgreSQL数据库里

https://blogs.sap.com/2017/05/08/replicate-abap-database-table-definition-to-postgresql/

51. Locators in ABAP Open SQL

一种新的使用Locator(定位器)读取数据库表数据的方式

这篇文章介绍了Locator的使用场合以及和传统OPEN SQL的性能比较。

https://blogs.sap.com/2017/05/11/locators-in-abap-open-sql/

52. Export ABAP transparent table content to PostgreSQL table

把ABAP的数据库表的内容导到PostgreSQL数据库里

https://blogs.sap.com/2017/05/12/export-abap-transparent-table-content-to-postgresql-table/

53. CL_ABAP_CORRESPONDING, CL_JAVA_CORRESPONDING and CL_JS_CORRESPONDING

CL_ABAP_CORRESPONDING是ABAP标准的工具类,后两个是我参照它的思路用Java和JavaScript重写的,ABAPer可以只关注ABAP的工具类。

https://blogs.sap.com/2017/05/14/cl_abap_corresponding-cl_java_corresponding-and-cl_js_corresponding/

54. A real case to use REDUCE to finish a task in daily work

ABAP 740提供的新关键字REDUCE, 一直想在工作中用它实践。本文介绍了一个例子。

https://blogs.sap.com/2017/05/14/a-real-case-to-use-reduce-to-finish-a-task-in-daily-work/

55. Use ABAP Channels to build a trace tool used in my daily work

SAP community上有一些对ABAP Channel技术的介绍,本文则是我用这个技术提升我工作效率的尝试之一。

Netweaver上有各种各样的trace工具,这些trace工具的一个共有之处是需要先打开工作的trace状态,然后在trace状态下运行应用,应用结束之后关闭trace,然后查看trace文件。典型的比如事务码ST05, ST12和SAT。

我觉得这样太麻烦了,有没有可能应用在运行时,trace信息实时地显示在浏览器里呢?可以!用ABAP Channel就行。

https://blogs.sap.com/2017/05/16/use-abap-channels-to-build-a-trace-tool-used-in-my-daily-work/

56. A list of some “magic” tables and reports I collect in my daily work for ABAP development

一些ABAP小工具

https://blogs.sap.com/2017/06/18/a-list-of-some-magic-tables-and-reports-i-collect-in-my-daily-work-for-abap-development/

57. A Github repository issue tool developed by ABAP

自己写的小工具。Github自带的仓库备份工具我觉得太难用,我自己用ABAP写了一个,能满足我的需求:把公网上个人仓库里的issue备份到ABAP服务器上。

https://blogs.sap.com/2017/07/14/a-github-repository-issue-tool-developed-by-abap/

58. Regarding cookie manipulation in CL_HTTP_CLIENT to avoid CSRF token validation failure issue

使用CL_HTTP_CLIENT需要避开的一个cookie陷阱:

https://blogs.sap.com/2017/08/04/regarding-cookie-manipulation-in-cl_http_client-to-avoid-csrf-token-validation-failure-issue/

59. Just for fun – Implement a + b using pure bitwise operation in ABAP

在ABAP里使用纯粹的位操作实现两个整数相加

https://blogs.sap.com/2017/10/13/just-for-fun-implement-a-b-using-pure-bitwise-operation-in-abap/

要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
应用性能监控
应用性能监控(Application Performance Management,APM)是一款应用性能管理平台,基于实时多语言应用探针全量采集技术,为您提供分布式性能分析和故障自检能力。APM 协助您在复杂的业务系统里快速定位性能问题,降低 MTTR(平均故障恢复时间),实时了解并追踪应用性能,提升用户体验。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档