Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call REST Services In SAP

former_member207009
Participant
0 Kudos

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

5 REPLIES 5

former_member226239
Contributor
0 Kudos

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

0 Kudos

Hello,

I tried to create proxy for URL but I am getting error show in below screen.

Please help me to resolve this .

Thanks

Gaurav Sharma

0 Kudos

Looks little hard to figure out the issue based on the screen shot, may be issue with the web service it self.

Can you let me know the steps that you followed?

former_member207009
Participant
0 Kudos

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

0 Kudos

Did you use webservice or via RFC?