Skip to Content

Introduction

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.

Requirement

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”.


Screen01.PNG

Screen02.PNG

Screen03.PNG

Conclusion

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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. 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,

    Francisco.

    (0) 

Leave a Reply