Kits - Alocating revenue to components in stead of parents

Aarto

Aarto

Reputable Poster
Hi all!

We have follwing problem.
We will set up simple kits with BOM of, say, 3 items.
The component items will each have their own G/L class.
We will set up the kit price on parent item (no price rollup)

What happens is that when the kit components is pulled back to F4211, the G/L class of each component is copied from the kit parent in stead of each individual item.

also, we want to allocate revenue to each component and, if there is a remainder between component prices and kit parent price, the remainder (and only the remaninder) would be allocated to the kit parent. This is done to get statistics on revenues and margins on the components.

So far i have not been able do this using standard solution.
(enforce component G/L class on F4211 or allocate revenue/prices on components) so i have started on a modification request to achieve this.
Basically we will be running a UBE after invoice print to retrieve the G/L class and base price of each component and update this on the kit lines in F4211. Also, necessary columns such as margin and extended price will be recalculated. The remainder between the "rolled up" price of components and the original kit parent price will be updated on the kit parent line.

This UBE will write a sales ledger record before anything is done (to be used for credits/debits from history)

Has anyone else tried anything similar or is there, perhaps, a standard solution for any of this?

E1 8.9 SP 4
Windows NT
 
The concept behind a kit is that it is a pseudo-item and that is why the GL class is changed to match the kit parent.
It appears what you want is a "parts list". Would templates be helpful? maybe free goods?
 
Hi Aarto,
JDE doesnt have the concept of a "component" kit only a "parent item" kit. However you may want to take a look at using the configurator and add lines using the "P" rules. This coupled with status flow to "get rid" of the CFG item should give you something close.

I hope this helps!

Warm regards

Peter
 
Aarto-

I can't help with a standard solution but, here is how I have accomplished something similar in the past.


1.Goal
Allow finance department to have visibility to the Sales dollars in the GL for Metal when on kits. Those sales dollars should be broken out for Advanced pricing as needed
2.Requirement
Modify Sales Update (R42800) and associated BSFN’s so that Sales Dollars are not calcuated at the Parent Item (Kit) level, but instead at the Component Item (Kit) level. This needs to do controllable as not all Companies, Order types will want this functionality. This needs to also validate that the Kit has a kit pricing method of ‘1’ (meaning that the parent Item price is based on the Component Item Prices). When this functionality is not wanted then standard processing should run.

Conditions
Allow control of this functionality by Company and Order Type (sales order, not invoice)
3.Test Plan
Run Order(s) with and without kits. In first set of testing have functionality turned on, and in second set have it turned off. Validate results with finance team.
4.General solution
4.1.Literal Logic

There are three pieces of the code that were created or modified for this functionality.
First a BSFN (N5542805) was created (new) to validate the Sales Detail line to see if it meets the setup criteria (UDC 55/KS) and also to see if it is a kit item and how the parent item is priced, and if advanced pricing should be used. If the item is the parent item, and it is priced based on kits then the BC Amount Extended Price is set to 0. If the line is a Component Item , the BC Amount Extended Price is set to Unit Price * Quantity. The code is:
======================================================================
NAMED ER: Split Sales to all component lines for Parent LIne
=======================================================================
evt_LineType
evt_MethodOfPriceCalcula
evt_IdentifierShortItemKITP
evt_UserDefinedCode
evt_ErrorID
evt_SpecialHandlingCode
0001 //
0002 // T55AMW0005 Sales Kit Split by AMW July 16,2003
0003 //
0004 // Set return code to default of zero
0005 BF c1Parent2Component0none = "0"
0006 // Concatenate Company and Order type together to match against UDC (Default is
0007 // 55/KS)
0008 VA evt_UserDefinedCode = concat([BF szCompanyKeyOrderNo],[BF szOrderType])
0009 // Check to see if concatenated field matches any UDC values
0010 Get UDC
UNDEFINED X szDataDictionaryItem
BF szProductCode -> szSystemCode
BF szUserDefinedCodes -> szRecordTypeCode
VA evt_UserDefinedCode -> szUserDefinedCode
UNDEFINED X mnKeyFieldLength
UNDEFINED X szLanguagePreference
UNDEFINED X szDescription001
UNDEFINED X szDescription002
VA evt_SpecialHandlingCode <- szSpecialHandlingCode
UNDEFINED X cUdcOwnershipFlag
UNDEFINED X cHardCodedYn
"1" -> cSuppressErrorMessage
VA evt_ErrorID <- szErrorMessageId
UNDEFINED X cUDCOne
0011 //
0012 If VA evt_ErrorID is less than or equal to <Blank>
0013 // Match Found in UDC table so continue processing
0014 F4101.Fetch Single
BF mnIdentifierShortItem = TK Item Number - Short
VA evt_LineType <- TK Line Type
VA evt_MethodOfPriceCalcula <- TK Method - Kit Pricing
0015 If VA evt_LineType is equal to "K"
And VA evt_MethodOfPriceCalcula is equal to "1"
0016 // Line is Parent Item (Kit) and is priced based on components
0017 BF mnAmountExtendedPrice = "0"
0018 BF c1Parent2Component0none = "1"
0019 Else
0020 If BF szItemNumberRelatedKit is greater than <Zero>
And BF mnUnitsQuantityShipped is not equal to <Zero>
0021 // Line is Kit
0022 VA evt_IdentifierShortItemKITP = [BF szItemNumberRelatedKit]
0023 F4101.Fetch Single
VA evt_IdentifierShortItemKITP = TK Item Number - Short
VA evt_LineType <- TK Line Type
VA evt_MethodOfPriceCalcula <- TK Method - Kit Pricing
0024 If VA evt_LineType is equal to "K"
And VA evt_MethodOfPriceCalcula is equal to "1"
0025 // Line is Kit, whose Parent Item (Kit) is priced based on components
0026 BF mnAmountExtendedPrice = [BF mnAmtPricePerUnit2]*[BF mnUnitsQuantityShipped]
0027 If VA evt_SpecialHandlingCode is equal to "1"
0028 BF c1Parent2Component0none = "3"
0029 Else
0030 BF c1Parent2Component0none = "2"
0031 End If
0032 End If
0033 End If
0034 End If
0035 Else
0036 // not in UDC so dont do ay special processing
0037 End If
0038 // Will return following codes
0039 // 0 = not part of kit
0040 // 1 = Parent Item
0041 // 2 = Component Item break out Advanced Pricing
0042 // 3 = Component Item do NOT break out Advanced Pricing
The second piece was a Modification to the Sales Update Program (R42800). In this Mod we call the custom BSFN above (N5542805) returning both the new extended Price and the return Code. If the return code is a ‘2’ then the related Item Number (KIT) field is set to ‘AMW’. The Code ‘2’ means that advacned pricing should be used at the component level, a return code of a ‘3’ indicates that advanced pricing SHOULD NOT be used. Code is below, note this should happen at the top of the do event in the main driver section. Lines in red are added.

0001 // ########################################
0002 // FIRST PASS THROUGH F4211 RECORDS
0003 // ########################################
0004 // SAR#2851669, 7/6/99, Added code to validate Geocode and have a condition
0005 // arround vertex logic based on this flag.
0006 Validate GeoCode
BC Tax Expl Code 1 -> szTaxExplanationCode
BC Tax Rate/Area -> szTaxRateArea
VA sec_cValidateGeoCode <- cGeoCodeValid
UNDEFINED -> cDeleteGeoCodeCache
0007 // End SAR#2851669, 7/6/99
0008 //
0009 // T55AW0005 Revesion 0 by AMW on July 16,2003
0010 // Begin logic for Splitting out Sales of Kit Lines
0011 //
0012 Split Sales to all component lines for Parent LIne
BC Order Type -> szOrderType
BC Order Company (Order Number) -> szCompanyKeyOrderNo
BC Item Number - Short -> mnIdentifierShortItem
BC Amount - Price per Unit -> mnAmtPricePerUnit2
BC Amount - Extended Price <> mnAmountExtendedPrice
BC Quantity Shipped -> mnUnitsQuantityShipped
BC Item Number - Related (Kit) -> szItemNumberRelatedKit
"55" -> szProductCode
"KS" -> szUserDefinedCodes
VA evt_Kitsplit10 <> c1Parent2Component0none
0013 If VA evt_Kitsplit10 is equal to "2"
0014 BC Item Number - Related (Kit) (F4211) = "AMW"
0015 End If
0016 //
0017 // End logic for Splitting out Sales of Kit Lines
0018 //

The final piece is a modification to the Get Sales AAI and call F0911 Edit Line BSFN (B4200520). This change was needed so taht advanced pricing would be used on kit comonent lines. The Lines in Red were added at line # 1263.

if(jdestrcmp((char *)(lpDS->szRelatedItemNumber), (char *) ("AMW")) == 0 )
{
strcpy((char *)lpDS->szRelatedItemNumber, " ");
}
if(lpDS->cPriceOverrideCode == '1' &&
dsAdvPricing.cBlanketOrder == 'F' &&
MathCompare(&lpDS->mnTransactionQuantity, &mnZero) >= 0 ||
lpDS->cPriceOverrideCode == '1' &&
dsAdvPricing.cBlanketOrder == 'F' &&
MathCompare(&lpDS->mnTransactionQuantity, &mnZero) < 0 &&
!IsStringBlank(lpDS->szOrigOrderNumber) ||
!IsStringBlank(lpDS->szRelatedItemNumber) ||
lpDS->cAdvPricing != 'Y' )



4.2.Flow Logic (UML)
See section 4.2.1 for detail Logic flow
4.2.1.Conceptual Flow
The R42800 do event, driver section first calls custom BSFN N5542805, then calls Modified BSFN B4200520.
4.2.2.Conceptual Database
No new tables were created
4.3.Physical Structure(UML)
4.3.1.Data Tier list
No new/modified Data tier objects
4.3.2.Middle/Business Tier list
N5542805 – Kit Split Lines. This BSFN determines if the line is eligible, and if so sets the Extended Price to the correct value, also returns flag
D5542805 – Data Structure for above BSFN.
B4200520-Modified BSFN. See code above. Code should always occur before the advanced pricing routine tests the szrelatedItemNumber but after the Advanced Price Init function is called.
4.3.3.User Tier list
R42800 – Was modified. See code above.
UDC 55/KS was created. Value should be order company and order type concatenated together into string. Description is informational only. Special handling determines if advanced pricing is used on the component level. If the special handling flag is set to a ‘1’ then advanced pricing will be used, any other value in the special handling code will result in advanced pricing NOT be used.

5..Developer’s Instructions for User’s
Set up UDC 55/KS is required. See section “User tier List 4.3.3” for details on setup and uses of this UDC table.
 
Back
Top