This blog will show you how to test the ODATA and RFC for ABAP Program easily and effectively. I have created simple step-by-step guide on SAP backend testing useful for SAP testers.
In the steps below I will discuss on how to perform RFC performance test as simple as possible.
Open a SAP GUI Launchpad and login to access the Q & A (Quality Assurance) server.
Enter a Transaction code SE37 or SE80 (ABAP Development Workbench) in command field to access packages and function modules.
Open your function Group and select a RFC and execute. A RFC detail page will be displayed.
Enter the required inputs in the Import Parameters section.
After entering the inputs to execute the RFC, an output with the respective return message will be displayed. The below sections will provide step-by-step testing methods to understand in-depth details on run-time analysis and performance.
SE30– Transaction code for “Runtime Analysis”.
Entering this TCODE in command field will display Hit List, Hierarchy, Tables accessed during run time, execution time of all statements, FM call and methods.
SQL trace is a performance analysis tool for tracking and analyzing a SAP ABAP program to collect performance statistics related to SQL statement execution. Analyze trace to validate performance.
Now, click on the Activate Trace on the Application Toolbar to activate the trace type or click Deactivate Trace to deactivate the trace type selected. Start or stop trace recording when required.
Trace files are managed by the system and can be saved, like any other object. Display or delete saved files when needed.
The below steps will explain how to start, stop and display trace selected.
You can start the Performance Trace merely a single instance. Decide on the scope and targets of your performance analysis beforehand starting the trace.
Activate a trace from App Toolbar. A status message with “user name and selected trace type Activated” will be displayed in status box.
For performance reasons, stop the traces as soon as you have finished recording.
Deactivate the trace. A status message with “All Traces are Switched Off” will be displayed.
After deactivating the performance trace, open the display filter after selecting “Display Trace” in App toolbar.
Use the display filter (Set Restrictions for Displaying Trace) to restrict the number of logged trace records displayed on the Trace List, detailed list, or time-sorted list.
If you do not enter any selections, all of the trace records are selected.
Default trace type is SQL trace. If you start the display filter directly after the recording, the trace type appears as it was last configured.
Execute the trace type to display the trace records.
Select the Display Trace function with specified value range in the Display Filter.
Complete trace lists will be displayed.
The first line of the list contains a Sub-header with name of the transaction, process identification number, process type, client, and user name.
The next line contains Duration, Execution time of the statement headers. The time is displayed in the format of milliseconds, microseconds.
Practice the above simple steps to do effective RFC Performance Testing.
ODATA is a standardized protocol built on existing HTTP and REST protocols supporting CRUD (Create, Read, Update and Delete) operations for creating and consuming data APIs. Here I will discuss on how to test an ODATA simply.
Install Advanced Rest client chrome extension in browser and enter the basic login credentials (SAP login info).
Paste the ODATA service URL in the respective area and select method “GET” or “POST”. After selection, click Send button to display the Response of the URL.
The output contains Data fetching time, status of the result and ODATA content from the response body.
Use the TCODE – /n/iwfnd/traces – to access the performance details like Average Times (in Milliseconds), data fetching method, requested response, load of ODATA.
RESTclient login credentials and NetWeaver Workbench credentials should be same.
Activate Performance Trace and Payload Trace in the Configuration Tab and click Save Configuration. Run the ODATA in RESTclient. After completing execution, click Performance Trace Tab in the NetWeaver Workbench.
To view complete details on a specific ODATA, click on the respective ODATA URL.
Click on the Payload Trace Tab to track the flow of data sent based on requests and responses.
After configuring and activating Payload Trace, a table displaying service call info, the method used, transaction ID, date and time of service execution with expiry date of trace, status of service call will be displayed.
The steps provided above will be convenient in SAP RFC and ODATA performance testing for ABAP programs.
Find a right partner to transform your mobility space to a safe and productive one. Need assistance? write to us!