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

How the comments in SAP ABAP are parsed in the background

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how the comments in SAP ABAP are parsed in the background". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

We write SAP CDS view in ABAP Development Tool to maintain these @ annotations for views, which, like annotation, which is widely used in Java Spring, is a way to maintain metadata for development object.

As shown in the figure above, I have maintained five different annotations, and once saved, the cds view source code is sent to the ABAP background and parsed by CL_DD_DDL_HANDLER, DDL here is the abbreviation for Data Definition Language.

The ANNOTATIONS field of this class contains an inner table M_ENTRIES, which represents five parsed annotations.

All the annotation supported by cds view are in the constant defined by the ABAP API:

If_dd_ddl_annotations

For example, the if_dd_ddl_annotations= > AbapCatalog_sqlViewName in the following figure represents the note I declared in the CDS view source code: @ AbapCatalog.sqlViewName: 'znaming'

How does ABAP CDS view, which is edited by text in ABAP Development Tool, be parsed by ABAP backend? The parse_cds is parsed through line 163 of this CL_DD_DDL_HANDLER~GET_OBJDEF_FROM_SRC method.

This method is implemented on the Kernel side and can efficiently parse the CDS view source code in text format into ABAP structure:

As shown in the following figure:

This is the end of the content of "how the comments in SAP ABAP are parsed in the background". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Servers

Wechat

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

12
Report