Topic of week 4: OData. OData was the topic for week 4. As you can guess, my motivation wasn’t the best. It’s not like OData is bad, but besides Microsoft and SAP there is not much. Just take a look at JEE (like JSR 353 , JSR 311 & JSR 339) to see that you’ll have some trouble when you want to use OData in a JEE server. The OOXML standard equivalent for data exchange of an SAP system.
This week was more theoretical. With week 1 being hands-on, week 2 theory, week 3 hands-on, and week 4 theory, I think I start seeing a pattern here. The unit covered OData basics as well as creating your own OData service, implement and use it in a native Android app. Nice walkthrough and showed that you get from SAP all you need to design (GWPA Eclipse), implement (SEGW, SAP Gateway system) use (app, again GWPA) your app.
The final part included some light weighted hands-on as after designing the OData service it needs to be implemented. That is done using a ABAP system where the transaction SEGW is available. While there is an AWS version available (for those who can), the Gateway SP6 system that you can download from SCN comes with SEGW too.
Importing the model and coding the implementation works fine, if only there would be a GW_HUB entry under Service Maintenance:
Well, that happens when you run a fresh installed Gateway system. Nothing documentation cannot solve:
- SAP Help: Connection Settings to SAP NetWeaver Gateway
- SAP Help: Service Maintenance
- SCN: Quick Starter Configuration Guide – SAP NetWeaver GatewayQuick Starter Configuration Guide – SAP NetWeaver Gateway
Let’s use the SCN document:
Step 2: Create a SAP System Alias
Step 3: Create a Gateway Alias
Testing the service:
Problem: I have no data in my backend.
Going from there to the native app part is easy. Without having data in my backend, this won’t make sense, but ES1 comes with the sample flight data, and the native app provided uses this system too:
- File: OPENSAP_ANDROID_UIMOD\res\raw\ zgwsample_srvservice.properties
- Property: base_url = https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/
Other blogs in this series from me about the open SAP course: Introduction to Mobile Solution Development
- Survived week 1: Introduction to Mobile Solution Development
- Still alive after week 2: Enterprise Mobility Enablement Services
- Any given Tuesday – week 3: Introduction to Mobile Solution Development
- Do apps dream of electric sheep? Week 4
- Remember, all I’m offering is the truth – nothing more – week 5
- Open the pod bay doors, SMP – week 6