S4/HANA ATC Check: MARC has a CDS view as a proxy object
An ATC check on an ABAP program where I developed on SAP S/4HANA, I got following error: "MARC has a CDS view as a proxy object". When I clicked on the Object Name column link on the ATC results table, I could directly jump into where the problem occurs. This was an DDL SQL View object (a CDS View), where MARC table is used as one of the JOIN table of the CDS view SQL SELECT query.
When I checked the error details, I see that it refers to SAP Note 2206980.
ABAP programmers can check the SNOTE content via SAP transaction SNOTE
According to the referred SAP Note where the new simplified data model of SAP S/4HANA Supply Chain (MM - Inventory Management) is described. MARC table is one of the database tables affected from the simplified data model and called as hybrid table afterwards.
Table: MARC
Table description: Plant Data for Material
DDL Source of CDS View for redirect: NSDM_DDL_MARC
View to read the content of the database table (w/o redirect to compatibility view): NSDM_MIG_MARC
View to read the master data attributes only: V_MARC_MD
If you are reading plant material master data, instead of reading data from MARC table, you can use NSDM_MIG_MARC database view after now.
As seen below, after I replaced the MARC table in CDS view SELECT statement with NSDM_MIG_MARC view, I got rid of the ATC error message.
A better approach might be using the proxy object for MARC SAP database table as mentioned in the ATC check error.
To find the proxy object of an SAP database table follow steps:
Display MARC table using SE11 ABAP transaction.
Using top menu follow Extras > Proxy Object... menu options to display proxy object for MARC transparent table.
Here is the proxy object for MARC
Unfortunately this proxy object cannot be used like a view.
So ABAP programmer cannot display NSDM_E_MARC proxy object using SE11 tcode.
In case, developer searches ABAP Dictionary for proxy object, the message will be "Please use the ADT Tools in Eclipse to display DDL sources"
On the other hand, we can find the CDS view name for the proxy object as follows:
Query DDLDEPENDENCY (DD: Objects in a DDL Source) transparent table for NSDM_E_MARC proxy object as filter criteria for ObjectName column.
Get the DDLNAME, for example NSDM_DDL_MARC in this case
And search DDLDependency table using DDLName filter this time as follows
When you execute the filter criteria, the row column ObjectName gives us the CDS View name where the ObjectType as VIEW
Then you can use SE11 transaction to display NSDM_V_MARC CDS view
And double click on DDL Source NSDM_DDL_MARC to display its source code