Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Xiao-fei_Song
Product and Topic Expert
Product and Topic Expert
0 Kudos
493

In the previous blog post, we should already be able to access the OData services of the mobile destination using the combination of SAP Mobile Services Mobile Backend Tools and OData CSDL Modeler:

2024-06-04_10-35-54.png

Now we will show you how to test the OData services by running OData queries using Mobile Backend Tools. 

First click "Run Test Query" toolbar button in the right top corner:

2024-06-04_11-32-42.png

Now you should be able to see the test query page like below:

2024-06-04_11-34-22.png

If you click the "Send" button, you will be able to see the service document of the backend OData services:

2024-06-04_11-36-00.png

Now we can execute some OData query by specifying the OData query URLs, for example "PurchaseOrder?$filter=CreatedByUser eq 'CB9980000026' and PurchasingOrganization eq '1710' and Supplier eq '17300001' and PricingDocument eq '1000000340'"

2024-06-04_11-38-23.png

Let's try some a bit more complex one like "PurchaseOrder?$filter=CreatedByUser eq 'CB9980000026' and PurchasingOrganization eq '1710' and Supplier eq '17300001' and PricingDocument eq '1000000340'&$expand=_PurchaseOrderItem,_PurchaseOrderNote":

2024-06-04_11-39-48.png

And even more complex query like "PurchaseOrder?$filter=CreatedByUser eq 'CB9980000026' and PurchasingOrganization eq '1710' and Supplier eq '17300001' and PricingDocument eq '1000000340'&$expand=_PurchaseOrderItem($expand=_DeliveryAddress,_PurchaseOrderInvoicingPlan,_PurchaseOrderItemNote),_PurchaseOrderNote":

2024-06-04_11-41-10.png

Like you can see, in the above scenarios the SAP Mobile Services Backend Tools will handle the complex authentication for you, and you just need to run your OData queries against the backend system through the mobile services destination inside the Visual Studio Code environment.