Query MDG tables via SAP Studio

An answer to your question is a big "YES". You can execute queries against the MDG (Master Data Governance) tables either if you are using an ABAP program or also you can execute these queries from native SQL environment.

Querying MDG Tables with ABAP

You can use standard ABAP SELECT statements to query MDG tables just like any other SAP table. The following example demonstrates how to retrieve data from the KNA1 table (Customer Master) ?

DATA: lt_TBL LIKE TABLE OF KNA1.
SELECT * FROM KNA1 INTO TABLE lt_TBL UP TO 5 ROWS.

The snippet above lets you get the 5 rows from KNA1 table and store in an internal table for further use. The UP TO 5 ROWS clause limits the result set to improve performance when you only need a sample of data.

Alternative Query Methods

You can also use more specific SELECT statements to retrieve only the fields you need ?

DATA: BEGIN OF ls_customer,
        kunnr TYPE kna1-kunnr,
        name1 TYPE kna1-name1,
        land1 TYPE kna1-land1,
      END OF ls_customer,
      lt_customers LIKE TABLE OF ls_customer.

SELECT kunnr, name1, land1
  FROM KNA1
  INTO TABLE lt_customers
  UP TO 10 ROWS.

This approach is more efficient as it only retrieves the specific fields required rather than all columns using the asterisk (*) wildcard.

Conclusion

Querying MDG tables via SAP Studio is straightforward using standard ABAP SELECT statements, allowing you to retrieve and manipulate master data efficiently for your business requirements.

Updated on: 2026-03-13T18:54:40+05:30

445 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements