on 04-15-2016 7:31 AM
Hi Expert,
I have a requirement where I have to pass table as input to CDS View and query it.
similar to ABAP query like this:
select * from table_name for all entries in input_table where column_name1 = input_table-column_name into table result_table.
here in above query, as we provide input_table as an input based on which , the matching rows are queried.
So in CDS View, is there a similar SQL query where I can pass a table as an input.
Regards,
Khushdeep
Hi Khushdeep,
I am using CDS's for quite some time, I can not really imagine such case that you mentioned. In my opinion instead of using a internal table as input you may try to put the logic which creates the internal table in your CDS using joins etc or If you will call the view via ABAP you can use below alternative in ABAP Select ( Open SQL ) to have for all entries logic.
"Select * from cds_view for all entries in internal table"
Regards,
Gungor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Khushdeep,
in a CDS view the table name cannot be specified in a dynamic way. The only - very ugly and therefore not recommend - option would be the usage of a CDS table function available since NW 7.50 ().
You could pass the table name and do a dynamic select. But the interface of the table functions of course must still have a fix interface.
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.