Skip to Content
Author's profile photo Daniel Schindler

Distinct Value Analysis for se16 Table Columns


In the past I had to analyse PSA tables and, to be more specific, I had to find out the distinct values for a table column in order to know which specific values have been extracted from the source system. This requirement cannot be solved with the se16 transaction directly. As a turnaround I exported the table data to Excel and then I used the option “Remove duplicates”. This worked in the beginning, but with larges PSA tables that turnaround wasn’t practicable anymore.

For SAP BW InfoProviders this requirement can be handled with the transaction LISTCUBE, but from my point of view it is too complicated and time consuming.

So I developed a solution for this requirement in SAPGUI which was inspired by the “Distinct values” option in SAP HANA Studio.


User-friendly tool to analyse the distinct values of a se16 table column & of any SAP BW InfoProvider.

Solution & Features

The attached report ZDS_DISTINCT_VALUES has two parameters to pass the specific table and column name. The parameter values will be checked and analysed. If the table parameter is a SAP BW InfoProvider the function “RSDRI_INFOPROV_READ” will be used to extract the data. Otherwise a generic ABAP SQL call is executed to get the distinct values. If the column parameter is empty or cannot be found for this table / InfoProvider, the list of possible column values for this table is returned.

The output returns a table with the distinct values and the number of occurrence. If it is possible to get text values (InfoObject master data or domains), these text values will also be returned. For SAP BW master data the function “RSDDG_X_BI_MD_GET” is used and for domains “DDIF_DOMA_GET”.





Feel free to use and extend the tool. Contact me for any questions, etc. Attention: MultiProviders are not supported.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Francisco Milán Campos
      Francisco Milán Campos

      Hi Daniel,

      Could you please share the code of the report ZDS_DISTINCT_VALUES? I'd like to give it a try but unfortunately it's not available in this blog (probably since the community platform change).

      Thanks a lot,


      Author's profile photo Daniel Schindler
      Daniel Schindler
      Blog Post Author

      Hi Francisco,

      sorry for the late reply... You can find the coding here:

      Author's profile photo Francisco Milán Campos
      Francisco Milán Campos

      Thanks a lot Daniel, I really appreciate it.

      Best regards,