cancel
Showing results for 
Search instead for 
Did you mean: 

Distribution Rule and Dependencies

Former Member
0 Kudos

Hello Everyone,

Recently I noticed a bug in our offline handheld application where node instances are being distributed to the device that should not be.

We have a data object Materials with three nodes as follows:

Root Node (BE key field Material Number)

Child1 (BE key fields Material Number and Plant)

Child2 (BE key fields Material Number, Plant and Storage Location)

We also have a data object of Plants that has a Distribution Model with a rule defining to distribute the plant defined by a custom attribute.

We then have dependencies from this DM that associate the Header Node of the Plants object to the Child1 Node of the Materials object based on field Plant.

Now, the problem is that the plant field is not in the header of the materials object so any material number that exists for multiple plants can have a count on a plant they shouldn't have the ability to.

Example:

ROOT NODE contains:

Material 1700

Child 1 contains:

Material 1700 for Plant Peter

Material 1700 for Plant Joseph

Child 2 contains:

Material 1700 for Plant Peter at location 3SA

Material 1700 for Plant Joseph at location CINV

Now my device says to distribute all materials for plant Peter.

However, I don't only get the Peter location but also the Joseph location. I'm guessing that because the dependency is on the first child that once it qualifies I get all children of the root.

Is there anyway around this? I hope this makes sense. It's difficult to explain. Any help would be greatly appreciated as always.

Thanks,

Alex

Edited by: Alex Van Luven on Jan 21, 2010 4:19 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alex,

You can try the following solution. You can right click on the dependancy created and create a rule for it. By doing so you can create a rule on any nodes of your following DO (i.e. Material here). While so creating a rule, you can specify whether it can be a constant or a device attribute(The attribute u have created in your custom group). Now you can define condition on your child node2 such that it only picks up data for plant specified by the custom attribute. BY doing so u are picking up the location for only a particular plan.

P.S: Make sure that ur dependancy is not checked for completeness before doing this. If checked, no rule can be created.

Best Regards, Pramod

Edited by: Pramod M on Jan 21, 2010 10:11 PM

Former Member
0 Kudos

Hi Pramod,

I attempted this and it did not work. I probably should mention that child2 is a child of child1.

My guess is that once it finds a match in child1 or 2 that it then takes that relating parent in the root along with all of the children associated to it.

I don't know if it's possible to select only particular children from a root instance.

Alex

Former Member
0 Kudos

Hi

The distribution rules and dependency modeling works on the full instance. That is irrespective of node (root or items) where it is modeled, if the corresponding records matches the modeling criteria, the corresponding full instance is distributed.

To limit this one can model node level filter rules on the particular node. With the filter rule only the records of the nodes ( provided instance is valid for receiver by any distribution rule or dependency) that satisfies the filter rule criteria are distributed. And only the related child node records of the distributed parent node record are distributed to receiver.

However this modeling has performance impact and so would suggest if you can find alternate data object modeling and associated distribution modeling then give a try to that as well.

regards

pradeep

Edited by: Pradeep Kumar Warrier on Jan 22, 2010 5:14 AM

Answers (0)