In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is the extension principle of SAP S/4HANA CDS view". 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 is the extension principle of SAP S/4HANA CDS view".
When using the following ABAP code, it does not work:
Data: lt_table TYPE TABLE OF I_Product.
SELECT * INTO TABLE @ lt_table FROM I_Product.
The reason is corresponding extension field does not appear in SQL view of I_PRODUCT at all. Why?
Simply because the extension field is not enabled for I_PRODUCT.
The enablement should also be done in custom field logic tile:
(1) select your extension field.
(2) tab UIs and Reports:
(3) Click "Enable Usage" button:
Never forget to publish your change.
Once done, it works now:
Let me answer the questions we have discussed in the past two days. After Key user clicks enable usage, this is the example shown in the figure below.
Why can we SELECT * FROM I_PRPODUCTWD select the extension field together after that? aren't these extension field done on E_PRODUCT? E_PRODUCT is connected through association and I_PRODUCTWD. Why can select * read the field in association view together?
First of all, the above statement of red is wrong. Extension field is not read from E_PRODUCT through association. We need to make it clear that our starting point for enable usage is a specific extension field, not a CDS view. After selecting a specific extension field, select the CDS view you want to extend, and click publish, which will automatically create an extension view with the current extension field and extend the selected CDS extensible view. As a result, looking at SQL view from SE11 shows that extension field becomes part of extensible view directly through append, and has nothing to do with E_PRODUCT after that.
For example, when is this extension view generated when clicking publish?
You can debug yourself, set a breakpoint in this method, and then click publish, and you will find that when you publish, 10 object will be generated automatically, the third of which is extension view in the image above.
Then how does the framework know that my extension field will generate these 10 things when publish?
The answer is still in registry:
If you want to study the generation implementation of a specific framework, take a look at this class, where each sub class is responsible for a specific repository generation implementation.
CL_CFD_ENH_CDS_ENH_ABSTRACT also contains all the CDS view-related generation logic, which is divided into three different types.
All of this works together to make sure that from application developer's eyes, when you see extension field in design time, it appears in extensible view itself.
Add a little extra.
One of the main purposes of E_PRODUCT is for the use of register, and when creating a custom field point publish, it can automatically generate an extension view of E_Product.
As shown in the following picture. Of course, before this, you need to automatically extend this field of Product table, which is also done automatically when you click publish.
Then when you need to expose the custom field to the upper view, such as I_ProductWD, when you go to the Enable mentioned by Jerry, the extension view of I_ProductWD will be generated.
In fact, if you click on the corresponding field, you will find that it is actually read from the extension view of E_Product above.
Thank you for your reading, the above is the content of "what is the extension principle of SAP S/4HANA CDS view". After the study of this article, I believe you have a deeper understanding of what the extension principle of SAP S/4HANA CDS view is, 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.