SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Display Database Content and Run SQL Queries

Use Data Preview to display the content of tables and SQL Console to perform ad-hoc SQL queries

Overview

🎓 beginner 15 min. ABAP DevelopmentBeginnerSAP Netweaver

You will learn

  • How to display the content of tables and views using Data Preview
  • How to perform ad hoc SQL queries using SQL Console
Julie Plummer J Julie Plummer March 21, 2023
Created by March 9, 2023
Contributors

Prerequisites

Prerequisites

  • You have a valid instance of an on-premise AS ABAP server, version 7.51 or higher (some ABAP Development Tools may not be available in earlier versions)
  • Tutorial: Create an ABAP Project in ABAP Development Tools (ADT)
  • You have generated the data for the relevant database table by running the transaction SEPM_DG_OIA_NEW (or program RS_EPM_DGC_HANA_NEW ).

Steps

Intro

The tutorial starts from scratch, based on tables of the SAP NetWeaver Demo sample EPM Model. You can find details in the SAP Community The NetWeaver Enterprise Procurement Model – An Introduction, so you can repeat the tutorial on any SAP NetWeaver 7.5 system.


Step 1 Open the Data Preview

In ABAP Development Tools (ADT), open the database table snwd_so_inv_item by choosing Execute ABAP Development Object (or using Alt+F8). This will open the Data Preview which will allow you to explore the invoice items table.

abap development object
abap development object

Step 2 Select a database table
+
Step 3 Data preview
+
Step 4 Select columns
+
Step 5 Add a filter
+
Step 6 Enter filter criteria
+
Step 7 Open the SQL Console
+
Step 8 Initial SQL SELECT statement
+
Step 9 Add a JOIN condition
+
Step 10 Update the WHERE clause
+
Step 11 Add a field to the SELECT list
+
Step 12 Run the query
+
Step 13 Check the query results
+
Step 14 Adjust the SELECT statement
+
Step 15 Adding the company name field
+
Step 16 Add an order by clause
+
Step 17 Run the modified query
+
Step 18 Review updated results
+
Step 19 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 19
1. Open the Data Preview 2. Select a database table 3. Data preview 4. Select columns 5. Add a filter 6. Enter filter criteria 7. Open the SQL Console 8. Initial SQL SELECT statement 9. Add a JOIN condition 10. Update the WHERE clause 11. Add a field to the SELECT list 12. Run the query 13. Check the query results 14. Adjust the SELECT statement 15. Adding the company name field 16. Add an order by clause 17. Run the modified query 18. Review updated results 19. Test yourself

Learn more →