05-25-2022 3:38 PM
Can pragmas/pseudo comments be added in CDS views to suppress ATC messages?
I'm trying to use //#EC CI_USAGE_OK[2326769] in the script of my custom CDS view to suppress an ATC priority 1 error related to table AFRU but the pragma is not getting rid of the error:
...as select from afru as c //#EC CI_USAGE_OK[2326769]
join aufk as o on c.aufnr = o.aufnr...
05-25-2022 10:59 PM
Hey Christian
Can you try the exact same statement in the line specified by the ATC error as seen below with quote and not //
"#EC CI_USAGE_OK[2326769]
Also specify this in the line number on the ATC code I dont see it in your screenshot and then run again and see if that helps
Regards
Vinita
05-26-2022 9:29 AM
Hi Vinta
Thanks for your reply. I think your suggestion applies to ABAP code but this is a CDS view which uses a different SQL script. Here you use // rather than " for comments. " actually throws an error.
In term of the line number it says '0' which is not an actual line. I've tried line 1 too without success.
01-19-2023 11:21 AM
Bumping this thread as I have a similar question...
We are using S/4 HANA 2022 on-prem, I have a CDS view that contains a join to the table KBED to find the employees assigned to operations on manufacturing orders:
inner join kbed on kbed.bedid = afvc.bedid and kbed.bedzl = afvc.bedzl and kbed.otype = 'P'
The ATC check variant S4HANA_READINESS_2022_NO_FLE is finding a P1 issue with accessing the table KBED (OSS note 2380568 refers). The note mentions ensuring your code has TYPKZ equals 1, 2 or 3; so I've tried updating my join condition to the following but still get the error in ATC:
inner join kbed on kbed.bedid = afvc.bedid and kbed.bedzl = afvc.bedzl and kbed.typkz = '1' and kbed.otype = 'P'
I've also tried putting it in a WHERE condition in the CDS view, but the same error is reported in ATC.
In ABAP code we could suppress the issue by adding the pragma "#EC CI_USAGE_OK[2380568], but I've tried a few different ways of adding the comment to the CDS view itself but still get the error.
This post seems to be the only mention of it, I can't find anything about adding pragmas to DDLS objects in the SAP Help or via the SAP KB. Does anyone have any idea how to resolve please?
02-08-2023 4:03 PM
Pragmas are not supported in CDS source code. You have to use ATC exemptions in this case.