Skip to main content

Dear everyone,

 

I want to transfer an analysis into a view.

 

In the analysis I use the formula DIstrinct "MD04"."MATNR" to get all distinct Material Numbers as they can show up multiple times in the table columns.

 

I now wanted to do the same in the view, but get the follwing error:

Does anyone know how to solve this?

 

Thank you very much for your time and help!

 

Best Ole

Please find the error message in the pricture below:unnamed


There might be a better solution but I guess this will work:

PU_FIRST ( DOMAIN_TABLE ("MD04"."MATNR"), "MD04"."MATNR" )

 

Keep in mind that depending on what you are displaying next to this attribute might cause showing duplicate values. Also, each attribute is calculated at record level, so keep that in mind when defining it in de KM.


There might be a better solution but I guess this will work:

PU_FIRST ( DOMAIN_TABLE ("MD04"."MATNR"), "MD04"."MATNR" )

 

Keep in mind that depending on what you are displaying next to this attribute might cause showing duplicate values. Also, each attribute is calculated at record level, so keep that in mind when defining it in de KM.

Will adding an ORDER BY help to avoid duplicates?

 

PU_FIRST ( target_table, source_table.column n, filter_expression] ], ORDER BY source_table.column nASC|DESC] ] )

 

 

 


Hi everyone, thank you for your answers. In the end it was much easier. While you cannot add "distinct" in the PQL-Formula Window, you can add it in the yaml editor. There it works without Problems.


Reply