Calculate Sales Price / Costs Performance Issues?

DBohner-(db)

Legendary Poster
Ugh!,

I'm using B4201500 (CalculateSalesPricesAndCosts) to calc several price breaks per a list of items. Basically, QTYs 1, 2, 5, 10, 25, 50, 100 & 250.

In my test I have 20 items with 8 calculations for each - or 160 total calls to the function on the report. I'm killing the report after 30 minutes - I can't fathom that the running pricing eight times for each of the 20 items can take that long???

I'm seeing "Unterminated cache" errors on the ProcessPriceAdjustmentListCache at line 337 - am I getting a memory leak?

I'm sure one of you has done something like this before - it should be simple repetition, right???

Thoughts on how to improve the performance and/or any suggestions?

(db)
 
Dan,
Are you doing any pre-processing prior to calling that function? By that, I mean that function is not an entirely stand-alone function. It does require that some pre-processing be done as it expects certain input parameters to already have values...like the F4101 and F4102 pointers. If memory serves... that function actually frees the memory for those pointers that are presumed to have been allocated prior to making that call. If you're not passing valid pointers for those two parms, you will very likely run into memory issues.

Can you post your BSFN call so we can see the parameter mappings?
 
What release are you on? This feature is built in past 8.12. It's the Price Book app and UBE.
 
Current client is on 9.1 - what's the Price Book App ID?

I had found a couple examples, more/less lead me to the following:

00001 //
00002 F4101.FetchSingle [Index 1: Item Master]
BC Item Number - Short (F4102.0) [ITM] = TK Item Number - Short [ITM]
VA evt_LineType_LNTY [LNTY] <- TK Line Type [LNTY]
00003 //
00004 // Fetch Costs from F4105
00005 VA evt_LedgType [LEDG] = "07"
00006 F4105.FetchSingle [Index 1: Item No,Branch, +A]
BC Item Number - Short (F4102.0) [ITM] = TK Item Number - Short [ITM]
BC Business Unit (F4102.0) [MCU] = TK Business Unit [MCU]
VA evt_LedgType [LEDG] = TK Cost Method [LEDG]
RV Unit Cost [UNCS] <- TK Amount - Unit Cost [UNCS]
00007 //
00008 // Fetch Pricing Information
00009 //
00010 -RetrieveCompanyFromBusUnit(B0000130.RetrieveCompanyFromBusUnit)
BC Business Unit (F5641011.0) [MCU] -> szCostCenter [MCU0]
VA evt_Company [CO] <- szCompany [CO]
00011 -RetrieveCompanyCurrencyCode(B0000128.RetrieveCompanyCurrencyCode)
VA evt_Company [CO] -> szCompany [CO]
VA evt_CurrencyCodeFrom [CRCD] <- szCurrencyCode [CRCD]
00012 -GetSoldToBillingInstructions(B4200100.GetSoldToBillingInstructions)
PO mnShipToCustomerID [SHAN] -> mnSoldToAddress [AN8]
VA evt_PriceAdjustmentSched_ASN [ASN] <- szAdjustmentSchedule [ASN]
VA evt_GroupCustomerPriceGp_CPGP [CPGP] <- szCustomerPricingGroup [CPGP]
00013 //
00014 //
00015 // Quantity 1
00016 -CalculateSalesPricesAndCosts(B4201500.CalculateSalesPricesAndCosts)
VA evt_PriceAdjustmentSched_ASN [ASN] -> szAdjustmentSchedule [ASN]
<blank> -> mnAddressNo [AN8]
PO mnShipToCustomerID [SHAN] -> mnShipToNo [SHAN]
BC Item Number - Short (F4102.0) [ITM] -> mnShortItemNo [ITM]
VA evt_CurrencyCodeFrom [CRCD] -> szBaseCurrencyCode [CRDC]
VA evt_CurrencyCodeFrom [CRCD] -> szCustomerCurrencyCode [CRCD]
"Z" -> cCurrencyConversionMethod [CRCM]
RV Price 1 <- mnUnitPrice [UPRC]
BC Business Unit (F5641011.0) [MCU] -> szBranchPlantDtl [MCU]
VA evt_Company [CO] -> szCompany [CO]
"1.0000" -> mnQtyShipped [SOQS]
"0" -> mnQtyBackOrdered [SOBK]
"0" -> mnQtyCanceled [SOCN]
"1.0000" -> mnQtyOrdered [UORG]
"EA" -> szTransactionUom [UOM]
"EA" -> szPricingUom [UOM4]
PO jdPricingExpirationDate [JDATE] -> jdPriceEffectiveDate [PEFJ]
VA evt_GroupCustomerPriceGp_CPGP [CPGP] -> szCustomerPricingGroup [PRGP]
"1" -> cSuppressWriteToWF [EV04]
"0" -> mnDiscountTrade [TRDC]
VA evt_LineType_LNTY [LNTY] -> szLineType [LNTY]
 
Menu G423114 has P45520 - Customer Price List. This app fires off the UBE that generates the price.

You need to be careful trying to gen prices outside of SOE. When you attempt this you are losing the ability to populate values determined by Preferences. You also lose the ability to award Order Detail Group adjustments.

The UBE is actually using EditLine to generate the prices, but obviously never saves the order.

If I were you, I'd let the above process generate the prices and grab the results from the output table.
 
Back
Top