This website is not affiliated with, sponsored by, or approved by SAP AG.

Referencing the BOM component in a selection condition

Logistics : PP

Moderators: Snowy, thx4allthefish, Ha Tran

Referencing the BOM component in a selection condition

Postby iamnotcreative » Mon Jun 17, 2013 3:01 pm

Hello,

The company I work for allows customers to pick the case their material comes in. We have a Super BOM tied to the configurable material that defines each item, and on this BOM we have all of the cases listed out with selection conditions like the following:

101 Material 12300000 Sel_Condition_Case1 = ($root.case = '12300000')
102 Material 12400000 Sel_Condition_Case2 = ($root.case = '12400000')
103 Material 12500000 Sel_Condition_Case3 = ($root.case = '12500000')

In my mind it should be possible to reference the BOM item I'm currently deciding to select and use a characteristic to do my comparison so I'd have the following:
101 Material 12300000 Sel_Condition_Case = ($root.case = MDATA $self.bom_item)
102 Material 12400000 Sel_Condition_Case = ($root.case = MDATA $self.bom_item)
103 Material 12500000 Sel_Condition_Case = ($root.case = MDATA $self.bom_item)

where I'd only have 1 selection condition instead of three. In looking around the web I've done the following:

1. Created a characteristic called BOM_ITEM that is a reference of STPO-IDNRK. This isn't attached to anything as my cases aren't configurable.

2. Created a generic selection condition like the above ('0000000000' || $root.case = MDATA $self.bom_item).

This kind of works: if the case to be selected is the first case in the BOM it selects it just fine; if it's the second or above it ignores it completely. This to me seems like when $self.bom_item is being set in the first selection condition it's keeping that value through the subsequent condition calls.

Is what I'm trying to do even possible and if so how do I go about doing it?

Thanks.
iamnotcreative
 
Posts: 2
Joined: Thu Jun 06, 2013 12:33 pm

Re: Referencing the BOM component in a selection condition

Postby Sharpshooter » Tue Jun 18, 2013 6:05 am

I have used this technique many times successfully - it should work exactly the way you are doing it.
Code: Select all
$parent.case = MDATA $self.bom_item

Be careful using $root vs $parent in cases of multi-level structures!

You should run a configuration trace to see what the problem is.
Good luck!
Sharpshooter
 
Posts: 1171
Joined: Wed Mar 17, 2010 12:01 pm
Location: In the dark

Re: Referencing the BOM component in a selection condition

Postby iamnotcreative » Tue Jun 18, 2013 11:40 am

Sharpshooter wrote:I have used this technique many times successfully - it should work exactly the way you are doing it.
Code: Select all
$parent.case = MDATA $self.bom_item

Be careful using $root vs $parent in cases of multi-level structures!

You should run a configuration trace to see what the problem is.


Thank you for the configuration trace suggestion; it turns out the account I was using was misconfigured causing it to fail. Switching to another customer solved my issue.
iamnotcreative
 
Posts: 2
Joined: Thu Jun 06, 2013 12:33 pm


Return to Logistics PP

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.