- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 Articles
- SAP SuccessFactor OData API access
- Binding OData service to SAP UI5 table
- How to refer and import SAP-UI-Core.js within my SAPUI5 project
- Creating a table in SAP system using OData service
- Using SAP JCO to connect SAP server to JAVA application
- How to connect to an SAP module?
- Error while passing an image value to an OData request in SAP
- Connect to SAP system from C# application
- Using JCo to connect SAP with Android
- Reading an image using SAP OData v2 in UI5 application
- OData or Java Services to be consumed by SAP UI5 application
- Best way to connect to SAP system from JAVA
- Information required to connect MS Excel to SAP HANA
- Using SAP BusinessObjects dynamic recipient
- Looping through a dynamic table in SAP

Advertisements