So, in the sel_opt parameter of table function, we are supposed to pass a dynamic where clause corresponding to the select options. In the corresponding implementation, we use APPLY_FILTER function available in SQL to apply dynamic where clause. ![]() This table function accepts a string as parameter and returns the material number and text. Let us create a table function first, to fetch the list of materials along with its text. We need to push this down to the DB layer. That is, while consuming this CDS from the ABAP layer you can use the range variable. Yes you can, but only in the outer layer right after projecting the data, like we do in ABAP. If we can convert these options into a where clause understood by SQL, we can execute it dynamically in the DB layer. In select options ,we have many choices of passing inputs, like EQ, NE, CP, BETWEEN etc. What can we do ? Only filtering technique SQL can understand is using a where clause. So, thinking to push this select option variable ( range ) directly to DB layer is not possible. ![]() ![]() Its an ABAP ( or OPEN SQL ) feature which SQL script does not understand. We have been seeing many questions in SCN and other forums regarding how to use select options in AMDP, CDS etc. Before reading this short blog, I would suggest you to go through AMDP-Handling select options This quick blog describes how to push down select options feature of ABAP layer to CDS using Table functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |