use regular expression instead of ABAP function module to parse attachment
to of ABAP Function module use expression parse
2023-09-14 09:02:51 时间
在做my task offline performanc improvement时,先参考BP代码,里面有一行call 下图的FM去将变量ls_key里存储的attachment information解析出来:
ls_key的一个例子:
这个FM的作用就是解析用两个/分隔开的document type: L, document class: CRM_L_ORD和document guid。
这个FM用的传统的做法,把三个k split到一个internal table里,然后READ TABLE INDEX 1,2,3的方式分别取出每个key。用了42行代码。
如果用正则表达式,只需1行代码:
而且后者比前者快3~6倍:因为FIND REGEX是用c++实现的,比在ABAP端做要高效。参考如下的性能测试比较结果:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":相关文章
- ORA-19287: XPST0017 – invalid number of arguments to function – string:string ORACLE 报错 故障修复 远程处理
- ORA-19510: failed to set size of string blocks for file “string” (block size=string) ORACLE 报错 故障修复 远程处理
- ORA-27043: unable to seek to beginning of file ORACLE 报错 故障修复 远程处理
- ORA-30691: failed to allocate system resources while registering a TCP/IP connection for data traffic detection ORACLE 报错 故障修复 远程处理
- ORA-30926: unable to get a stable set of rows in the source tables ORACLE 报错 故障修复 远程处理
- ORA-54033: column to be modified is used in a virtual column expression ORACLE 报错 故障修复 远程处理
- ORA-03292: Table to be truncated is part of a cluster ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-011637; Symbol: ER_GRP_RPL_FAILED_TO_INIT_COMMUNICATION_ENGINE; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-09754: sppst: invalid process number passed to sppst. ORACLE 报错 故障修复 远程处理
- ORA-12063: unable to apply transaction from site string ORACLE 报错 故障修复 远程处理
- ORA-13281: failure in execution of SQL statement to retrieve WKT ORACLE 报错 故障修复 远程处理
- ORA-15564: contents of the replay directory provided to the workload replay client do not match with the replay directory provided to the database server ORACLE 报错 故障修复 远程处理
- identifier of an instance of xxx was altered from 11111 to 1详解编程语言
- 远望资本程浩:To C转To B,从业者如何避坑前行?| 鲸犀峰会
- 如何在Linux系统中定时执行sh脚本?How to schedule the execution of a sh script in Linux?(linux定时执行sh)
- Exploring the Power of MongoDB: The Definitive Guide to Upgrading Arrays(mongodb更新数组)
- Exploring the World of Linux with Ease: A Guide to Using 遨游 Browser(遨游forlinux)
- Learn How to Connect Your Java Application with MongoDB in Just a Few Steps(java连接mongodb)
- The Power and Efficiency of a Linux Server: Everything You Need to Know(linuxsever)
- Exploring the Power of MD Linux: A Comprehensive Guide to the Revolutionary Operating System(mdlinux)