Rule Definition
The purpose is to avoid to use the deprecated components as currently good and appropriate new version of the same is available. The deprecated component may be dropped sometime in near future without any intimation.
Using deprecated components could lead to security compliancy issues.
Remediation
Please use sap.ui.model.odata.v2.ODataModel instead.
https://sapui5.hana.ondemand.com/#/api/sap.ui.model.odata.v2.ODataModel
Violation Code Sample
ForBAErr: function(oBindingContext) {
var sUri = "/sap/OMS/odata/sap/YOHLHTCDS0987_TRAN_ERROR_CDS";
var that = this;
var oModel = new sap.ui.model.odata.ODataModel(sUri);
oModel.setUseBatch(false);
oModel.read(oBindingContext + "?$select=msgguid,Error_date", {
success: function(data) {
var msgguid = data.msgguid;
Reference
https://sapui5.hana.ondemand.com/1.32.4/docs/guide/6c47b2b39db9404582994070ec3d57a2.html
Related Technologies
Technical Criterion
Programming Practices - Unexpected Behavior
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.