on ‎2023 Jun 14 8:20 AM
I have select queries on mulitple Business Partner related tables, what difference would it make if I select from I_BUSINESSPARTNER instead of BUT000?
Do we have any performance gains or is it just a good practice to do so?
Request clarification before answering.
I_BUSINESSPARTNER is a released CDS view (Release Contract C0) in the steampunk technology stack. Selecting from I_BUSINESSPARTNER instead of BUT000 may offer some performance gains depending on the specific scenario and usage. Here are a few factors to consider:
However, it's essential to note that the performance gains can vary based on the specific use case, database configuration, data volume, and the way the CDS view is implemented. It's recommended to perform performance tests and benchmarks to evaluate the actual impact of using I_BUSINESSPARTNER versus directly querying the BUT000 table in your particular scenario.
In general, using a well-designed and optimized CDS view like I_BUSINESSPARTNER can be considered a good practice as it promotes encapsulation, abstraction, and separation of concerns. It also aligns with the concept of modularization and reusability in software development.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sh4il3sh lot of "might be" but you can trust knowledgeable people, things are always complex under the hood, you will understand after you gain more experience 😉
Hi Shailesh,
As per my understanding, difference is in terms of recommended way. When you plan to upgrade, you would see issues if you are firing selects on database tables. You would be all secured during upgrades if you are using released CDS views. Moreover, you have a choice only in classic ABAP. In Embedded Steampunk or Steampunk, you won't have a choice and must use only released CDS views.
Thanks,
Aman Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The benefit is that you can access all associations included in the CDS view.
Those associations are only built if you really use them in your ABAP, FIORI etc.
REPORT ztest.
PARAMETERS:
p_bupa TYPE bu_partner.
SELECT SINGLE
businesspartner,
\_currentdefaultaddress-addressid
FROM i_businesspartner
WHERE businesspartner = @p_bupa
INTO @DATA(s_bp).
WRITE s_bp-addressid.In terms of performance CDS view are not better than selecting from DB tables.
Both CDS views and standard SQL statements generate the same SELECT statements on DB-level in the end.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 33 | |
| 18 | |
| 15 | |
| 14 | |
| 9 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.