Skip to Content
Jul 10, 2020 at 12:31 AM

SAP CAP - How to do Join


Hello Everyone,

I am trying to join two tables/entities using NodeJS as a language.

I got below mentioned error

I tried the solution mentioned in the following URLs

It works only when I hardcoded the full table name. But when I try to pass the variable, it is not working

Below is the code which is not working ( Here I am passing variables)

const db = await'db')
const { tableA, tableB} = db.entities('namespace')
 let query = SELECT.from(tableA)
let results = await

Below is the code which is working ( Here I am passing full table name instead of variable)

 let query = SELECT.from('namespace.tableA')
let results = await

Kindly advise




join-error.png (41.0 kB)