当前位置:网站首页>SAP Product Enhancement Technology Review

SAP Product Enhancement Technology Review

2022-08-11 10:03:00 InfoQ

I recently the work and theSAPScalability of a cloud product design related,Therefore take this opportunity to,I used to work in the accumulation ofSAPProduct extension technology related knowledge to do a comb and review.

文章目录

SAP产品标准

SAP Field Extensibility简述

SAP Side-by-Side Extensibility简述

SAP In-App Extensibility介绍

SAP Business AddinStrengthen the concept in a variety ofSAP产品中的应用

ABAPClass section programming oriented(Aspect Oriented Programming)

SAP CommerceExtend mode briefly

SAP Fiori UIExtend mode briefly

展望未来

The following is the text.

SAPProducts before release to the market,All must go through a series of strict product standards(Product Standards)相关测试.

The product standards including, but not limited to:

  • 功能正确性(Functional Correctness)
  • 性能(Performance)
  • 安全性(Security)
  • 全球化(Globalization)
  • Business configuration sex(Business Configuration)
  • 可扩展性(Extensibility)
  • 生命周期管理(Software Lifecyle)
  • Accessibility design(Accessibility)

null
其中SAP产品的可扩展性(Extensibility), Scalability and can be subdivided into field level(Field Extensibility)And the process level(Process Extensibility)的可扩展性.Of course sometimes there is no clear to distinguish the boundaries both,Such as customer application scenario,Once you've created the new extension field after,Also usually expect the field involved in the business process to,The so-called end-to-end extended scene(End-to-End Extension Scenario).

Jerry之前写过一篇文章介绍了SAPProduct field level extensibility(Field Extensibility)的设计原理:
SAP产品的Field Extensibility
,本文则介绍SAPProduct process level of scalability.

SAPThe product of two kinds of scaling:In-App和Side-by-Side Extensibility

以Jerry工作的SAP C/4HANA套件为例,在
SAP帮助文档
里,We can first choose toIn-App Extensibility还是以Side-by-Side的方式来扩展:

null
After the selected extension type,Again from the drop-down menu to select the specific product name,Get the product to the selected extension type,SAPThe expansion of the recommended way to.

null
所谓In-App Extensibility,指通过SAPExtension tools to createEnhancement(增强),With the enhancement ofSAPStandard products run on the same server.更准确地说,Enhancement was implemented with enhancedSAPApplication running on the same session(Session)内.

与之相对的是Side-by-Side Extensibility,Enhancement was implemented with enhancedSAPApplications typically run on a different server.以Jerry之前文章 
基于SAP Kyma的订单编排增强介绍
 Mentioned in the scenario, for example,SAP Commerce将Order.Created事件注册到SAP Cloud Platform Extension Factory(Kyma)上,Secondary developers inSAP云平台上创建Lambda Function,订阅这个事件,Send E-mail logic.The runtime wheneverSAP CommerceOrder creation,Order.Created事件发布到SAP云平台上,Lambda Function被触发,自动发送邮件.

通过Side-by-Side Extensibility,Can achieve consulting companyGartner早在2014Years of dual modeIT(Bimodel)概念,Namely on the one hand, throughSAP S/4HANAAs digital core,To support the enterprise stable operation;另一方面,通过SAPCloud platform architecture of digital innovation platform,借助包括人工智能、区块链、大数据分析等前沿科技,对S/4HANA进行Side-by-Side扩展,帮助客户实现快速的产品/服务乃至商业模式的创新.

null
关于Side-by-Side Extensibility,JerryThe article had a brief introduction before:

还在用ABAP进行SAP产品的二次开发?来了解下这种全新的二次开发理念吧

null
The rest of this article focused onSAP In-AppThis way of expanding.

在讨论SAPWhen the product extension,It is necessary for us to distinguish the differences of the concept of this group of:Enhancement(增强)和Modification(修改). The latter is directly on theSAPSource code of the modified products,在SAPProduct upgrades orPatchThe import system,These local modifications will be overwritten,故SAP不推荐通过Modification的方式进行二次开发.而SAPEnhancement technique is not overwritten when product upgrade problems,因此将SAPEnhancement technique described as a kind of aUpgrade Safe或者Modification Free特性的技术.

null

SAP Business AddinStrengthen the concept in a variety ofSAP产品中的应用

以ABAPAs a technology stackOn-Premises产品,The enhancement technology has a long history.Although there are differences between the specific technical implementation,Yet all ideas:SAPIn advance in the standard procedures set aside someHook,Secondary developers can implement theseHook,Your business logic code inside. 这些Hook所在SAPThe location of the standard procedure in,Call it enhance the point(Enhancement Point). When the standard program execution to theseHook时,System if detectedPartners实现了这些Hook,就调用之,So as to realize the expansion of the business process.

These enhancements way technically don't have much hype,But it reflects the german-made consistent style:Rigorous practical,Low efficient.可以说SAP早期基于ABAPTechnology stack products can succeed in the world,称霸ERP软件领域,These enhancement technique played.

null
从时间线来说,国内很多SAPChinese blog willABAPEnhancement technology is divided into three generations:User Exit,Function Enhancement和Business Addin. Before the two ways are widely used in the earlySAP产品中,Now rarely mentioned.Business Addin(有时简称BAdI),Since birth has beenSAP ABAP On-PremisesThe main force of product enhancement technique,并且在ABAP Cloud产品如SAP Cloud for Customer和S/4HANA CloudCan also be seen in the figure.

Business AddinTechnology is divided into useCL_EXITHANDLERTo strengthen the management and the traditional way to call(Classical BAdI)和使用ABAP关键字GET BADI和CALL BADIDo this in two ways.The difference is that the former is inABAPEnhances the level management and call,While the latter is the realization of the two key words in theABAP Kernel中,Performance is superior to the traditional way.

换言之,在传统BAdIEnhancement in the way,对于SAPReserve increase point in,Runtime what contains the effective enhancement implement logic,是编写在ABAP层的CL_EXITHANDLER里,所有ABAPDeveloper can debug theseABAP代码:

null
而GET BADI和CALL BADI实现在ABAP Kernel层,只有SAPInternal personnel to see these keywordsC语言实现代码.

null
GET BADIKeywords after the execution,满足FilterCondition and status ofActiveEnhancement of the implementation instance isABAP KernelFill the inner tableIMPS里:

null
正因为ABAPNew extensions enhance its powerful,在基于ABAP的CloudProducts have emerged in the figure of it.

在SAP Cloud for Customer里,Secondary developers cannot directly withSAPGUI编写ABAP增强代码,But still canSAP Cloud Application Studio创建增强:

null
Below the drop-down menu display isCustomerQuote这个BOReserved to enhance point:

null
在Studio里用ABAPScript language to enhance implementation,保存激活后,会在ABAP后台自动生成BAdIStrengthen the body and according to theABAPScripting language compiled intoABAP原生代码.

null
到了S/4HANA Cloud,SAPStill don't want to give up to secondary developers to writeABAP BAdI增强实现的功能,Just write tools fromSAPGUI和SAP Cloud Application StudioMigrating to the browser.

客户在S/4HANA Cloud的Fiori Launchpad里,进入Custom Logic这个tile:

null
新建一个Enhancement Implementation:

null
选定Business Context后,Can also be fromEnhancement OptionCan use to enhance point list,Select the appropriate point to create enhanced for:

null
null
同SAP Cloud for Customer编写的ABAP脚本不同,在SAP S/4HANA Cloud Custom Logic里,Are written in the nativeABAP代码:

null
About how to realize the above in the browserABAP语法高亮,请参考Jerry的文章:
ABAP开发环境语法高亮的那些事儿
.

ABAPClass section programming oriented(Aspect Oriented Programming)

相对Java编程人员,ABAPDevelopers may not come into contact with sliced programming oriented at ordinary times(Aspect Oriented Programming,简称AOP)这个概念.

null
For chip programming can be seen as a supplement to object-oriented programming thinking of,广泛应用在基于Spring框架的Java应用中,比如SAP Commerce.

利用AOP,Can the parts that make up the business logic in isolation,To reduce the coupling between the parts,And avoid non-business logic code intrusion into the business logic code.

由于ABAP语言特性和Java的差异,SAPOfficials have never mentionedABAP对AOP的支持,所以JerryThis article directory also USES“类AOP”The words to describe.

在ABAPIf you want to statistics a method in the running time of the,The most commonly used method is the head in a method implementation body open a timer,At the end of the implementation body off timer.伪代码如下:

null
下图是SAP Gateway处理ODataThe request framework code.Before the start of the handle to open the timer:

null
After the request processing off timer:

null
这样的写法,Switch the timer the infrastructure of the nature of the code into theODataThe request processing business code.

In addition to performance statistics,权限检查,日志记录,Transaction processing tasks such as would have been almost any application must be coded non-business logic module code.

借助AOP理念,Can avoid gracefully non-business logic code for business logic code into(Sometimes called pollution).

null
使用AOP编程范式,The writing of the business module only focus on business logic itself,仅此而已.权限检查,日志记录,Performance testing of these infrastructure level concerns,通过不同的AOP实现技术,Under the premise of without changing the business module source code,Like a plane(Aspect)Like weave(Weave)To the business module.

ABAP缺少Java那样对AOP的完善支持,ABAP平台提供的Pre/Post/Overwrite Exit,Can to a certain extent, are similarJava AOP的效果,即某ABAP方法的Pre-Exit增强,Automatically be invoked before the method call;Post-Exit增强,Automatically after the method call is called.Pre和Post-ExitEnhancement of storage and lifecycle management,Are independent of the enhancement method itself.

null
限于文章篇幅,ABAP这种类AOP技术和Java AOP的比较,有机会Jerry单独写一篇文章介绍.

在SAP Business by Design和SAP Cloud for Customer的Cloud Application Studio里,以标准Business ObjectNode as the particle size,For secondary development personnel exposed many enhancements point,For example, in aBONode after modification,保存之前,After loaded from the database to the application,执行某Action之前,Can write custom logic.

null
本来ABAP Pre-Exit和Post-ExitIs the best carrier to realize these custom logic,但是在Jerry工作的2010年的时候,这些ExitCan't achieve multi-tenant isolation(Multi-tenant isolation),即租户A上创建的Exit,Also is visible on all the other tenants,Therefore cannot be used in areas such asSAP Business by Design,SAP Cloud for CustomerThe need to support multi-tenancy isolation featuresSAPCloud products.

null
关于SAP Cloud for Customer ExtensibilityDesign more details,Please refer to my colleaguesXu Boris的文章:
SAP Cloud for Customer Extensibility的设计与实现
.

SAP CommerceExtend mode briefly

SAP CommerceThe service layer is the root is well-connected based onSpring的实现,So can give full play toJava Spring AOPBring high scalability of the.

关于Spring AOP在SAP Commerce中的应用,请参考
SAP帮助文档
.

null
除了Spring AOP之外,SAP CommerceHigh extensibility, also reflected in theExtensionBased on the modular architecture of.

Jerry第一次学习SAP Commerce时,Was itExtensionConfused by the literal meaning of this word.其实在SAP Commerce上下文里,Extension和ABAP里的Extension含义有所不同——The latter refers to the secondary development personnel based onSAPStandard procedures do enhance,而前者是CommerceIn a broader concept:

An extension is an encapsulated piece of software that extends SAP Commerce functionality by either modifying existing features, or introduction new features.

SAP Commerce的业务层,Many standard function of platform and infrastructure layer,均通过ExtensionAs a carrier to realize.一个Extension就是SAP CommerceIn a function modules of the smallest size,From a development point of view is an import toIDE后的Java工程文件夹:

null
null
按照
SAP帮助文档
上的步骤,Secondary developers can create a newExtension,After realized their own custom business logic,Again according to the wizard will merge into theSAP Commerce中去,So as to realize function expansion needs.

null
在SAP Commerce config文件夹下的localextensions.xml, Declare the runtime loading ofExtension列表.由此看出,SAP CommerceNo matter in the standardExtensionOr secondary developers to buildExtension,When loading in the same position,这是我觉得SAP Commerce在Extensibility上不同于ABAPThe interesting thing about product.

null

SAP Fiori UIExtend mode briefly

本文描述的SAP Fiori UI,仅限于基于SAP UI5Framework implementations of the front desk page.采用React,Vue,Angular等技术实现的Fiori UI不在本文讨论范围内,您可以通过JerryThis article for more details:

  • SAP Fiori + Vue = ?
  • Fiori Fundamentals和SAP UI5 Web Components
  • 用React开发SAP Fiori应用

基于SAP UI5框架实现的Fiori UI,From the implementation can be divided into front-end developer manual written againUI,And through the framework such asSAP Fiori Elements自动生成的UI两种.

A typical example of the former isSAP CRM Fiori的标准应用,Jerry之前工作过的SAP成都研究院CRMThe development team has been in charge of this a fewFiori应用的开发和维护:

null
这些FioriStandard applicationXML视图和Controller的JavaScriptCode is our artificial write,我们在XML视图里,预留了PartnersCan insert customUI元素的Extension Point:

null
Secondary developers through shown belowUI5 View Extension,将自定义UI元素插入Fiori UI的SAP标准XMLView reservedExtension Point里:

null
而JavaScript实现的SAP Fiori UIIn the standard controller,We have reserved for secondary development personnel to process logic to enhance the so-calledExtension Hook:如下图第933行所示:

null
上图的Hook在Partners的UIIn the controller implementation code is as follows:

null
I was aSAP CRM Fiori客户项目Dev Angel时,Once suggested project of second development personnel,This way to finish a lot of end-to-end level enhance development,I write some of these cases inSAP社区的
博客系列
里.

无论XML视图里的Extension Point,还是JavaScript控制器里的Extension Hook,Design idea is the same as you sawABAP Business Addin如出一辙.

This idea also continued into based onSAP Fiori Elements自动生成的UI里:

null
关于如何使用Extension Point对SAP Fiori Elements UI进行扩展,请参考
SAP帮助文档
.

展望未来

随着SAP Cloud Platform Extension Factory的问世,More and more customers choose the custom logic implementation based onServerless架构的Lambda Function里,通过Side-by-Side的方式对SAPCloud products extend.而微服务架构下的SAP云产品,How about these based onLambda FunctionImplement customer enhancement for unified management and call,Is a topic that inspiring --,JerryIf you get a chance in the future will continue to introduce.

null
感谢阅读.
原网站

版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/223/202208110956469620.html