OData and SAP Netweaver Gateway. Part VII. Debugging, Trace, Cache Cleanup and F4 Help

Debugging in SAP OData and SAP Netweaver Gateway Services

By this time we are optimistic that all the readers are conversant with the creation of Projects in SEGW, mapping of the Data Models, Navigation, Service creation and Testing URIs. Assuming that you have gone through the previous six tutorials on SAP Netweaver Gateway and OData Services. If you have not, please spare some time aside from your busy schedule and invest it on educating yourself in coming days. We believe, every ABAPer would need to have a good grasp of OData and SAPNetweaver Gateway development concepts.

Once we start working on real projects, our developments would not be as simple as shown in the tutorial exercises. We get weird errors/issues ranging from Authorization to Configuration to Code issues. As an ABAPer, we need to learn how to find the root cause of the issues and mitigate them. Today, let us venture further and understand how we will be handling these services, the issues and changes in actual real project scenarios.

In this article, I will help you understand how any developer will be able to track issues and defects in the OData models. What can be an ABAPer’s best friend when it comes to tracing the issues and fixing defects. You guessed it right. Debugging and Tracing Tools are ABAPer’s life lines. Let me show you how to debug and trace any service in SAP Netweaver Gateway.

1. Debugging OData Services

Let us consider the simple model as below.

OData Tutorial

To get the all Business Partner details the below URI is used.

What is URI?

Now if you want to debug the data just add the syntax ‘&sap-ds-debug=true’ at the end. And you thought you need to put ‘/h’. Right? You can still do that. 🙂 But passing ‘&sap-ds-debug=true’ parameter in the URL is more convenient while debugging services.


Hit Execute button on the top. The below screen appears with additional tabs like Body, Request, Response, Server and Runtime. Check each of the tabs to understand the features. Some of the relevant screenshots are below which are self-explanatory. If you still have questions, please feel free to write to us and we would be happy to elaborate them.

In the ‘Server’ section it will show the path.

ODATA Tutorial and Training

This debug syntax can also be used in the URI directly in the web server. It will help us understand the flow and fix the issues.

Also Read: End to End Implementation of Two Standard Fiori Apps

2. Trace OData Services

Below steps will help us understand how to trace any OData service.

Execute transaction ‘/IWFND/TRACES’.

Select the above 2 boxes and Press return/enter.

trace any ODATA service

Now execute any query, say as below.

fiori tutorials

Go to Trace and hit Refresh.

Now check the ‘Performance Trace’ and ‘Payload Trace’ tabs.

i. Performance Trace

SAP ABAP Tutorials

Double click on the above line. The below screenshot will be displayed.

The above image explains how much time each section in the process is taking.

Click on the 1st line and ‘Trace Details’ button.

It will give the trace details.

SAP Technical

You can check the ‘Source Code’, ‘Payload Trace’, ‘Error Log’ etc.

Now click on the 2nd line of the trace log and check the ‘Trace Details’.

Error Log

ii. Payload Trace

OData issues

Double click on the above line.

sap technical

Click on ‘HTTP Header’ in the above screen.

OData Training

Click on ‘HTTP Body->Original Payload’.

original payload file

Also Read: How to Consume Custom OData Service in SAPUI5 Application with No Custom Javascript

3. Cache Cleanup

Run transaction ‘ /IWFND/CACHE_CLEANUP’.


Execute to Cleanup the Cache.

Cleanup of Model Cache

Sometimes after changing or fixing any code, the changes does not get reflected in the web browser. In such cases, Cache needs to be cleaned/refreshed. Do you remember, we have similar issues in Workflow changes as well? And we need to run one particular t-code to refresh the Workflow modification to take effect. What is the t-code? 🙂

4. F4 Help in OData Services

Sometimes we may need to leverage SAP Search Helps in the Web Server. Meaning, we want to implement the search functionality in our applications that consumes OData Services. We do not need to worry much. This can be easily achieved as shown below.

OData F4Help

In your SEGW Project, Import the Search Help name (just like you import DDIC structure).

OData Training for freeAnd then proceed with the selection of the fields and mapping as per the requirement which is pretty straight forward.

Hope this post would come handy to all ABAPers when they actually start to work on real projects. We all know there can be 101 bugs/issues in our applications. But as long as we know how to use the Trace and Debugging Tools to diagnose it, every bug can be terminated and every issue can be resolved.

Do you have anything to add to this article? Have you faced any issue understanding and working on OData? Do you want to share any real project requirement or solutions? Please do not hold back. Please leave your thoughts in the comment section.

If you GENUINELY like our articles then it would be a HUGE help if you subscribed and liked us on facebook. It might seem insignificant, but it helps more than you might think.

Thank you very much for your time!!

Call for Guest Authors and Contributors to write SAP Articles on our page and get noticed and also receive cool Gifts.

Do you have any tips or tricks to share? Do you want to write some articles at SAPYard? Please REGISTER and start posting and sharing your knowledge to the SAP world and get connected to your readers. Please check our simple guidelines for contributing your articles and receiving the gifts.


Step by Step Tutorials on SAP Netweaver Gateway and OData

Also, Check Step by Step Tutorials on SAPUI5

We have a very active Telegram SAP Technical Group. Please join it using below link.
Telegram SAP Technical Discuss Group.

WhatsApp had the limitation of 256 members per group and we were finding a hard time syncing and maintaining information in multiple WhatsApp group. Therefore we have moved to Telegram as it can accommodate more than 10,000 users. Please join.


    • Dear Forrock – Thank you very much for you positive feedback. So glad that you are planning to share with your Team.

      Thank you. We need your support and recommendations. Please keep visiting.

      Team SAPYard.

    • Dear Srinivas – Thank you for your message. Can you please be more specific. What are you exactly looking for? We would be happy to provide more info.

      Team SAPYard.


Please enter your comment!
Please enter your name here