Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3212

OData create XML tag in tag

$
0
0

Hi Experts!

 

I have an XML where is a tag inside a tag. How can I define the values inside "TermAgreement"?

 

My code looks like this so far:

 

var sUrl = "/sap/opu/odata/BAO/LM_ENTIRE_SRV/";

var oDataModel = new sap.ui.model.odata.v2.ODataModel(sUrl, true);

 

 

 

 

var requestBody = {};

            requestBody.LoanContractID = '111111';         

            requestBody.CurrencyCode = 'EUR';              

            requestBody.LoanPurposeCode = 'ML';         

            requestBody.MaturityStartDate = '2016-05-25T00:00:00';

            requestBody.MainBorrowerInternalID = '279';

            requestBody.SimulationIndicator = true;

 

 

 

oDataModel.create("/LoanContractSet", requestBody, null, function(){

        sap.m.MessageToast.show("Contract successfully created!", {});

    },function(){

        sap.m.MessageToast.show("Contract creation failed!", {});

    });

 

 

<m:properties>


<d:TermAgreement m:type="/BAO/LM_ENTIRE_SRV.TermAgreement">

<d:CommittedCapitalAmount>600.00</d:CommittedCapitalAmount>

<d:AnnuityRepaymentAmount>110.00</d:AnnuityRepaymentAmount>

</d:TermAgreement>


<d:LoanContractID>0815MH</d:LoanContractID>

<d:CurrencyCode>EUR</d:CurrencyCode>

<d:LoanPurposeCode>ML</d:LoanPurposeCode>

<d:MaturityStartDate>2016-05-25T00:00:00</d:MaturityStartDate>

<d:MainBorrowerInternalID>279</d:MainBorrowerInternalID>

<d:SimulationIndicator>true</d:SimulationIndicator>


</m:properties>


Thanks for your help!


Viewing all articles
Browse latest Browse all 3212

Trending Articles