on 2024 Dec 05 5:30 AM
Hello Experts,
Is it possible to get the count of entries from multiple tables (with no linkage) into a single CDS view.
Actually we are trying to use this CDS for reconciliation purposes and send this information to non SAP data lake to compare the count of records.
Thank You.
Vinod
Request clarification before answering.
Thank yo all for the reply.
As mentioned tried to resolved the issue with Union All, and it worked.
As mentioned by @Sandra_Rossi the output looks exactly same. I have added more tables now to get the count of records against table as an output.
Code :
<General anntaions>
@EndUserText.label: 'Count Recon Test'
define view ZTEST_COUNT_VB1 as
select from mara as a {
'MARA' as TableName,
count(*) as RecordCount
}
union all select from makt as b {
'MAKT' as TableName,
count(*) as RecordCount
}
union all select from kna1 as c {
'KNA1' as TableName,
count(*) as RecordCount
}
union all select from cdpos as d {
'CDPOS' as TableName,
count(*) as RecordCount
}
One can go on adding tables along with Union All statement.
Thank You
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.