title: Passing Odata object to create an entity set
body: <p>I am trying to call a Odata service (crequestSet) which will create an article in MDG system.</p>
  
  <p>I need to pass few parameters from the ui5 input fields and some should be hard coded values.</p>
  
  <p>I have created a request.json file under models folder:</p>
  
  <p>{</p>
  
  <pre><code>"CR_MARA": {
      "Matk": "",
      "Mtart": "HAWA",
      "Attyp": "01",
      "Meins": "EA"
  },
  "CR_MAW1": {
      "Wladg": "0001",
      "Wbkla": "3100" 
  },
  "CR_MARM": {
      "Meinh": "EA",
      "Umrez": "1",
      "Umren": "1"
  },
  "CR_MAKT": {
      "Spras": "EN",
      "Maktg": "Art 101 A",
      "Maktx": "Art 101 A"
  
  },
  "CR_STEU": {
      "Aland": "DE",
      "Tatyp": "TTX1",
      "Taxkm": "0"
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Now i am trying to call the service /createrequest by using the model.
  Create ('EnitityEset',oData {Success:"",Failure:""}) of the odata model in sapui5.</p>
  
  <p>For a simple JSON model like:</p>
  
  <pre><code>{
      "store": "",
      "merchCat": "",
  }
  </code></pre>
  
  <p>i can simple do:</p>
  
  <pre><code>var oData = {
  Store: oLocal.getProperty("/store"),
  MerchCat: oLocal.getProperty("/merchCat")
  
  }
  </code></pre>
  
  <p>and then call the create method:</p>
  
  <pre><code>oModel.create("/crequestSet", oData, {
                  success: this._fnSuccess.bind(this),
                  error: this._fnFailed.bind(this)
              })
  </code></pre>
  
  <p>But how do i pass the complex json object:</p>
  
  <pre><code>{
  
      "CR_MARA": {
          "Matk": "",
          "Mtart": "HAWA",
          "Attyp": "01",
          "Meins": "EA"
      },
      "CR_MAW1": {
          "Wladg": "0001",
          "Wbkla": "3100" 
      },}
  </code></pre>
  
  <p>to the oModel.Create ?</p>
  
  <p>I tried to do <code>var oData = JSONModel.Stringyfy()</code> to convert into a string,but it's not working and giving a error while service call.</p>
  
  <p>The metadata structure of the crequest service:</p>
  
  <pre><code>-&lt;EntityType sap:content-version="1" Name="crequest"&gt;
  
  
  -&lt;Key&gt;
  
  &lt;PropertyRef Name="Matnr"/&gt;
  
  &lt;/Key&gt;
  
  &lt;Property Name="ReasonForRequest" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="60" Nullable="false" Type="Edm.String"/&gt;
  
  &lt;Property Name="Matnr" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="40" Nullable="false" Type="Edm.String" sap:label="Material"/&gt;
  
  &lt;Property Name="CrDescription" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="60" Nullable="false" Type="Edm.String"/&gt;
  
  &lt;Property Name="CrequestType" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="8" Nullable="false" Type="Edm.String"/&gt;
  
  &lt;Property Name="CrequestId" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="12" Nullable="false" Type="Edm.String"/&gt;
  
  &lt;Property Name="Matkl" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="9" Nullable="false" Type="Edm.String"/&gt;
  
  &lt;Property Name="RefMatnr" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="40" Nullable="false" Type="Edm.String" sap:label="Material"/&gt;
  
  &lt;Property Name="Reason" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="2" Nullable="false" Type="Edm.String"/&gt;
  
  &lt;Property Name="Message" sap:filterable="false" sap:sortable="false" sap:updatable="false" sap:creatable="false" sap:unicode="false" MaxLength="220" Nullable="false" Type="Edm.String" sap:label="Message Text"/&gt;
  
  &lt;NavigationProperty Name="CR_ATTACHMASTER" ToRole="ToRole_CR_ATTACHMASTER" FromRole="FromRole_CR_ATTACHMASTER" Relationship="UGIOD02_RFM_SRV.CR_ATTACHMASTER"/&gt;
  
  &lt;NavigationProperty Name="CR_UOM" ToRole="ToRole_CR_UOM" FromRole="FromRole_CR_UOM" Relationship="UGIOD02_RFM_SRV.CR_UOM"/&gt;
  
  &lt;NavigationProperty Name="CR_MARA" ToRole="ToRole_CR_MARA" FromRole="FromRole_CR_MARA" Relationship="UGIOD02_RFM_SRV.CR_MARA"/&gt;
  
  &lt;NavigationProperty Name="CR_MARC" ToRole="ToRole_CR_MARC" FromRole="FromRole_CR_MARC" Relationship="UGIOD02_RFM_SRV.CR_MARC"/&gt;
  
  &lt;NavigationProperty Name="CR_MAKT" ToRole="ToRole_CR_MAKT" FromRole="FromRole_CR_MAKT" Relationship="UGIOD02_RFM_SRV.CR_MAKT"/&gt;
  
  &lt;NavigationProperty Name="CR_MARD" ToRole="ToRole_CR_MARD" FromRole="FromRole_CR_MARD" Relationship="UGIOD02_RFM_SRV.CR_MARD"/&gt;
  
  &lt;NavigationProperty Name="CR_MARM" ToRole="ToRole_CR_MARM" FromRole="FromRole_CR_MARM" Relationship="UGIOD02_RFM_SRV.CR_MARM"/&gt;
  
  &lt;NavigationProperty Name="CR_MVKE" ToRole="ToRole_CR_MVKE" FromRole="FromRole_CR_MVKE" Relationship="UGIOD02_RFM_SRV.CR_MVKE"/&gt;
  
  &lt;NavigationProperty Name="CR_MAW1" ToRole="ToRole_CR_MAW1" FromRole="FromRole_CR_MAW1" Relationship="UGIOD02_RFM_SRV.CR_MAW1"/&gt;
  
  &lt;NavigationProperty Name="CR_STEU" ToRole="ToRole_CR_STEU" FromRole="FromRole_CR_STEU" Relationship="UGIOD02_RFM_SRV.CR_STEU"/&gt;
  
  &lt;NavigationProperty Name="CR_SAUSPW" ToRole="ToRole_CR_SAUSPW" FromRole="FromRole_CR_SAUSPW" Relationship="UGIOD02_RFM_SRV.CR_SAUSPW"/&gt;
  
  &lt;NavigationProperty Name="CR_SVARKY" ToRole="ToRole_CR_SVARKY" FromRole="FromRole_CR_SVARKY" Relationship="UGIOD02_RFM_SRV.CR_SVARKY"/&gt;
  
  &lt;NavigationProperty Name="CR_PURCHINFO" ToRole="ToRole_CR_PURCHINFO" FromRole="FromRole_CR_PURCHINFO" Relationship="UGIOD02_RFM_SRV.CR_PURCHINFO"/&gt;
  
  &lt;NavigationProperty Name="CR_WLK2" ToRole="ToRole_CR_WLK2" FromRole="FromRole_CR_WLK2" Relationship="UGIOD02_RFM_SRV.CR_WLK2"/&gt;
  
  &lt;NavigationProperty Name="CR_BOM" ToRole="ToRole_CR_BOM" FromRole="FromRole_CR_BOM" Relationship="UGIOD02_RFM_SRV.CR_BOM"/&gt;
  
  &lt;NavigationProperty Name="CR_MBEW" ToRole="ToRole_CR_MBEW" FromRole="FromRole_CR_MBEW" Relationship="UGIOD02_RFM_SRV.CR_MBEW"/&gt;
  
  &lt;NavigationProperty Name="CR_CHARACP" ToRole="ToRole_CR_CHARACP" FromRole="FromRole_CR_CHARACP" Relationship="UGIOD02_RFM_SRV.CR_CHARACP"/&gt;
  
  &lt;NavigationProperty Name="CR_MAMT" ToRole="ToRole_CR_MAMT" FromRole="FromRole_CR_MAMT" Relationship="UGIOD02_RFM_SRV.CR_MAMT"/&gt;
  
  &lt;NavigationProperty Name="CR_CLASSGEN" ToRole="ToRole_cr_classgen" FromRole="FromRole_cr_classgen" Relationship="UGIOD02_RFM_SRV.cr_classgen"/&gt;
  
  &lt;NavigationProperty Name="CR_MESSAGE" ToRole="ToRole_Messages" FromRole="FromRole_Messages" Relationship="UGIOD02_RFM_SRV.Messages"/&gt;
  
  &lt;NavigationProperty Name="CR_CLASSASGN" ToRole="ToRole_Classasgen_As" FromRole="FromRole_Classasgen_As" Relationship="UGIOD02_RFM_SRV.Classasgen_As"/&gt;
  
  &lt;NavigationProperty Name="CR_VALUATION" ToRole="ToRole_Valuation_As" FromRole="FromRole_Valuation_As" Relationship="UGIOD02_RFM_SRV.Valuation_As"/&gt;
  
  &lt;NavigationProperty Name="CR_SEASON" ToRole="ToRole_Season_det" FromRole="FromRole_Season_det" Relationship="UGIOD02_RFM_SRV.Season_det"/&gt;
  
  &lt;/EntityType&gt;
  </code></pre>