cancel
Showing results for 
Search instead for 
Did you mean: 

Using objects from 2 different context

Former Member
0 Kudos

Hi All,

If I use objects from 2 different contexts , then I will get 2 queries for 2 context, now what's the next step? How webi will show the values on report?

I guess webi will merge the results and will display the result. Is this correct? And what is the solution if I dont want two queries? how to resolve this?

Thanks,

Shweta.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

If you have two objects in two different contexts, you need to understand what you're bring back. There are several things to consider. There are obvious things like common dimensions that you would merge on. For example in a retail stores model, you'd have Branch Name that is common to both contexts, Sales Value and Sales Date from the sales context and Monthly Salary Costs and Year Month from the Monthly Salaries context. This allows you to see total salaries for the branch for a year/month and sales for the branch for a given day. Sales Date and Year Month are both dimensions and relevant only to their contexts. You couldn't mix Sales Date and Monthly Salary Costs as it simply wouldn't make sense.
However, you could create a section on Branch Name and show two blocks in there; one for monthly salary and one for daily sales. If you added Sales Year Month, you could merge Sales Year Month and Salary Year Month and show sales v salary by month

The bottom line is that you need to understand your data when working with multiple contexts; does the data belong together, either completely or partly. In the example above, you couldn't mix salary with sales date because salary is by month, not date. If you were to force it all into one piece of SQL, you'd end up having the salary repeated for every sales date, which would represent a chasm trap, which the contexts are there to prevent.

You need to be very clear on these concepts if you are designing universes as they underpin everything you do in a relational and dimensional database. I'd recommend a course or at the very least investing in a text book like Cindi Howson's.

Former Member
0 Kudos

Thank you Mark.

Actually this is the question from my interview.

So suppose in a scenario I have to use objects from 2 context then I have to explicitly merge the common dimensions. Is it right?

Former Member
0 Kudos

Have you used Business Objects yet? I need to know so I know how to pitch the answer.

Former Member
0 Kudos

Yes I have used SAP Webi most. Tried hands on of Universe development but I have never done universe designing in actual scenario.

Former Member
0 Kudos

At its simplest, a context is a logical collection of joins.
This collection of joins is for a set of tables that logically go together. The standard rule of thumb is one context per fact table. You should not join fact tables to other fact tables unless you are doing so as part of a fan trap resolution (totally separate topic, don't worry too much about that for now.)

From a Webi reporting perspective, you'd need to look at what objects you've got - do they logically belong together? If they do, can you push this back to the query level and add the imbalanced objects to queries to get balanced data providers (same dims in each). If not, then as I said earlier, you have to consider whether things logically belong together. Webi does not always have hard and fast rules; a lot of it is down to the individual data models that each report builder has available to them.