Quantcast
Channel: SCN : Discussion List - SAP Fiori
Viewing all articles
Browse latest Browse all 1804

OdataModel create deep have error: No default virus profile active or found

$
0
0

Dear Friends,

        I create Header and item entityset and make a navigation between them. I also imp the method:  /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY   But when I try to use this code to create Order , it have this error :

No default virus profile active or found. Please check the offical guide.

QQ截图20160506185356.png

 

My controller code:

 

//Create Body

  var requestBody = {};

  requestBody.Customerpo = '123';

  requestBody.Soldto = 'WW';

  

  //Child Body

  var child = [];

  child.push({ Itempos: '123', Product: '234234', Description: 'XCF'});

  child.push({ Itempos: '153', Product: '23334', Description: 'YCF'});

  

  //Add child to request

  requestBody.SalesOrderToItem = child;

  var createOdata = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZFCRM_ORDER_CREATE_SRV/");

  createOdata.create("SaleOrderHeaderSet",requestBody,null,

  function(oEvent){

     alert(msg);

  },function(oEvent){

  alert(msg);

  });

 

 

    But When I create the entity without the navigation, it will work, it will enter the CREATE_ENTITY method withour error, So how do we create the odata with association ?

 

 

  var oEntity1 = {Customerpo: "test"};

  var createOdata1 = new sap.ui.model.odata.ODataModel("/sap/opu/odata/sap/ZFCRM_ORDER_CREATE_SRV/");

  createOdata1.create("SoldtoSet",oEntity1,null,

  function(oEvent){

     alert(msg);

  },function(oEvent){

  alert(msg);

  });

 

 

 

Thanks for your sincerely answer!


Viewing all articles
Browse latest Browse all 1804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>