Adjacency Matrix in MDS using a recursive derived hierarchy

Hello everyone!
I'm looking for some great examples of how to do an adjacency matrix in Master Data Services while using the recursive derived hierarchy.  Is this even possible or do I need to use an explicit hierarchy?
I'd really like to avoid using the explicit hierarchy because I'd like to be able to define the matrix and enforce adjacency relationship with that matrix.
I hope I'm making sense here...

Gersh,
It works now. I have implemented the below code (ENTITY needed to contain the variable as well). The relationship profitcenter and entity is very important as it derives the relevant profitcenters from the profit center hierarchy (e.g. all profitcenters under the legalentity node).
//ALLOCATION PROCEDURE CONVERSION RATE
//=====================================
*FOR %ENT% = %ENTITY_SET%
*RUNALLOCATION
*FACTOR=1
*DIM SEBACCOUNT WHAT=CONV_RATE; WHERE=<<<; USING=<<< ; TOTAL=<<<
*DIM PROFCENT WHAT=DUMPC; WHERE=BAS(BPC_%ENT%);USING=<<<; TOTAL=<<<
*DIM CATEGORY WHAT=FCSTCUR; WHERE=<<<; USING=<<< ; TOTAL=<<<
*DIM ENTITY WHAT=%ENT%; WHERE=<<<; USING=<<<; TOTAL=<<<
*ENDALLOCATION
*NEXT
Thanks
Nico

Similar Messages

  • Adjacency List / Adjacency Matrix

    Hello All,
    I am very new to Java programming and looking for some examples:
    1) How I can create an Adjacency List structure consisting of random numbers in a form of Skewed, Uniform, or Two-Tier Distributions.
    2) Create a matrix (two-dimentional array, and this part is easy). The difficult part is how can I create two dimentional array with random number distribution for 1's and 0's (i.e. adjacency matrix) in a form of Skewed, Uniform, or Two-Tier Distributions.
    Thank you!

    If I'm getting this right, I think the 2 problems above are down to one question:
    1) How to create a random number generation method for {Skewed, Uniform, Two-Tier, ...} Distribution?
    One solution I can immediately think of is as follows:
    import static java.lang.Math.*;
    // Cumulative Distribution Function
    public interface CDF {
        // probability by a given x
        double p(double x);
        // x from a given probability p
        double x(double p);
    // Example - Normal Distribution
    public class NormalDistribution implements CDF {
        private double mean, sd;
        public NormalDistribution(double mean, double sd) {
            this.mean = mean;
            this.sd = sd;
        private double phi(double z) {
            double t = 1.0 / (1.0 + 0.2316419 * x);
            return 1.0 - (exp(-z*z / 2.0) / sqrt(2.0 * PI)) * (0.31938153 * t - 0.356563782 * pow(t, 2.0) + 1.781477937 * pow(t, 3.0) - 1.821255978 * pow(t, 4.0) + 1.330274429 * pow(t, 5.0));
        private double inversePhi(double p) {
            double a = p > 0.5 ? 1.0 - p : p;
            double t = sqrt(log(1.0 / (p*p)));
            double t2 = t*t, t3 = t2*t;
            return (p > 0.5 ? 1.0 : -1.0) * (t - (2.515517 + 0.802853 * t + 0.010328 * t2) / (1 + 1.432788 * t + 0.189269 * t2 + 0.001308 * t3));
        public double p(double x) {
            return phi((x - mean) / sd);
        public double x(double p) {
            return inversePhi(p) * sd + mean;
    // RandomNumberGenerator
    public class RNG<T extends CDF> {
        private T dist;
        public RNG(T dist) {
            this.dist = dist;
        public double rand() {
            return x(rand());
    }Thus with the following line:
    RNG NR = new RNG<NormalDistribution>(new NormalDistribution(10.0, 5.0));You'll have NR as a random number generator that will give numbers that are normally distributed.
    Of course if you just need discrete distributions instead of continuous ones, you can make similar definitions using long or int instead of double
    Hope this helps~
    Alex Lam S.L.

  • Matrix in  java using  two dimension array

    hi!
    Everybody here's a problem I have cpould any body out there give nice piece of sourcr code for "matrix in java using two dimension array"I have to give a presentation how it works.Yes I'd appreciate as many example as possible
    If anybody can??
    Please help
    regards
    ardent

    nice piece of sourcr
    code for "matrix in java using two dimension
    n arraySure,
    int[][] matrix = new int[5][5];
    That declares a two-dimensional 5 by 5 array with integer elements. All elements are initially 0.
    For further information check you favourite Java textbook.

  • Derived Hierarchy Permissions - cascading top level permissions to all subseuent levels

    I have created a 3-level derived hierarchy in my MDS model.
    Level 1 - divisions, Level 2 - groups, Level 3 - targets per year-month
    We have divisional users that would use this structure. so when I add a user I set the permissions at the division level and would like those permissions cascaded down to levels 2 & 3 without going thru and setting permissions on each node in level
    2 and level 3. Is it possible to do so? If yes, how? If not, then how do I maintain permissions for my users - how can I make sure that if a user enters a new group for a division, then he/she can use it to set targets?
    Thanks,
    Sonal

    The permission will be inherited by the subtree.
    https://msdn.microsoft.com/en-us/library/ee633750.aspx
    On the Hierarchy Members tab, each hierarchy is represented as a tree structure. When you assign permission to a node in the tree, all children inherit that permission unless permission is explicitly assigned at a lower level.

  • How to use File Adapter with hierarchial Structure?

    Hi,
    How to use File Adapter with hierarchial Structure like..
    Data:
    --Header Details:
    Line Item Details:
    Data
    Bcoz I am getting a Flatfile in a hierarchial way as shown below.
    Header Details :1
    Line Item a
    Line Item b
    Header Details :2
    Line Item c
    Line Item d
    Kishore

    Hey Kishore,
    In order to create a structure you need to use the file with convertion mode on the sending communication channel of the file adapter.
    check the link for the needed configuration paramters.
    If the structure is more complexed you can use the Contetnt master(CM) from itemfield which allows to ceate XML file from complex flat files and more.
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm">File sender adapter</a>
    If you have any question i'll be more than happy to assist.
    Nimrod Gisis

  • How to Create Recursive Dimension Hierarchy

    Hi all
    i will be glade if any body know how i can create Recursive Dimension Hierarchy
    where the number of levels is varibel.
    like the Account DIM or manager Dim
    eg
    i have the follwing table
    EmpId Name -- MangerID
    where Manager id is a forign key to Empid
    regards,

    Hi
    Have a look at my blog post here: http://www.rossgoodman.com/2007/10/12/dimensionally-modelling-a-recursive-hierarchy/
    Hope that helps.
    Ross
    http://www.RossGoodman.com

  • Recursive Dimension Hierarchy

    Hi everybody,
    Is there a way to define a recursive dimension hierarchy in the Oracle BI Administration Tool???
    Many thanks in advance!!!
    Jorge.

    Jorge,
    If you are referring to a parent-child hierarchy of the Manager-Employee type then its possible to model it in the BMM layer. It takes a little work but its doable. I have done it but dont recall the specifics.
    -Red

  • Hierarchy used in "People in Hierarchy" screen (Manager Actions)

    Hi All
    Which hierarchy is used in "People in Hierarchy" screen (Manager Actions)
    I tried the following.
    Create a position hierarchy and created a security profile as follows
    View Employees - Restricted
    View CWK - Restricted
    View Applicants - Restricted
    View Contacts - Restricted
    View Candidates - All
    Organization Tab
    Security Type: View All Organizations (no security) -- not adding any thing
    Positions
    Position Hierarchy : Test Position Hierarchy (Name of hierarchy)
    Radio button checked for "Use the User's assignment(s) as the top position.
    Checked boxed checked for "Include Top Position"
    Rest of the tabs are blank.
    Attached this profile to the responsibility Manager Self Service through which I am accessing Manager Actions Function.
    When I go to Manager Actions screen I found that both supervisory AND position hierarchy are applied. If a person is in position hierarchy and supervisory hierarchy only then it will get displayed there.
    Is it possible that I can use only position hierarchy at that place.
    I am on Apps R11i, Family Pack K,
    Thanks
    Gaurav

    Hi Gaurav,
    It depends on the responsibilities assigned to employee. That means
    If an employee has
    "Manager Self Service" with profile "Position Hierarchy" and "HRMS Manager" with profile "Supervisor Hierarchy", then both will be applied.
    So, check and make sure that only one security profile is available at any point of time.

  • Compile error in adjacency matrix

    Hello, I'm getting a strange compile error in my fileStream constructor
    also I'm having trouble accessing nodes.
    Any advice is much much appreciated and will be rewarded as such
    cheers
    mport java.io.*;
    import java.util.*;
    class AdjMatrix
         private int [][] matrix;
         private int num_vertices;
         private final int inf = Integer.MAX_VALUE;
         public AdjMatrix(int num_vertices)
              this.num_vertices = num_vertices;
              matrix = new int[num_vertices][num_vertices];
              // let's assume that nodes are adjacent to themselves
              for (int vertex = 0; vertex < num_vertices; vertex++)
                   for (int other_vertex = 0; other_vertex < num_vertices; other_vertex++)
                        if (other_vertex == vertex)
                             matrix[vertex][other_vertex] = 0;
                        else
                             matrix[vertex][other_vertex] = inf;
         public void addEdge(int vertex_from, int vertex_to, int cost)
              matrix[vertex_from][vertex_to] = cost;
         public void addEdge(int vertex_from, int vertex_to)
              addEdge(vertex_from, vertex_to, 0);
         public void addBidirectedEdge(int vertex_one, int vertex_two, int cost)
              addEdge(vertex_one, vertex_two, cost);
              addEdge(vertex_two, vertex_one, cost);
         public void addBidirectedEdge(int vertex_one, int vertex_two)
              addEdge(vertex_one, vertex_two, 0);
              addEdge(vertex_two, vertex_one, 0);
         public void removeEdge(int vertex_from, int vertex_to)
              matrix[vertex_from][vertex_to] = inf;
         public void removeBidirectedEdge(int vertex_one, int vertex_two)
              matrix[vertex_one][vertex_two] = inf;
              matrix[vertex_two][vertex_one] = inf;
         public int getEdge(int vertex_from, int vertex_to)
              return matrix[vertex_from][vertex_to];
    class FileStream extends AdjMatrix {
         double answer;
         String line;
         AdjMatrix theMatrix;
         int total;
         public FileStream(String fileName) {
              fileName = "Test.txt";
              try {
                   FileReader fileRead = new FileReader(fileName);
                   BufferedReader br = new BufferedReader(fileRead);
                   while((line = br.readLine()) !=null) {
                        StringTokenizer st = new StringTokenizer(line, ",");
                        total++;
                        for(int i=0; i<st.countTokens(); i++){
                             for(int j=0; j<st.countTokens(); j++) {
                                  int weight = Integer.parseInt(st.nextToken());
                                  theMatrix.addEdge(i,j,weight);
                   br.close();
              catch(IOException exc) {
                   System.out.println("File not found!");
         //System.out.println("The total in [Test.txt] is: " +total);     
    }

    class FileStream extends AdjMatrix {
         double answer;
         String line;
         AdjMatrix theMatrix;
         int total;
         public FileStream(String fileName) {
              Since you don't specify which constructor of AdjMatrix to use in the contruction of FileStream the compiler is trying to use the default constructor of AdjMatrix BUT you don't have one!
    Possible solutions -
    1) Define a default constructor in AdjMatrix.
    2) Use the public AdjMatrix(int num_vertices) constructor by using
         public FileStream(String fileName) {
                 super(10); // or what ever size you think is appropriate3) Change AdjMatrix to use so as to use dynamic arrays (ArrayList?) instead of having a fixed dimension.
    4) MakeFile stream a factory that does not extend AdjMatrix but has a method that returns an AdjMatrix based on a filename argument.
    e.g.
    class  FileStreamFactory
         public AdjMatrix createFromFile(String filename)
                 // Parse the file to get the size
                AdjMatrix theMatrix = new AdMatrix(the size you parsed);
                // Fill in anything else you need to
                return  theMatrix ;
    }You would use this by creating a factory and then using it to create your AdjMatrix.
    It should be obvious that I prefer approach 4.
    Have fun!

  • Urgent HELP required on forming the Matrix of data using PL/SQL

    Hi All,
    I'm new to this thread and require your urgent help in this regard.
    I've got a requirement for building a 5000 X 5000 matrix using PL/SQL. My original data tables have 5000 rows each and I need to do a correlation analysis using this data and need to store in a physical table and not in-memory. Is this feat achievable using mere PL/SQL? I understand that Oracle DB has a limitation of 1000 columns(but not sure) and hence I'd like to know whether there is any work-around for such scenarios. If not, what are the other alternative method(s) to achieve this feat? Do I need to use any 3rd party tools to get this done? An early reply from the experts is highly appreciated.
    Thanking you all Gurus in advance.
    Rgds
    Sai

    Welcome to OTN!
    I'll get to your quesiton in a moment, but first some welcome information. Many OTN posters consider it impolite to mark threads as "urgent". We are volunteers and have jobs of our own to do without people we don't know making demands. You are brand new and deserve some patience but please understand this. It is very likely before I finish this post someone will complain about the word "urgent" in your subject.
    On to more interesting things :)
    You can do the matrix, but are out of luck with a 5000 x 5000 table because Oracle only allows 1000 columns per table. There are ways to work around this.
    How do do the matrix depends on what you want to do. You can do this different ways. You can create a table beforehand and use PL/SQL or simple SQL to populate it, or use the CREATE TABLE AS syntax to create and populate it in one step if you can get the underlying SQL to work the way you want, something like
    create table my_table as
      select a.*, b.*
        from table1 a, table2 bcan populate a matrix from 2 tables with an intentional cartesian join (the WHERE clause was left out intentionally, provided your data is already in the data base.
    If not you can use a PL/SQL routine to populate the data.
    There are a couple of ways to solve the 1000 column limit. The easiest way might be to have 5 collections of 1000 columns each. A more complicated but more elegant soltion would be to have nested collections, allowing 2 colliections that you can loop through - a collection of collections. Nested collections can be hard to work with. A third way would be to use nested tables in the database but I personally do not like them and the insert, update, and delete statements for nested tables are hard to use.
    I'm not going to give a code example because I am not sure which solution is best for you. If you have further questions post them.

  • Error removing data from MDS using WLST

    I'm new at MDS so i want to remove some data which I inserted in the wrong structure....sounds quite easy. After some looking around I should be able to do this using a deployment plan and WLST. I chose the last one as I am not realy familiar yet with deployment plans. I connect with my server and started WLST did the following:
    wls:/offline> connect ('weblogic', 'mypassword' , 't3://localhost:8001')
    Connecting to t3://localhost:8001 with userid weblogic ...
    Successfully connected to managed Server 'soa_server1' that belongs to domain 'MY_DOMAIN'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    wls:/MY_DOMAIN/serverConfig> deleteMetadata(application='soa-infra', server='soa-server1', docs='/apps/deploy/*')The outcome was:
    Location changed to custom tree. This is a writable tree with No root.
    For more help, use help(custom)
    and after a while it closed the WLST connection. Can anyone tell me how I can remove data from my repository or what is going wrong here?
    Thanks in advance

    Hi,
    I think you were getting this error because you had your server name incorrect : soa-server1 instead of soa_server1. Also it might be possible that soa-infra is installed on the different server.
    Regards,
    Neeraj Sehgal

  • Delete adjacent duplicates how to use in the below select statement

    hi i have a problem
    i am suing the below select statement
    SELECT    a~extno
              a~guid_lclic       " for next select
              e~ctsim
              e~ctsex
    *revised spec 3rd
              f~guid_pobj
              f~amnt_flt
              f~amcur
              f~guid_mobj
              e~srvll     "pk
              e~ctsty     "PK
              e~lgreg  "PK
      INTO TABLE gt_sagmeld
      FROM /SAPSLL/LCLIC  as a
      INNER JOIN /sapsll/tlegsv as e on elgreg = algreg
      inner join /sapsll/legcon as f on fguid_lclic = aguid_lclic   " for ccngn1 selection
      inner join /sapsll/corcts as g on gguid_pobj = fguid_pobj
                               where   a~extno in s_extno.
      sort gt_sagmeld by guid_lclic lgreg ctsty srvll GUID_POBJ GUID_MOBJ.
      delete adjacent duplicates from gt_sagmeld comparing guid_lclic lgreg ctsty srvll GUID_POBJ GUID_MOBJ .
    now i am confused how to use delete adjacent dupliacate and on which fields
    as first table /sal../lclic primary key is guid_lclic
    and it is joined to table
    legcon by guid_lclci ( not a primary key here)
    legcon primary key is guid_legcon
    and table 3 legsv by lgreg (pk here)
    table 3 has tow more primary key srvll and ctsty also
    NOW MY QUESTIO IS TAHT IS I USE ABOVE DELETE ADJACENT STATMENT IT FETCHES 20 LAKH RECORDS
    I WANT TO REDUCE IS LET ME KNOW ON WHAT fields i need to use delete adjacen duplicates
    or use comparing all fields?
    regards
    Arora

    hi sudha
    if u see my select statement is contains four Primary keys
    srvll
    lgreg
    ctsty
    guid_lclic
    but the next table connected to this table legcon is by guid_pobj and anothe table by guid_mobj
    and if i take this gt_sagmeld to another temp table and i find abt 10 lakh uniques guid_pobj
    similary 6 lakh guid_mobj so the next slect is hanpering because of this
    not COMING TO OUR POINT IF I SORT ONLY BY OUR PRIMARY KEYS NOT TAKING INTO ACCOUNT TEH GUID_POBJ AND GUID_MOBJ
    THE ENTRIES ARE VERY LESS BUT IF I TAKE INOT ACCCOUNT IN GT_SAGMELD THE ENTRIES ARE ABT 20 LAKH
    SO I AM NOT SURE WHETHER TO TAKNE GUID_POBJ AND GUID_MOBJ INOT ACCOUNT FOR DELECTING ADJACENT DUPLICATES?
    HENCE THE QUESTION OF ON WHICH FIRLD DELETE OR COMPARING ALL FIELDS I USE?

  • Can't we use function to derive value for NEXT clause in MV ?

    Hi Friends,
    I have a requirement like below
    I need to derive the schedule (Value for NEXT clause in the create MV command) for a MV to run it
    e.g., Value from a date column : 03-JUL-2012 10:00 AM, VALUE for NEXT clause in CREATE MV statement should be 03-JUL-2012 04:45 AM (It is -5.45 hrs from the above date column value )
    So I wrote a function (GET_DATE) to derive schedule for NEXT clause and tried to call it from NEXT caluse, but it is giving error message as mentioned below
    ORA-04044: procedure, function, package, or type is not allowed here
    CREATE MATERIALIZED VIEW child_mv
    PARALLEL 16
    INITRANS 16
    STORAGE (
    FREELISTS 16
    FREELIST GROUPS 4
    BUILD IMMEDIATE
    REFRESH COMPLETE
    NEXT GET_DATE('PARENT_MV')
    AS
    SELECT * from xxmdme_party_stage where rownum<101;
    Could you please help to give some light on how this can be done ?

    942661 wrote:
    Hi Friends,
    I have a requirement like below
    I need to derive the schedule (Value for NEXT clause in the create MV command) for a MV to run it
    e.g., Value from a date column : 03-JUL-2012 10:00 AM, VALUE for NEXT clause in CREATE MV statement should be 03-JUL-2012 04:45 AM (It is -5.45 hrs from the above date column value )
    So I wrote a function (GET_DATE) to derive schedule for NEXT clause and tried to call it from NEXT caluse, but it is giving error message as mentioned below
    ORA-04044: procedure, function, package, or type is not allowed here
    CREATE MATERIALIZED VIEW child_mv
    PARALLEL 16
    INITRANS 16
    STORAGE (
    FREELISTS 16
    FREELIST GROUPS 4
    BUILD IMMEDIATE
    REFRESH COMPLETE
    NEXT GET_DATE('PARENT_MV')
    AS
    SELECT * from xxmdme_party_stage where rownum<101;
    Could you please help to give some light on how this can be done ?you must (ab)use EXECUTE IMMEDIATE

  • CAST MULTISET using a recursive UDT using REF

    I am trying to create a recursive object and populate it using cast and multiset. However I keep getting the following error:
    ORA-00932: inconsistent datatypes: expected UDT got CHAR
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    *Cause:    
    *Action:
    Error at Line: 96 Column: 47
    I have been looking on OTN, Google ... every where I can think of. I am missing somthing simple or it is not possible I have not found documentation either way. Found one reference which was close to what I am doing. However the link to the explanation was broken ( Oracle Forums link ).
    I have created a simple example below.
    PS. Please no comment on using system ( i know :) ) this is a scratch database.
    16:53:49 SQL> CREATE OR REPLACE TYPE system.MY_TYPE;
    16:54:02 2 /
    Type created.
    16:54:04 SQL> CREATE OR REPLACE TYPE system.MY_TYPE_LIST AS TABLE OF REF system.MY_TYPE;
    16:54:11 2 /
    Type created.
    16:54:13 SQL> CREATE OR REPLACE TYPE system.MY_TYPE AS OBJECT
    16:54:27 2 ( COLUMN1 VARCHAR2(30),
    16:54:35 3 SUB_LIST system.MY_TYPE_LIST
    16:54:45 4 );
    16:54:52 5 /
    Type created.
    16:54:55 SQL>
    16:54:55 SQL> select system.my_type( tc.column_name, null ) from dba_tab_columns tc where tc.owner='SYS' and tc.table_name='DBA_TABLES';
    --Should be noted there are no errors occured here* 16:56:00 SQL>
    16:57:57 SQL> select system.my_type(
    16:59:14 2 v.view_name,
    16:59:20 3 cast( multiset (
    16:59:26 4 select
    16:59:31 5 tc.column_name,
    16:59:36 6 null
    16:59:45 7 from dba_tab_columns tc
    16:59:51 8 where tc.table_name=v.view_name
    16:59:56 9 and tc.owner=v.owner ) as system.my_type_list ) )
    17:00:01 10 from dba_views v
    17:00:06 11 where v.view_name = 'DBA_TABLES';
    tc.column_name,
    ERROR at line 5:
    ORA-00932: inconsistent datatypes: expected UDT got CHAR
    17:00:14 SQL>

    create or replace type t_lookuprec as object
    (Select columns1,2,3,....100
    FROM A, B, C, D, E
    WHERE ROWNUM < 1);You are correct that you need to use CREATE TYPE to use the type in SQL.
    However unless I am mistaken you appear to have invented your own syntax for CREATE TYPE, suggest you refer to Oracle documentation.

  • Is it neccesary using certificate matrix data to use functions in R3?

    Hi.
    I create sap r3 471 ides version.
    And try to connect via the iway(third party product to call function via the RFC).
    When I try to connect r3, it says ID and password not correct.
    And I use Tcode STRUSTSSO2, found certificate, ACL are blank.
    If certificate and matrix are not neccesary,could you help me to solve this problem?
    If the certificate and matrix are neccesary, which parameter need I configure to call functions in sap r3 4.71 ides via the RFC?
    Thanks.

    Hi,
    I don't have knowledge about this third party software, but what my knowledge say is there must be proper mapping with SAP id and external ID.

Maybe you are looking for

  • My ipod touch 3rd gen. will not convert to widescreen on rotating the ipod since downloading os5. I restored in itunes but that didn't help.

    The problem started after updating the software to os5. I tried restoring in itunes but that didn't help. Is os5 or one of my apps causing the problem? Can I convert back to the previous operating system?

  • PG2A not able to connect to controllers on both sides

    We have side A and side B proggers in our test lab setup. In PG2A pgagent service, the following messages are displaying: 01:00:00 pg2A-pgag Connection to Central Controller side B established (medium priority). 01:00:00 pg2A-pgag Connection to Centr

  • Dashcode is crashing

    Hello, I need your help because dashcode crash at the startup. I think it was crashing when I removed a Dashcode project from the the native file. The dashcode project was removed but in dock, in the proposition of Dashcode the project is still there

  • Aperture Licensing Problem

    I'm in serious Deep S. I'm on the other side of earth from my license number which has suddenly decided to disappear. What should I do? How can I get my Aperture program to work? I just downloaded the Aperture update and it didn't fix it. Why did thi

  • Certificate based authencation logs

    We do have have certificate based authentication enabled using SCEP Profile which gets authenticated with one of our Win2K8 Certificate Server using root certificate. Do we have any option to check somewhere in the ISE logs to see if our users are us