cancel
Showing results for 
Search instead for 
Did you mean: 

How to consume ABAP web service by HTML or SOAP

Former Member
0 Kudos

Hi Experts,

I have created a web service(http://***************sap/bc/srt/rfc/sap/ZVK_CUSTOMER_DETAIL_WSD?sap-client=800&wsdl=1.1) and i want to consume it from my front end like HTML,JavaScript or SOAP.

Please suggest, a easy way to consume it.

Best Regards,

Rohit

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

try like this example


<!DOCTYPE HTML>

<html>

  <head>

  <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>

  <script src="resources/sap-ui-core.js"

  id="sap-ui-bootstrap"

  data-sap-ui-libs="sap.ui.commons, sap.ui.table"

  data-sap-ui-theme="sap_bluecrystal">

  </script>

  <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->

  <script>

   var oModel = new sap.ui.model.odata.ODataModel("http://services.odata.org/Northwind/Northwind.svc/", false, "username","password");

 

   //---- CUSTOMER TABLE

   var customerTable = new sap.ui.table.Table({

    title: "Customers",

    visibleRowCount: 7,

    selectionMode: sap.ui.table.SelectionMode.Single

   });

  //---- CUSTOMER TABLE COLUMNS

   var customerTableColumns = [

                   {text: "Customer ID", property: "CustomerID"},

                   {text: "Company Name", property: "CompanyName"},

                   {text: "Contact Name", property: "ContactName"}

                   ];

   customerTableColumns.forEach(function(column){

       customerTable.addColumn(new sap.ui.table.Column({

          label: new sap.ui.commons.Label({text: column.text}),

          template: new sap.ui.commons.TextView().bindProperty("text", column.property),

          sortProperty: column.property,

          filterProperty: column.property,

          width: "75px",

          hAlign: "Center"

         }));  

   });

   //---- ORDER TABLE

   var orderTable = new sap.ui.table.Table({

    title: "Orders",

    visibleRowCount: 5,

    selectionMode: sap.ui.table.SelectionMode.None

   });

       //Create a model and bind the table rows to this model

   customerTable.setModel(oModel);

   customerTable.bindRows("/Customers"); // Fill customer table with customer records

   

   

  customerTable.placeAt("content");

  </script>

  </head>

  <body class="sapUiBody" role="application">

  <div id="content"></div>

  </body>

</html>