M:N Relationships

Hi,
We have a data relationship which is causing headaches so any ideas how to solve this would be greatly appreciated.
Customer Dimension
Cust Code
Cust Desc
Account Dimension
Acc Code
Acc Desc
Balance Facts
Cust Code
Acc Code
Balance
Data :
Balance Facts
record 1 : Cust Code : 1
Acc Code : 1
Balance : 100
record 2 : Cust Code : 2
Acc Code : 1
Balance : 100
Problem :-
1 account owner by 2 customers (joint account holders). When I aggregate this cube the Balance = 200 when it should be 100. I need both customers in the cube because if I drilldown to individual customers each customer must show an account balance of 100.
Any suggestions welcomed.
Cheers,
Brandon

Sorry for making this confusing -- even simple answers can get complicated quickly if you don't have a good model to work with.
I would therefore suggest that you take the accounts/customers and create a simple spreadsheet. If you follow the logic that formulas must be applied to all elements of a given row OR column within the "grid" that is created, you can ultimately diagram the totals for the columns and rows. The formulas would obviously not be simple sums, but they would be close to that. After you model this "roll-up" that way, you only have to translate it into member formulas and ensure the calc order is appropriate (rows then columns or columns then rows). Keep it simple, and eventually you will hit on the formula/model that works for you. Then it's just a matter of translation.
As for my suggestions, I doubt that I coudl make it much more meaningful (it is hard to translate the relatively simple pictures in my mind into simple sentences in a forum). This is the kind of thing you either did before or not, and working through it is a non-trivial task even when you have a firm grasp of the goals (but something that a clear picture makes a lot easier, nonetheless).
What a) and b) are really saying is that reporting on non-input level data can only be done for 1 of the 2 dimensions, so that selecting a non-input account implies an input level customer (and vice versa). Each accomplishes this in a slightly different way. A) does this by creating a customer relationship for each combination of customers and B) does this by entering data at the "Customer Total" level and then replicating this to the associated customers as "memo items" (non-contributory members). Using these memo items at non-input account levels would result in "wrong" values.
Essentially, approach b) uses the "Customer Total" value is the only valid roll-up for any account total. You eliminate the need for customer totals because the individual account value is stored there, and the customers have to be populated with a copy of this data for any accounts they are attached to. The totals by customer are the sum of the accounts, while the sum for the accounts is only taken by the "Customer Total" member so there is no double-counting.
Approach a) is a similar scheme but has an account total value that allows the customers to have a hierarchy (approach b denied this ability).
Approach c) is a simple allocation scheme that combines approach b) with an input member for each account which is allocated to the "Customer Total" and to the attached customers. This is a logical next step from approach b (which is more of a proof of concept then a final solution).

Similar Messages

  • Characteristic Relationship BI-IP

    Hi,
    I am trying to create the following characteristic relationship on real time planning cube.
    Within the realtime cube I have 0fiscper and 0fiscvarnt being populated.
    I also want to calculate 0calquarter and 0halfyear1.
    For this I have created a DSO which has 0fiscper and 0fiscvarnt as the key and 0calquarter and 0halfyear1 as the data fields. I am populating 0fiscper and 0fiscvarnt during the upload and calculating 0calquarter and 0halfyear1 via a routine.
    I am now trying to create the characteristic relationship, but when I enter the DSO technical name, I get the following error message:
    DataStore object '....' does not have a data field from the InfoProvider; this object is invalid here.
    Any ideas why this happening, all the fields in the DSO exist in the realtime cube.
    Thanks
    DJL

    Hi
    For time characteristics, there are standard characteristic relationships.. dont see why need to create them.
    if it is for fiscvarnt-fiscper combination: guess no need for other things.
    Also if u r specifying DSO name in planning modeler, I guess u can look up the DSO thru F4 help.
    rgds
    Deepak

  • Training and Event Management: Relationships

    Hi TEM Experts,
    What are the appropriate steps, or best practice, if the event we want to add is a one off, and wasn't really scheduled? Do we need to go through the entire PSV1, PV12, etc. process just to add a one off event so that it shows up on the employee training report? What if we only want to create the relationship between person and business event type, but what report to run to show it?
    Thanks in advance,
    Susan
    Edited by: Susan Wong on Oct 27, 2008 9:15 AM

    Hi,
    Relationships in TEM
    1. A025 is participated by Person (P) for the course (E) - P to E relation A025 (Participated by)
    2. Org unit - A025 (Taken part) for the course (E) - O to E relation A025 (Taken part)
    Tha above said are only sample relationship in TEM, pl check table T777E for further relationships.
    Pl let us know if you are not understood.
    Appriciate awarding points.
    Thanks,
    Nandagopal C
    Edited by: Nandagopal Chiranjeevi on Oct 29, 2008 12:56 PM

  • How can I display  contacts in a relationship

    I have companies in my CRM. I have a customers/contacts in the CRM I have tied as a relationship with each companies. How can I display all the records/contacts associated with a company? I have a already created a secure zone, so the company user would have logged in. Is this possible? If not, any workaround?
    The only workaround I thought of is to use webapp to import the company data and create another web app containing the employees data. Then link both tables/webapp using datasource. But the way the client's data is structured could create a lot of problems going forward.
    Any suggestion, help will be appreciated

    The relationship feature and how companies work currently in BC is really limited. It is an association and not true relationships at the moment. You cant output a company and show all its relationships at the moment.

  • Error while adding a used relationship between the New DC and the Web DC

    Hi Gurus
    We are getting the Error in NWDS while Adding  a used relationship between the New DC and the Web DC.
    Steps what we are Done
    1. Create the custom project from inactiveDC's
    2.creating the project for the component crm/b2b in SHRAPP_1
    3.After that we changed the application.xml and given the contect path.
    4.Then we tried to add Dependency to the custom create DC we are getting the error saying that illegal deppendency : the compartment sap.com_CUSTCRMPRJ_1 of DC sap.com/home/b2b_xyz(sap.com.CUSTCRMPRJ_1) must explicitly use compartment sap.com_SAP-SHRWEB_1 of DC sap.com/crm/isa/ like that it was throwing the error.
    so, we skip this step and tried to create the build then it is saying that build is failed..
    Please help us in this regard.
    Awaiting for ur quick response...
    Regards
    Satish

    Hi
    Please Ignore my above message.
    Thanks for ur Response.
    After ur valuble inputs we have added the required dependencies and sucessfully created the projects, then building of the  projects was also sucessfully done and  EAR file was created.
    We need to deploy this EAR file in CRM Application Server by using the interface NWDI.
    For Deploying the EAR into NWDI, we need to check-in the activites what i have created for EAR. once i check-in the activites ,the NWDI will deploy the EAR into CRM Application Server.
    In the Activity Log we are able to check the Activities as Suceeded but the Deployment column is not showing any status.
    When i  right click on my activity Id the deployment summery is also disabled.
    So finally my Question is that where can i get the deployment log file, and where can i check the deployment status for my application..
    Any pointers in this regard would be of great help..
    Awaiting for ur valuble Responses..
    Regards
    Satish

  • Automatic creation of BP relationship while BP is created

    We are implementing CRM SALES and using Portal as the user interface.
    The requirement is that a Sales Rep should be able to see only the
    accounts and contacts (which is nothing but Business partners in the
    GUI side) that they have created when they list account using  "My
    Accounts" in Portal. We are configuring Portal in a such a way that
    "My Accoounts" is the only view available for Sales Rep portal.
    I have tested and found that if a relationship category of "is the
    reponsible employee" is created from  the sales rep to the Account OR
    Contact then that account or contact will be displayed in the "My
    Accounts" or "My Contact"view in Portal.
    But requesting a Sales Rep to create the relationship for every
    Account and Contact that they create in CRM will NOT be accpetable at
    all.
    Hence I am looking for an option with which a relationship of "is the
    Responsible Employee" can be created automatically when an account or
    contact is created by the Sales Rep.
    Please let me know your ideas.

    Hi Rajadurai,
    In the BADI - BUPA_FURTHER_CHECKS implement the method - CHECK_CENTRAL.
    The following code could serve your purpose:
    IF IV_ACTIVITY eq '01'. "Check if it is for creation
      CALL FUNCTION 'BUPR_RELATIONSHIP_CREATE'
       EXPORTING
        IV_PARTNER_1 = IV_PARTNER
        IV_PARTNER_2 = LV_createdby "BP no of the creator
        IV_RELATIONSHIP = 'BUR011' "Code for emp. resp
        IV_DATE_FROM = SY-DATLO
        IV_DATE_TO = '99991231'.
    endif.

  • Creation of new fields for business partner relationship

    Hi experts,
    We are currently on SAP CRM 7.0 EHP1.
    We have a requirement to maintain a custom checkbox (Relevant for business) on each business partner relationship.
    Can you please let us know on how we can achive this requirement.
    Thanks in advance,
    Vamsi.
    Moderation: Duplicated. I lock this one and continue here: [Create a new field in Business Partner Relationships|Create a new field in Business Partner Relationships#10795912]
    Edited by: Joaquin Fornas on Nov 8, 2011 12:17 PM

    Please, anyone can help?
    Thanks!!

  • Creation of New field in Relationship block of contact page

    Hi,
    I have created a new field as value attribute in Relationship block of contact overview page. Since both AET and EEWB did not allow creation of the field as part of BUT051 I had to create value atribute. I have custom logic for the field. Can you please let me know how I can populate the field.
    Thanks,
    JC

    Hi JC,
    The context node that you are using is a mixed node, so from this node you need to get value node so that you can cast the value into cl_bsp_wd_value_node.
    Here's the sample code for getter and setter method of that attribute:
    DATA:
       lr_mixed TYPE REF TO cl_bsp_wd_mixed_node,
       lr_value_node TYPE REF TO cl_bsp_wd_value_node.
    lr_mixed ?= current  or lr_mixed ?= iterator. " use either of the code i dont have system right now
    lr_value_node ?=  lr_mixed_node->if_bsp_wd_ext_property_access~get_value_node( ).
    Here, from lr_value_node get the property access method and set the attribute value to VALUE parameter.
    Thats it
    Thanks,
    Bhushan

  • Problems in creation of activity with the folder relationship...

    Hi People,
    I need to create the activity adding the campaign in the RELATIONSHIP folder.
    To create the activity, I am using the BAPI BAPI_ACTIVITYCRM_CREATEMULTI, but there is the problem: I can´t add the campaign at the folder RELATIONSHIP of transaction CRMD_BUS2000126. Is it possible to create this?
    If not, Is there the other function that do this?
    Thanks,
    Regards.

    Hi Florin,
    At First, thank you for your help.
    Really, I don´t populate the table DOCUMENT_FLOW.
    Sorry, do you have an example to populate this table correctly? Or do you have any documentation about this BAPI?
    Thanks.
    Best Regards.
    Norberto Muramoto.

  • Problem with Foreign Key relationships in SAP R/3 4.7

    Hi Experts,
    I am trying to create a foreign key relationship between 2 transparent tables in SAP R/3 4.7
    Table 1:ZAAVNDR (MANDT (pk), VENDORNO (pk), NAME, REGION, COUNTRY (fk)) Foreign Key Table
    Table 2: ZAAVNDRREF(MANDT(pk), COUNTRY (pk)) ---Check table
    I have added few valid countries in check table but when I am adding some records in foreign key table with invalid countries these records are not being restricted and are still successfully going into the table.
    Could any one please help in this.
    Thanks in anticipation.
    -Amit

    Hi Sandra,
    Many thanks for your response and providing time of yours.
    Now, I have done exactly the same thing, but still it is the same.
    I have created two new tables as below:
    ZAAVREF (Check table)
    MANDT (PK)
    COUNTRY (PK) Domain:ZAACOUNT (CHAR 10)
    ZAAV1 (Foreign key table)
    MANDT (PK)
    COUNTRY (PK) Domain:ZAACOUNT (CHAR 10)
    Then I have created FK on country of foreign key table ZAAV1 and then SE16 (for table ZAAVREF)->Create Entries-> Entered values for Country only->Save....Records entered with valid Country values.
    After that SE16 (for table ZAAV1)->Create Entries-->Entered an Invalid country->Save->Still the record entered to the Database successfully....
    Could you please let me know where I am going wrong.
    I am using SAP R/3 4.7 and creating tables using Tools->ABAP Workbench->Development->ABAP dictionary

  • Love / Hate Relationship with Photoshop Elements

    I am having a love/hate relationship with Photoshop Elements!  Love the page design capabilities and hate the lack of capability on the print end.  Kodak does not give any choice in the book they will print from Elements.  All I can get is a #$%& die cut cover!  Is there anyway that I can order other options that I know Kodak has available when creating a book using Elements and their site.  I want to be able to choose a custom cover!  I have tried Kodak to get answers.  I have tried Adobe (impossible, unless maybe you pay).  Neither are very helpful!  The only answers I get are use the Elements designed pages and place them onto pages that you create in their software.  Problem is that one needs a jpeg file to do this.  No online program seems to recognize .PSD or .PSE file types.   HELP!
    Bob, Barbara you both seem to be very knowledgable...any ideas...
    Anyone with any help can answer here or [email protected]
    Terry

    Terry:
    Yeah, the photobook print options are limited. (Although, the built in Kodak and Shutterfly books are very nice)
    One thing to try differently is to use the Print At Home selection on that first screen after the clicking on the PhotoBook option (assuming you are using PSE8 here) (use Photo Collage with PSE7)
    Down that path, you will get a few more choices in page size. It will still create a multi-page document (a .pse) while your building your book, and when done, you can print the pages of the book out as a .pdf. Many book printing services will take in a PDF.
    Another option is to do a single page at a time and save them as .jpg's. A little more work in keeping your various files together and ordered properly, but it would give you ultimate flexibility.

  • Unique Relationship Entity

    Is there a simpler way to get a unique relationship entity than this?
    @Entity
    class CarPassedTruck {
        class Unique {
             @KeyField(1)
             String carLicense;
             @KeyField(2)
             String truckLicense;
             private Unique() {}
        @PrimaryKey
        long id;
        @SecondaryKey(relate=MANY_TO_ONE, relatedEntity=Car.class)
        String carLicense;
        @SecondaryKey(relate=MANY_TO_ONE, relatedEntity=Truck.class)
        String truckLicense;
        @SecondaryKey(relate=ONE_TO_ONE)
        Unique unique;
        private CarPassedTruck() {}
    }If this is the best approach, would it be possible to get an annotation to handle the creation of this composite key automatically? The cleanest place to put one would seem to be as an array of @UniqueKey in the @PrimaryKey.
    @PrimaryKey(unique={@UniqueKey("carLicense", "truckLicense")})

    Hi,
    I've been thinking about this and I think perhaps a more general solution would be a better addition to the DPL in the long run.
    If I understand correctly from your example and code, your main intention is to avoid creating the Unique key class that contains the car and truck license fields. In your example a long ID is used as the unique primary key. However, another (possibly more common) approach would be to make the car/trunk license the one and only unique key as follows.
    @Entity
    class CarPassedTruck {
        static class CarTruckKey {
             @KeyField(1)
             String carLicense;
             @KeyField(2)
             String truckLicense;
             private CarTruckKey() {}
        @PrimaryKey
        CarTruckKey key;
        @SecondaryKey(relate=MANY_TO_ONE, relatedEntity=Car.class)
        String carLicense;
        @SecondaryKey(relate=MANY_TO_ONE, relatedEntity=Truck.class)
        String truckLicense;
        private CarPassedTruck() {}
    }In this case, and possibly also in your example, the CarTruckKey class is needed in order to do lookups by this key in the index. Lacking tuples (like Python and Scala) in Java, such a key class is needed to specify a composite key, especially in general case where not all the fields are Strings.
    This brings us to more a general issue in the DPL, which has been pointed out several times on the forum and that we do plan to address in the future, which is that it is cumbersome to share a field's value among more than one key. Today, sharing of values requires that the application copy the shared value into multiple field locations. This copying has to be done initially when the object is created, and whenever a shared field value is changed. You'll find a number of posts on the forum about this.
    This issue comes up whenever composite keys are used, and a field in a composite key is also used in another key or as a non-key field. We have several ideas in mind for addressing this issue, for example:
    <li>Allow a field in a key class to refer to another field or key by name, such that the copying is done automatically.
    <li>Provide a way to define keys via methods, rather than fields, allowing the methods to derive the key value (whether singular or composite) from other fields in the object. This also allows deriving keys using computations on their source data, as opposed to just copying.
    Another issue is that one would like to specify a foreign key constraint on a field in a composite key class, whether or not that field also appears as a separate key. One would like to specify a sequence, as well, on an individual field in a key class.
    Initially I didn't recognize your feature request as related to these more general problems, and I apologize for that. And I'm sorry that I didn't give you this feedback before you wrote the code; that wasn't fair.
    We are really in no position right now to do the design or implementation work required to address these enhancements in a thorough way; we'll need to put a lot of thought into this, in order to keep the DPL model as simple as possible. But these issues have been outstanding for a long time, so I can imagine that you and others may be a little frustrated that we're taking so long. We have to balance the time we put into the JE database storage engine itself with time we put into the DPL, so we definitely have constraints. But I can assure you that we are chipping away at some of the DPL enhancements that have been requested.
    I'm not sure whether you'd like to do a local enhancement in your copy of JE that addresses your immediate needs, or if you'd rather wait for more general solutions to appear in JE later on. Whatever you choose to do, we'll support you the best we can with the time we have available.
    Thanks,
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Relationship cannot be created between identical business partners

    Hello,
    I am implementing CRM 5.0 and trying to create business partner relationships to the identical business partner.  For example, I am trying to makbe BP#1 have te relationship 'Has a Contact of' to BP#1.  However, I am getting the error message:
    'Relationship cannot be created between identical business partners'.
    (Message no. R1776)
    Has anyone ever encountered this error?  Is there any way to create a relationship in SAP-CRM to the same business partner?
    Thanks much for your help,
    Dan

    Hi Daniel
    In short: No, it is not possible to have a relationship "between" a BP and itself.
    In long: In R/3 there are partner roles like Sold to, ship to and others. When CRM was designed the people at SAP did want to simplify a bit and implemented the following logic for partner determination: If there is no relationship of a searched type, the BP itself is taken. As a result a relationship pointing to its source is not allowed as it would duplicate the information already existing.
    Hope this helps,
    Kai

  • What is the Relationship ID to find employee line manger and his subordinate?

    Dear Experts,
    1.Can you suggest FM - where using particular employee Position ID can we pull out his line manger and subordinate and also provide the relationship code to get the detail of line manager and subordinate.
    2.For eg say employee position ID -30000019 what input i should give in table HRP1001 to get his line manager & subordinate .
    Regards
    Vinodh

    Hi Vinodh,
    You should get that below is the process
    Click on the Details View/Edit and enter the below data
    Note: you need to enter the position number of the Manager who has sub ordinates.
    Output if you click on 16 Entries view.
    If you are question is answered please close the thread by marking as Correct Answer.
    Regards,
    Mohsin.

  • Error trying to relate tables "...either doesn't exist or doesn't have a relationship to any table available in the current context"

    I have two tables;
    The first is my Order table which has a single row for each unique order - there are no duplicate order numbers.The order id column here is called
    OrderID.
    The second is my Submissions table which is similar to a transactions table, there are multiple submissions for every order. This table also contains an
    OrderID column that contains the relevant OrderID.
    The submission table also contains a calculated field called Date and a calculated field called
    MaxDate field which is the date of the most recent submission that relates to any particular order in cases where there are multipple.
    My goal is to add a column to the Order table this MaxDate column. The reason for duplicating the information rather than linking the tables is because I need to create more calculated columns in the
    Orders table based on this value.
    I have created a relationship between the two tables however when I use:
    =RELATED(Submissions[MaxDate]
    I get this error:
    "...either doesn't exist or doesn't have a relationship to any table available in the current context"
    I don't really understand why this would be, because MaxDate definitely exists and contains only numerical values. What is more strange is that if I try and combine the data through a pivot table it actually works! I can create a pivot with OrderID in the first
    column and then associate it with MaxDate from the Submissions
    table as the value. 
    Can anyone help me understand what is the problem here?
    P.S. if it is useful the formula I'm using to calculate the MaxDate is:
    =MAXX(FILTER(Submissions,Submissions[OrderID] = EARLIER(Submissions[OrderID])),[Date])
    Thanks.

    Maracles, is this still an issue?
    Thanks!
    Ed Price, SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Optimizer - Query relationship

    Hi all,
    I have a query, which runs fast if I give a certain Index as hint, even though the cost is 18205.(thro explain plan)The query runs in 50 seconds.
    However, I force certain other indexes,then the cost is reduced to 18. But the query results come out after 2 minutes.
    Is the query performance and Cost not inversely proportional?
    null

    Before you tune a query you need to be sure, as to what are are looking for.. i.e. optmize the query for best performance(resources wise) or best performance time wise.
    There is no inverse relationship between the cost and performance( time wise, I understand this is what you meant).
    If your optmization goal is min resources go with min cost but more time, but if the goal is best retrieval time, go the best time even if it means more cost..

Maybe you are looking for