cancel
Showing results for 
Search instead for 
Did you mean: 

Combining Analytic views in a Calculation view

jitendra_it
Active Contributor
0 Kudos

Hello Folks,

We have created some Attribute/Analytic views and joining them in a final Calculation view. I am facing problem when combining them using join.

Here is scenario :

1. AT_MARA  : Attribute view with all the master data fields of material from MARA/MARC/MARD

2. AN_MSEG : Analytic view with Inner join of AT_MARA and MSEG table and sum of quantities based on material/plant combination.

3. AN_MBEW : Analytic view with inner join of AT_MARA and MBEW table and sum of amount based on material

4. CA_FINAL : Combine all the three view above. I have created two joins ( AT_MARA Leftouter AN_MSEG) and (AT_MARA Leftouter AN_MBEW).

                  

I am facing problem in Union of above two joins. I have used Automap option but it is giving me multiple columns of same data.

Could you please suggest what is best way to combine the results.

Accepted Solutions (0)

Answers (1)

Answers (1)

nikhil_joy2
Active Contributor
0 Kudos

Hello jitendra,

I am not sure if I understood it correctly. but your attribute view is already included in analytical views. Are you again using the same in your calculation view and create extra joins inside calculation view? You can get the desired result by combining two analytical views right?

Please provide a screenshot of your calculation view if you can.

Regards,

Nikhil Joy

jitendra_it
Active Contributor
0 Kudos

Hello Nikhil,

Attribute view is included in Analytic views so that it performs aggregation for only AT_MARA data(Inner Join) in both cases not on all the data of MSEG/MBEW.

Second time again i am using the same AT_MARA view to get the records(its like Read table)

using Left outer join.

Here my AT_MARA will work as main table then reading corresponding entries using Read table(Left outer Join)

Former Member
0 Kudos

Hi,

I do not understand the following statement.

"Attribute view is included in Analytic views so that it performs aggregation for only AT_MARA data(Inner Join) in both cases not on all the data of MSEG/MBEW."


In SAP ERP, you cannot delete material from MARA table if there are transactions (MSEG/MBEW). Hence, for every record in MSEG or MBEW there should be a MARA record.  Even if I assume that there is some remote chance of this happening, you can use left outer join connection MSEG and MBEW to AT_MARA in the analytic view (just like you intend to do in the calculation view). This way, all records of MSEG and MBEW are aggregated, irrespective of corresponding material master data in MARA.  As a side note, it is not advisable to use attribute views in the joins of calculation views. The filter may not push down and can cause performance issues.


Hope I understood your issue correctly.


Ramana

jitendra_it
Active Contributor
0 Kudos

Hello Ramana,


Hence, for every record in MSEG or MBEW there should be a MARA record.  Even if I assume that there is some remote chance of this happening, you can use left outer join connection MSEG and MBEW to AT_MARA in the analytic view (just like you intend to do in the calculation view). This way, all records of MSEG and MBEW are aggregated, irrespective of corresponding material master data in MARA.  As a side note, it is not advisable to use attribute views in the joins of calculation views. The filter may not push down and can cause performance issues.


Hope I understood your issue correctly.


Ramana

Yes that is correct but I want sum of quantity only for those which satisfies AT_MARA view records.

say in MARD(AT_MARA) ,I have a filter which can lead to filter out that material.


This way, all records of MSEG and MBEW are aggregated, irrespective of corresponding material master data in MARA. 

In this case the materials for which there is no entry in MSEG OR MBEW will be left.

thats why i am using again AT_MARA to display all the materials whether they have entry in MSEG or not(Zero quantity).