

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Connect to dynamic URL within OData in SAP project
You can try and create a URL in your code which you can read from config or XML.
Here is a sample code snippet −
String uri = // Can read from config or anywhere string odQuery = "?$format=json" var req = WebRequest.Create(uri+"/"+ odQuery); req.Method = "GET"; var streamreader = new StreamReader(stream: request.GetResponse().GetResponseStream()); string response = streamreader.ReadToEnd(); //json response
This is a sample code snippet but you can modify it as per your use case.
- Related Questions & Answers
- SAP SuccessFactor OData API access
- How to refer and import SAP-UI-Core.js within my SAPUI5 project
- Binding OData service to SAP UI5 table
- How to connect to an SAP module?
- Using SAP JCO to connect SAP server to JAVA application
- Using SAP Gateway service in SAP Web project
- Connect to SAP system from C# application
- Using JCo to connect SAP with Android
- Creating a table in SAP system using OData service
- Sorting List in SAP UI5 project
- Reading an image using SAP OData v2 in UI5 application
- Information required to connect MS Excel to SAP HANA
- Best way to connect to SAP system from JAVA
- Using SAP BusinessObjects dynamic recipient
- OData or Java Services to be consumed by SAP UI5 application
Advertisements