Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the parasitic programming languages in ABAP Netweaver

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what are the parasitic programming languages in ABAP Netweaver". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what parasitic programming languages are in ABAP Netweaver.

JavaScript

There is such a package hidden in Netweaver: SJAVASCRIPT, you can tell what it is going to do just by looking at the name.

The JavaScript + kernel of Netweaver implements a miniature JavaScript engine whose interface is exposed through the ABAP class CL_JAVA_SCRIPT, which allows ABAP developers to write and execute the JavaScript language in Netweaver.

This class was created in February 2000, when Jerry was still in high school.

If you want to use the JavaScript engine in Netweaver to practice the new features defined in the ECMAScript specification, such as Class keywords, asynchronous operations, and Async functions, then Jerry thinks you should be thinking too much, because this class has been clearly marked as obsolete, so SAP is not recommended to be used in production code at your own risk.

Of course, there is no problem to execute the report SJSEU in the package and paste some textbook JavaScript code into it. For example, the following integer factorial code is implemented recursively with JavaScript

It can run normally in ABAP Netweaver:

From Jerry's point of view, there are no scenarios where JavaScript must be executed in ABAP Netweaver. If you have JavaScript-based applications that need to be integrated with ABAP applications in Netweaver, SAP recommends deploying these JavaScript applications on SAP Cloud Platform.

Ruby

Add rubies of different qualities to helmets, armor, weapons and shields to gain a bonus to the various attributes defined in the table below.

Developers of SAP Cloud for Customer must have written Ruby code in UI designer:

With this curiosity, I opened the UI view containing this Ruby code and found that when I saved the activation after writing the Ruby code, the Netweaver background would automatically convert the Ruby code into the corresponding JavaScript code, and the browser would of course execute the latter, that is, the converted JavaScript code.

In other words, there is a miniature Ruby parser in SAP Cloud for Customer's Netweaver system.

Because the C4C background is not developed for customers and Partners, I can't post the name and code of the ABAP implementation class for this Ruby parser like CL_JAVA_SCRIPT, but the principle is the same as CL_JAVA_SCRIPT, which uses the ABAP keyword SYSTEM-CALL to call the Ruby interface of the ABAP kernel.

ABSL-ABAP Script Language

ABSL in Netweaver is different from the two simplified language engines JavaScript and Ruby introduced earlier-ABSL is a DSL-Domain Specific Language (domain specific language).

Wikipedia defines a domain-specific language as "a computer language specially designed to solve a certain type of task", while Martin Fowler believes that

DSL gains efficiency in a certain field by making compromises in its expressive ability.

ABSL is a domain-specific language designed by SAP to ensure that C4C partners can efficiently and securely develop custom logic on the multi-tenant cloud.

After we write the ABSL in Cloud Application Studio and save the activation, the ABAP Netweaver background will automatically generate the corresponding ABAP code. Like JavaScript and Ruby introduced earlier, in the ABAP Netweaver background of C4C, there is a language parser and compiler for ABSL to complete the generation of ABAP code corresponding to ABS.

The runtime of C4C executes the ABAP code generated after the conversion.

When Jerry was still working in the SAP BYD department in 2011, he was also involved in the development of the corresponding ABAP code based on ABSL. At that time, my team was responsible for transforming the Application Exit ABSL code written in Cloud Application Studio into the BAdI model in ABAP Netweaver and the corresponding ABAP code.

Last but not least, let's talk about CumberCandle. Humans are the host of aliens, while CumberCure + is the host of ABAP. This point has been made clear in Jerry's previous articles about C and ABAP.

We can find out the relevant information about ABAP kernel according to the keyword "Kernel" in the ABAP help document called by F1:

On the Netweaver server inside SAP, we can view the source code of these Cpicurus codes, but I just can't post them:

Thank you for your reading, the above is the content of "what are the parasitic programming languages in ABAP Netweaver". After the study of this article, I believe you have a deeper understanding of what parasitic programming languages in ABAP Netweaver have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report