I've managed to write my own UI5 app based on the "Building SAP Fiori-like UIs with SAPUI5", and I want the Approve function to work now.
I have the following JSON data detail:
{ "BusinessPartnerList": [ { "BPId": "0100000000", "Role": "01", "EmailAddress": "do.not.reply@sap.com", "PhoneNumber": "6789", "WebAddress": "http://www.sap.com", "CompanyName": "SAP", "LegalForm": "AG", "Country": "DE", "City": "Walldorf", "PostalCode": "69190", "Street": "Dietmar-Hopp-Allee", "Building": "15", "SalesOrders" : [ { "SalesOrderID": "0500000009", "Netto Amount": "3338.00", "Time Stamp": "2014.04.28. 9:00:00", "Gross Amount": "3972.22", "Status": "N", "CurrencyCode": "EUR", "Items": [ { "Position": "0000000010", "QuantityUnit" : "EA", "Tax": "181.64", "ProductName": "First Item Name", "ProductID": "HT-1000", "Quantity": "1", "DeliveryDate": "2014-05-05T07:00:00.0000000", "CurrencyCode": "EUR" }, { "Position": "0000000020", "QuantityUnit" : "EA", "Tax": "596.60", "ProductName": "Second Item Name", "ProductID": "HT-1002", "Quantity": "2", "DeliveryDate": "2014-05-05T07:00:00.0000000", "CurrencyCode": "USD" } ] }, { "SalesOrderID": "0500000030", "Netto Amount": "22337.00", "Time Stamp": "2014.04.28. 9:00:00", "Gross Amount": "26581.03", "Status": "P", "CurrencyCode": "EUR" }, { "SalesOrderID": "0500000039", "Netto Amount": "3338.00", "Time Stamp": "2014.04.28. 9:00:00", "Gross Amount": "3972.22", "CurrencyCode": "EUR", "Status": "N" } ] }, {
I can list the SalesOrders for the specific partner, and than list the items of the specific SalesOrder.
Now I'd like to Approve the order, and change it's status from "n" to "P" in the JSON file as well.
But I have no idea how to do it in the SalesOrderItem.controller.
I hope someone can help me