In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to achieve SAP S/4HANA system CDS view extension principle analysis, the content of the article is of high quality, so the editor will share it for you to do a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
After creating the extension field, I want to retrieve its data from the interface view, just like the I _ product. That is, the extension field is already in MARA, and I want to use it through the I _ product instead of MARA.
It does not work when using the following ABAP code:
```ABAP
Data: lt_ table type table for I _ product.
Select * INTO TABLE@lt_TABLE from the I _ product.
`
The reason is
There are no corresponding extension fields in the SQL view of my _ product. Why?
It is only because the extension field is not enabled for the I_ product.
It should also be enabled in custom field logical tiles:
(1)。 Select your extension field.
(2)。 Tab UI and reports:
(3)。 Click the enable use button:
Never forget to post your changes.
Once it is done, it will now work:
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.
To sum up, the association of E_PRODUCT defined in I_ProductWD is more used for design time (register), and then know how to create extension view in enable. Then when you have extension view, it has nothing to do with E_Product, because the content in extension view:ZZ1_PRE47GXHDI6P2ZLO3ADGY4HHFE is automatically exposed as hosting view:I_PRODUCTWD 's interface. That's why select * comes out automatically and doesn't need to go through association.
On how to achieve SAP S/4HANA system CDS view extension principle analysis is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.