on ‎2022 Sep 06 10:53 AM
We have a requirement to get TEXT1 for T012T table with SKB1 table.
Select SKB1~BUKRS,SKB1~saknr,SKB1~HBKID,SKB1~HKTID,T012T~text1 from SKB1
LEFT OUTER JOIN T012T On SKB1~BUKRS = T012T~BUKRS AND
SKB1~HBKID = T012T~HBKID AND
SKB1~HKTID = T012T~HKTID
The above code is working fine in SQL Console.
But while below code is being written for CDS View.Its not working i.e. T012T.TEXT1 is not getting populated.
@AbapCatalog.sqlViewName: 'ZBW_C1'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'ZBW_HBD_CDS3'
@Analytics.dataExtraction:{enabled: true}
@Analytics.dataCategory: #DIMENSION
define view ZBW_HBD_CDS3 as select distinct from
skb1
left outer join t012t on skb1.bukrs = t012t.bukrs and
skb1.hbkid = t012t.hbkid and
skb1.hktid = t012t.hktid
{
key skb1.saknr as GL_Account,
skb1.bukrs as CompanyCode,
skb1.hbkid as HouseBank_ID,
skb1.hktid as BankAccount_ID,
t012t.text1 as HouseBank_Text,
}
Request clarification before answering.
Hi Alok,
There might be a compatibility view in your case replacing the old table content with newer content based on a CDS.
check your table via SE11 --> extras --> Replacement object
if there is a replacement object available, try selecting the data from there instead.
Some interesting Facts of Compatibility Views in SAP BW/4HANA and SAP S/4HANA | SAP Blogs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alok,
did you recognize that in your first SQL there is no DISTINCT, whereas in the CDS there is?!
I did not check these tables, this was just obvious.
BR, Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.