Dynamic object creation in Universe.

Hi BO Gurus,

Thanks for all to read this issue. BOB is a key source to help the developers. Please help me to provide a solution on the following scenario in the universe :

We have almost more than 10-15 common views to use it in the Universe that have the same database structure & the same column names what the other views. In Report We have to pull the data from different-2 objects from different view but creation of the same object name multiple times for each view is big & time consuming task.
Just for example : We have HR,Finance…etc dept,For Reporting purpose we have common columns from each mart but replicating all the objects for multiple times is tough task.

Any thought to create a dynamic object on the fly or to handle this scenario is really appreciated.

Regards,
Amit


sapboguru (BOB member since 2006-07-13)

Do people ever need to use more than one? If not, you can use the table mapping option with security groups to create only one set of objects and switch them to different views based on the user login.


Dave Rathbun :us: (BOB member since 2002-06-06)

Thank you veru much for such a quick response. They might use more than one object…How to handle in this scenrio ?

Regards
Amit


sapboguru (BOB member since 2006-07-13)

If its one single universe and the objects/columns are all identical in each view then
1 Create the classes & objects for one dept (Finance)
2 After you are done with step 1, rename the HR view(right click on view & rename table) to xx_HR
3 Then rename the Finance view, from Finance to HR.
4 Copy the Finance class (which will show objects pointing to HR) from previous step.
5 Rename the Finance view(from HR to Finance) and HR view (from xx_HR to HR)
6 Now paste the class you copied in step 3
It should now have all objects pointing to HR, parse the objects in both classes

As an aside, its better to have separate universe for each module - Finance, HR, Sales

.


haider :es: (BOB member since 2005-07-18)

Hi Dave,
Thanks for your help,Sorry to asking you simple questions,can you please help me to understand how exactly Table Mapping works

For Example:I have two views defined in Universe,both have same no of columns only difference in Data…How can I setup a common objects for both & fetch both the views data.

actual case I am going to have almost around 20-25 views,creation of common objects is little tough to have common objects but fetch the data as required ?

Please help me out.

Regards
Amit


sapboguru (BOB member since 2006-07-13)

Table mapping will not work if you need more than one at the same time, as I mentioned in my first response.


Dave Rathbun :us: (BOB member since 2002-06-06)

Dave,
Thanks for your reply.Please let me know if you have any suggestions.

I wanted to dynamically updated the table/view name in the universe as I already stated I would have amost 20-25 views at this point of time and it is going to be more…I wanted to map the object with all the tables dynamically.

Please suggest.

Regards
Amit


sapboguru (BOB member since 2006-07-13)

I guess I don’t see the big issue. Object creation is a one-time process. In the days you’ve spent waiting for suggestions here on BOB you could probably have created the universe. :slight_smile:


Dave Rathbun :us: (BOB member since 2002-06-06)

Thats Correct…Thanks for your help :yesnod: :yesnod: :wave: :wave:


sapboguru (BOB member since 2006-07-13)

Guess you have not read other post ! apart from what Dave suggested

.


haider :es: (BOB member since 2005-07-18)

Thanks haider,

(4) Copy the Finance class (which will show objects pointing to HR) from previous step
(6) Now paste the class you copied in step 3

I don;t want to recreate objects in the universe,I have to use the existing object with pointing to older as well as the new view records ?

Did you get what I am trying to achieve ?

Thanks for your help.

Regards,
Amit


sapboguru (BOB member since 2006-07-13)

I very well understand your requirement.
But as Dave pointed out the table mapping option which can be done for only one table at a time
Thus you are left with having multiple classes & objects for each view/table

So I just gave a quicker way to build classes & objects rather than going through the tedious way of creating them from scratch every time

.


haider :es: (BOB member since 2005-07-18)

Hi,
Thanks for your help haider.

BO Gurus…Please advice something to me…Help me out I need your expertise.

Regards,
Amit


sapboguru (BOB member since 2006-07-13)

Why are you still looking for help on this? Is this something you have to do more than once? If so, you could probably write a script using VBA to do what you’re asking. But as I said before…


Dave Rathbun :us: (BOB member since 2002-06-06)