Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot Use Table BSIK in CTE Query

immanuels
Explorer
0 Likes
3,162

I need to query from table BSIK / BSAK and use it in my CTE Query.

But when I use it, it shows an error "Use the associated entity BSIK_VIEW".

Below is my query just for example (simplified).

  with +inv as
  (
  select bukrs, belnr, gjhar from bsik
  ) 
  select * from +inv into table @data(lt_test).

so what is the difference between BSIK and BSIK_VIEW, and why I cannot use table BSIK in my CTE Query ?

Thanks

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
2,341

See there: Replacement Objects

In comment of https://blogs.sap.com/2016/07/11/appending-tables-in-s4hana-easy-mbew/, Horst says "Using Extras -> Proxy Object in SE11 you can find out whether a CDS view is replacing a database table. If this is the case, Open SQL accesses the CDS view instead of the table itself."

I need to query from table BSIK / BSAK and use it in my CTE Query.

But when I use it, it shows an error "Use the associated entity BSIK_VIEW".

Below is my query just for example (simplified).

  with +inv as
  (
  select bukrs, belnr, gjhar from bsik
  ) 
  select * from +inv into table @data(lt_test).

so what is the difference between BSIK and BSIK_VIEW, and why I cannot use table BSIK in my CTE Query ?

Thanks

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
2,342

See there: Replacement Objects

In comment of https://blogs.sap.com/2016/07/11/appending-tables-in-s4hana-easy-mbew/, Horst says "Using Extras -> Proxy Object in SE11 you can find out whether a CDS view is replacing a database table. If this is the case, Open SQL accesses the CDS view instead of the table itself."