on 2020 Jun 16 9:40 AM
I know we can pass Select options from ABAP to CDS using table function and AMDP approach,
But as we know there are advantages of using core CDS and I was wondering that is there any approach where I can pass my select option to CDS view and consume it in CDS view only
Request clarification before answering.
Hello amit316chauhan
Condition generated from Select Options is passed to the DB server and handled on the DB side. Records are not filtered in the application server. Please read the SAP Help documentation when not sure.
I see no reason why the same thing shouldn't happen when querying data from a CDS view.
Kind regards,You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I Aggre that the condition passed is executed at DB layer
SELECT *
FROM z_cds_view
INTO TABLE @DATA(lt_result)
where field1 in s_field1. (Here Where Clause will be executed at DB level)
In Above code Complete z_cds_view will gets executed(lets say it retrieve 1Mil records) without filter first and then its result(1M records) will be filtered again (at DB level) by passing s_field1.
So the performance could have been improved if there would have been a way to pass select option directly at DB level, can you please comment on same?
Kind Regards
The WHERE condition will be applied by DB the way the optimizer can deal with the situation.
It will not pass non-matching records to the application server.
If it will process many records or not depends on a number of factors:
User | Count |
---|---|
80 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.