Hi,
can someone provide me a working example of soure code which creates a push request (Header + body) to an existing SAP NetWeaver Gateway Service? My goal is to read a textfield input and transfer this information to an existing Service.
<Label text="PO number"/><Input id="purchaseOrderInput" type="Text" width="50%" placeholder="Enter a PO number ..."/><Label text="Reason" required="true"/><Input id="reasonInput" type="Text" width="80%" placeholder="Enter a Reason ..."/>
-<c:MatrixLayout id="matrix"> -<c:MatrixLayoutRow> -<c:MatrixLayoutCell hAlign="Right"> <Button text="Close" press="onClose"/> </c:MatrixLayoutCell> -<c:MatrixLayoutCell hAlign="Left"> <Button text="Open" press="onOpen"/> </c:MatrixLayoutCell> </c:MatrixLayoutRow></c:MatrixLayout>
onOpen : function(oEvent) { var purchaseOrder = this.getView().byId("purchaseOrderInput") .getValue(); var reason = this.getView().byId("reasonInput").getValue(); if (purchaseOrder == null || purchaseOrder == '') { var msgClose = 'Please enter a Purchase Order!'; sap.m.MessageToast.show(msgClose, { at : "Center" }); } else { var msgClose = 'ok! open'; sap.m.MessageToast.show(msgClose, { at : "Center" }); } ; },
Many thanks
Best regards
Dominik