cancel
Showing results for 
Search instead for 
Did you mean: 

DOE Distribution Rule/Dependency Query

Former Member
0 Kudos

Hello All,

We have a requirement where we need to bring down the Products for a user where:

1) The user is the creator of the Product (standard rule, no change).

2) A custom field for Product Category (zprodcat) has the same value as a Custom filed on MAS_PARTNER header (zsegment).

The value of custom field zsegment is based on the mobile user ID (this value is filled up on MAS_PARTNER header table using BAPI wrapper).

Now my question is, what will be the rule i have to create as per point 2 above? what i am trying out is creating a dependency between MAS_PRODUCT and MAS_PARTNER with Partner being the leading object and so distributing products based on the custom field values as explained above. But i am confused if that will provide me the desired results. will this dependency override the standard rule and only bring down the products as per point 2 or will it consider both the points when showing the list of products?

If you have any hints/suggestions, please let me know.

Thanks,

Gaurav

Accepted Solutions (0)

Answers (1)

Answers (1)

sivasatyaprasad_yerra
Active Contributor
0 Kudos

I didn't understand the 2nd requirement completely. Could you explain in detail?

Dependency will not override the distribution rule which is created for 1st requirement.

Data set is calculated based on OR condition between distribution rule and dependency.

Data set is calculated based on AND condition between dependency and it's own dependency rules.

Regards,

Siva.

Former Member
0 Kudos

Hello Siva,

Thank you for your reply.

here are the details:

We want to distribute the products based on 2 criteria:

1) The standard rule for product distribution (in place)

2) In COMM_HIERARCHY, we have each product hierarchy(8 custom hierarchies) assigned to a product category (for eg PP1, PP2...). Now, Each user is also assigned a segment value (from PP1, PP2..). We want to create a distribution rule or dependency such that if the user has segment PP1 assigned, then he/she should also get the products that has the product category PP1. both these fields, product category and user segment are filled up in custom fields on MAS_PRODUCT and MAS_PARTNER ET_HEADERs respectively. so basically, bring down the products where zprodcat (field on MAS_PRODUCT) value is the same as the zsegment (field on MAS_PARTNER).

for eg. Prod: 00102001 has Prod Hierarchy: ZVEND having prod category PP2 (zprodcat on ET_PROD_HEADER)

Prod: 00102002 has Prod Hierarchy: ZVEND having prod category PP2 (zprodcat on ET_PROD_HEADER)

Prod: 00110002 has Prod Hierarchy: ZSEND having prod category PP4 (zprodcat on ET_PROD_HEADER)

User: USER001 assigned to segment PP2 (zsegment on ET_BUPA_HEADER)

in this case, the user USER001 should see the list of products (00102001 & 00102002, in the eg above) that has the category PP2.

Please let me know if you need more information regarding the issue. Thanks a lot for your replies.

Regards,

Gaurav

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Yes. You can create dependency between these two data objects. You will get data because of distribution rule as well as dependency.

Former Member
0 Kudos

Thanks Siva,

So what i am trying out is:

Create dependency between MAS_PARTNER and MAS_PRODUCT where MAS_PARTNER is the leading DO and MAS_PRODUCT is the following DO with the condition that the values in the 2 Z fields match.

I'll update the post here once i am done with this test. But do you think this is the right way to go for the kind of issue i have?

Thanks for your time and hints,

Gaurav

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Yes. Whatever you are doing the correct way. Please go ahead. It should work without any issues.

Former Member
0 Kudos

Hello Siva,

Thanks for the reply.

My issue is, i dont have partner field on the MAS_PRODUCT DO, so how will i create the dependency between MAS_PARTNER and MAS_PRODUCT? can you please provide some insights if this is possible? what i am trying is to create a node association between MAS_PARTNER header and MAS_PRODUCT header nodes on MAS_PRODUCT 'Node Associations' tab.

When doing that, it asks for the partner field on MAS_PRODUCT, which we dont have. i thought we need to create this node association before creating the actual dependency between the 2 objects. Please correct me if i am wrong.

Thanks,

Gaurav

sivasatyaprasad_yerra
Active Contributor
0 Kudos

If you don't have mapping fields then you can't create the dependency. You can either use subscription generation object concept or device attibute mapping rules.

Subscription generation - [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90709d81-23d5-2d10-958f-cd1cd9be976b]

In this case, you need to generate the product category from CRM system into subscription generation object and the same should be used in rule creation.

Device attribute mapping rule - [http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16900] [original link is broken] [original link is broken];

Regards,

Siva.

Former Member
0 Kudos

Hello Siva,

You are right, i will have to use one of the 2 options you mentioned.

I believe what we have to do is:

1) Create the Z field on subgen DO (MAS_EMPLOYEE_SUBGEN) and fill it up using user in BAPI wrapper in the delta load.

2) Extend MAS_PRODUCT and create a child node for product categories and fill it.

3) Create a dynamic rule between subgen DO and MAS_PRODUCT similar to the rule we thought to create based on partner and product DO.

I'll update the post once i am done with trying this out.

Thanks again and wish you a very happy new year!

Regards,

Gaurav

Former Member
0 Kudos

Hello,

I was able to create the following:

1) Child Node on Employee SubGen Object to handle multiple User Segments assigned to a user (updated req from above where we had only 1 user segment per user).

2) Child Node on Product DO for Product Categories.

3) Normal Rule on Product DO to handle the product distribution based on the Employee SubGen DO.

So, I have a rule between the 2 child nodes, Employee SubGen - User Segments and Product - Product Categories and the Employee SubGen field for UserID is linked with the Device UserID.

My question is, how will the rule evaluate the records? will the system be able to evaluate the many-to-many relationship between the 2 child nodes and also distribute the header information for products evaluated?

For Eg.: PROD001 - PP1 (Product Categories Child Node) on DO MAS_PRODUCT

PROD001 - PP2

PROD001 - PP4

PROD002 - PP2

PROD002 - PP3

PROD002 - PP4

PROD003 - PP5

PROD003 - PP6

USER001 - PP1 (User Segment Child Node) on SubGen DO MAS_EMPLOYEE_SUBGEN

USER001 - PP3

USER002 - PP3

USER002 - PP5

USER003 - PP7

In this case, USER001 should be able to see only PROD001 and PROD002.

USER002 should be able to see only PROD002 and PROD003.

USER003 should not see any products.

Thanks for your time and replies!

Regards,

Gaurav

Former Member
0 Kudos

Thanks Siva, i went ahead with the development/config as mentioned above and was able to resolve the distribution rule.

Regards,

Gaurav