Skip to Content

Call REST Services In SAP

Hello Expert,

I have requirement to call REST Web Service in SAP. Can somebody can help how to

call these services in SAP . Please reply ASAP if have worked on that .

Thanks & Regards

Gaurav Sharma

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Oct 27, 2015 at 04:39 PM

    Don't worry whether it is REST or SOAP. Just get the wsdl URL and do the following.

    1. Create consumer proxy for the web service in SE80 or SPROXY (using the wsdl url eg: http://..../xyz?wsdl)

    2. Create a logical port using SOAMANAGER (most of the time Basis does this)

    3. Call the web service method, which was created in the first step, from your ABAP program.

    -Chandra

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2015 at 09:45 PM

    Hello ,

    I tried it with Code and called RESTful service successfully and got data in JSON format .

    Now i want to convert this data in ABAP . Here is output what i got it

    {

    "validationErrors": [],

    "operationMessages": [],

    "DataEntity": {

    "Id": 6,

    "Name": "DEMAND DEPOSIT - WACHOVIA",

    "AccountId": "WACH_001",

    "AccountNumber": "1000001",

    "AccountType": "DDA",

    "IdentityType": "R",

    "SettlementCode": 0,

    "OpenDate": "2009-01-02T00:00:00",

    "CloseDate": null,

    "AccountValid": true,

    "InfoId": null,

    "TypeIndicator": "C",

    "ACHCompanyId": null,

    "RoutingAccount": "N",

    "LedgerId": 2,

    "CashGL": 9,

    "IgnoreCashGL": false,

    "OwnerId": "DEFAULT ",

    "OpeningUserCodeId": -1,

    "CalendarId": 0,

    "CurrencyId": "USD",

    "OriginalCurrencyId": "USD",

    "City": "Charolette",

    "StateProvince": "SC",

    "Country": "US",

    "PostalCode": null,

    "AddressLine1": ".",

    "AddressLine2": null,

    "AddressLine3": null,

    "AddressLine4": null,

    "CustomField1": {

    "Name": null,

    "Value": null,

    "Type": 0

    },

    "CustomField2": {

    "Name": null,

    "Value": null,

    "Type": 0

    },

    "CustomField3": {

    "Name": null,

    "Value": null,

    "Type": 0

    },

    "CustomField4": {

    "Name": null,

    "Value": null,

    "Type": 0

    },

    "CustomField5": {

    "Name": null,

    "Value": null,

    "Type": 0

    },

    "LetterSpecification": null,

    "RoutingNumberSpecification": {

    "Wire": null,

    "AutomatedClearingHouse": null,

    "SWIFTCode": null,

    "InternationalBankAccountNumber": null

    },

    "RecordVersion": 1,

    "Description": null,

    "Status": 1,

    "BankId": 2,

    "BankCode": "WACHOVIA",

    "BankName": "WACHOVIA BANK, NA"

    },

    "Succeeded": true,

    "Data": {}

    }

    Please suggest me how achieve it .

    Thanks

    Gaurav

    Add comment
    10|10000 characters needed characters exceeded