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 is the meaning of EXT and STRUCT in SAP CRM

2025-02-24 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 "what is the meaning of EXT and STRUCT in SAP CRM". 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!

After entering the BSP_WD_CPMWB transaction code in the CRM system, open any context node (Context Node) to see the information:

What is the meaning of STRUCT?

In the previous Jerry article, Jerry's WebClient UI collection of 42 original articles mentions such a picture:

In the MVC design of CRM BSP component in the UI layer, Model, or Context node, is bound to the Business Object Layer model, so the field under the Context node Attributes folder that begins with STRUCT means that the field is bound to a field in the BOL model node, and there is an one-to-one correspondence between the two, as shown in the following figure arrow. The blue field LOCKED in the following figure does not have a STRUCT prefix, indicating that this field does not come from the BOL model node, but is created directly by the developer. This field is generally used to store temporary status in application logic, or to represent a flag bit of the current application. There is no corresponding underlying storage. In many SAP products, this field is also called transient field or calculated field.

Expand a field and what does it mean to see GET, GET_M, GET_I, GET_V, GET_P, GET_A?

To answer this question, start with the way CRM WebClient UI pages are rendered.

As shown in the above view source code, the tabs used are not native tags supported by HTML, and browsers cannot recognize and parse them, so there needs to be an intermediate layer, or converter, to convert these SAP encapsulated tags into native HTML tags supported by browsers.

According to the location of the converter, it can be divided into server-side rendering and browser-side rendering. SAP CRM WebClient UI is based on SAP BSP technology-Business Server Page, and you can tell by its name that it is rendered on the server side. SAP UI5 is a typical browser-side rendering, and the tags we write in its XML view cannot be directly used by the browser. You need the renderer corresponding to each tag to generate the corresponding native HTML tags with JavaScript code on the browser side.

Back to CRM WebClient UI, for these STRUCT fields in Attributes, we render the final page, there are plenty of general input fields, some hyperlinks, some drop-down boxes, some non-editable, how does the converter developed by SAP know how to render each field?

The secret lies in these GET methods. Here is a small design pattern of ideas, that is, the SAP CRM WebClient UI framework code, responsible for 80% of the server-side rendering workload, that is, the entire page frame, including how many fields a page, the relative position between fields, and so on. The remaining 20% of the workload, such as the type and appearance of each field, cannot and should not be known by the information framework, which should be provided by the application (which can also be understood as a callback), implement these properties in the interface, and then call these interfaces by the framework. We can think of this pattern as a kind of design pattern-template pattern (Template Design Pattern).

Look at the specific examples.

Double-click to enter the GET_P method in the CONFIG field. P means Property, attribute. When rendering the CONFIG field, the UI framework calls the GET_P_CONFIG interface and asks the application: what type do you want to render the CONFIG field to (fieldtype in line 4 below)?

The application goes through the field_type_checkbox answer frame in line 5: I want to render the CONFIG field as checkbox, please.

Once the UI framework gets this information, it can do the corresponding rendering work.

If you want to study the details of how UI renders after getting this field type, make a breakpoint in the GET_P method, then open a page and step into debugging the record:

GET_I: if the application logic needs to dynamically determine whether the field is editable according to certain conditions, write the logic in this interface.

Pure GET_P method: there are many secrets, especially this CONVERT_TO_STRING method, which renders the corresponding fields in the underlying database table into strings that are ultimately user-friendly and easy to read according to the field types in the BOL model. For example, if a timestamp without any time zone is stored in the underlying database table, this method will be automatically converted to the local time of that time zone according to the time zone set by the user.

GET_V: if you want to implement a custom F4 Value Help, do it here.

GET_A: if a field is enabled or not, it depends on whether a Business Switch is turned on or off, which is implemented here. View and manipulate Business Switch and Function in the series transaction codes at the beginning of SFW.

The fields that begin with EXT represent enhanced fields created through the CRM enhancement tool Application Extension Tool (AET).

This is the end of the introduction of "what is the meaning of EXT and STRUCT in SAP CRM". Thank you for your 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