• Welcome to the upgraded JDELIST forum and thank you for your patience.
    Please restrict discussions and issues regarding the new forum software to the Off Topic forum. We will be monitoring that forum for issues.
    If you have trouble logging in, please reset your password using the forgotten password form: https://www.jdelist.com/community/index.php?lost-password/
    If you are unable to successfully reset your password, please contact us: Click here!
    We hope that you enjoy the upgraded forum.
  • Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Determining Advanced Pricing without F4211 Edit Line


My company would like to have an advance pricing inquiry screen, that allows phone support to see the price of an item based upon Branch Plant, Customer, Item, and Quantity. I have gone through the F4211 Edit Line MBF and narrowed down the appropriate functions to CalculateSOMBFPriceCost. This function requires the Sale Order information in cache. Has anyone created, or is anyone aware of a function which performs advanced pricing outside of the F4211FSEditLine MBF?

Ben again

Have you tried P4074 (Advanced Check Price & Availability...menu G42112)? According to what your post says you need, this program should provide that without any need of coding.

One thing to note...it has a PO for version of order entry...make sure that gets set correctly.


How about the Advanced Price and Availability form? It does pretty much
what you want. The only problem is it doesn't accommodate fields from the
Order Detail Group that you may be using. I believe it does accommodate
Branch/Plant, however.

Andy Klee

Andy Klee
You can try using B4201500(Calculate Sales Prices And Costs). I have used it successfully in the past. I have attached a text file to tell you what parameters to use.



Thanks to Matt, Jeremy, and Gene for the help. The final answer that received approval is Matt's answer to use the BSFN B4201500 - Calculate Sales Prices and Costs. I had tried this function before but could not seem to find the necessary combination of parameters. Matt, your attachement was a great help. I did have to add one more parameter (Customer Price Group - PRGP) to avoid the "No Base Price in Effect" error sometimes.

Thanks to all for your help.
Ben again
Re: RE: Determining Advanced Pricing without F4211 Edit Line

Sorry Andy, I didn't get your response until 4:45 pm. The client wants to be able to sort on the advanced price, therefore, it must be a previously calculated field, which requires me to pull the BSFN into a custom screen based on a custom workfile.

Ben again
Hi there,
I have a batch that uses the B4201500 that goes in error.
The BSFN creates the cache and it looks like it never closes it. After few thousand records it crashes.

Any idea on what should be the right use for it?
I tried to follow Matt settings but is not working

It's been a few years since i worked with the pricing function, but here are some notes from an old project. In the sample code posted here, the CTID and JOBS values aren't populated. You'll want to populate those and pass them in your calls. At points in your UBE you'll need to clear the cache using B4500720.ProcessPriceAdjustmentListCache using Action Code 5 to delete and B4500720.ProcessPriceAdjustmentListCache using Action Code 8 to End the cache.

In our UBE the data was sorted by Customer Group and Item and we cleared the cache in a level break footer on the item number.

FYI: PatWel's free JDETrace tools allows you to see cache details from your debug log. I seem to remember finding this helpful to see caches which were being created but never cleared.

Good Luck,
I wrote my own using what F4211EditLine does

Pass in these 4
BC Item Number - Short (F4108.0) [ITM] -> mnIdentifierShortItem [ITM]
BC Business Unit (F4108.0) [MCU] -> szCostCenter [MCU]
BC Primary / Last Supplier Number (F4108.0) [VEND] -> mnAddressNumber [AN8]
VA rpt_jdDatetoUseDGLorTRDJ_DGL [DGL] -> jdDatePriceEffectiveDate [PEFJ]

NER: GTSAdvancedPriceBSFN
Event GUID: 24273e3e-47c9-462e-abc6-69a535db64d7
Data Structure: D554108A - GTS Advanced Price DSTR
BF mnIdentifierShortItem [ITM]
BF szCostCenter [MCU]
BF mnAddressNumber [AN8]
BF mnQuantity [QTY]
BF szTransactionUOM [UOM]
BF szPricingUOM [UOM4]
BF jdDatePriceEffectiveDate [PEFJ]
BF mnPricePerUnitUPRC [UPRC]
BF mnAmountExtendedPriceAEXP [AEXP]
BF mnAmtListPricePerUnitLPRC [LPRC]
BF szAgreementNoDMCT [DMCT]
BF mnDifferenceMATH01 [MATH01]

Event Level Variables
evt_LineTypeLNTY [LNTY]
evt_CompanyCO [CO]
evt_CurrencyCodeFromCRCD [CRCD]
evt_PriceAdjustmentScheduleASN [ASN]
evt_GroupCustomerPriceCPGP [CPGP]
00001 // Object Creation: John Danter 29/04/2014
00002 //
00003 // This BSFN will give back the various pirces an item may have on our system.
00004 // If Adv Prc is not setup the price is the base price
00005 //
00006 //
00007 // Setup defaults
00008 -If BF szAgreementNoDMCT [DMCT] is less than or equal to <Blank>
00009 | BF szAgreementNoDMCT [DMCT] = "ANY"
00010 End If
00011 -If BF szPricingUOM [UOM4] is less than or equal to <Blank>
00012 | BF szPricingUOM [UOM4] = "EA"
00013 End If
00014 -If BF szTransactionUOM [UOM] is less than or equal to <Blank>
00015 | BF szTransactionUOM [UOM] = "EA"
00016 End If
00017 -If BF mnQuantity [QTY] is equal to "0"
00018 | BF mnQuantity [QTY] = "1"
00019 End If
00020 -If BF jdDatePriceEffectiveDate [PEFJ] is equal to Null Date
00021 | BF jdDatePriceEffectiveDate [PEFJ] = SL DateToday
00022 End If
00023 //
00024 //
00025 -F4102.FetchSingle [Index 1: Branch, Item]
BF mnIdentifierShortItem [ITM] = TK Item Number - Short [ITM]
BF szCostCenter [MCU] = TK Business Unit [MCU]
VA evt_LineTypeLNTY [LNTY] <- TK Line Type [LNTY]
00026 //
00027 -RetrieveCompanyFromBusUnit(B0000130.RetrieveCompanyFromBusUnit)
BF szCostCenter [MCU] -> szCostCenter [MCU0]
VA evt_CompanyCO [CO] <- szCompany [CO]
00028 //
00029 -RetrieveCompanyCurrencyCode(B0000128.RetrieveCompanyCurrencyCode)
VA evt_CompanyCO [CO] -> szCompany [CO]
VA evt_CurrencyCodeFromCRCD [CRCD] <- szCurrencyCode [CRCD]
00030 //
00031 -GetSoldToBillingInstructions(B4200100.GetSoldToBillingInstructions)
BF mnAddressNumber [AN8] -> mnSoldToAddress [AN8]
VA evt_PriceAdjustmentScheduleASN [ASN] <- szAdjustmentSchedule [ASN]
VA evt_GroupCustomerPriceCPGP [CPGP] <- szCustomerPricingGroup [CPGP]
00032 //
00033 //
00034 -CalculateSalesPricesAndCosts(B4201500.CalculateSalesPricesAndCosts)
VA evt_PriceAdjustmentScheduleASN [ASN] -> szAdjustmentSchedule [ASN]
BF mnAddressNumber [AN8] -> mnAddressNo [AN8]
BF mnAddressNumber [AN8] -> mnShipToNo [SHAN]
BF mnIdentifierShortItem [ITM] -> mnShortItemNo [ITM]
VA evt_CurrencyCodeFromCRCD [CRCD] -> szBaseCurrencyCode [CRDC]
VA evt_CurrencyCodeFromCRCD [CRCD] -> szCustomerCurrencyCode [CRCD]
BF mnPricePerUnitUPRC [UPRC] <- mnUnitPrice [UPRC]
BF mnAmountExtendedPriceAEXP [AEXP] <- mnExtendedPrice [AEXP]
BF mnAmtListPricePerUnitLPRC [LPRC] <- mnListPrice [LPRC]
BF szCostCenter [MCU] -> szBranchPlantDtl [MCU]
VA evt_CompanyCO [CO] -> szCompany [CO]
BF mnQuantity [QTY] -> mnQtyShipped [SOQS]
"0" -> mnQtyBackOrdered [SOBK]
"0" -> mnQtyCanceled [SOCN]
BF mnQuantity [QTY] -> mnQtyOrdered [UORG]
BF szTransactionUOM [UOM] -> szTransactionUom [UOM]
BF szPricingUOM [UOM4] -> szPricingUom [UOM4]
BF jdDatePriceEffectiveDate [PEFJ] -> jdPriceEffectiveDate [PEFJ]
VA evt_GroupCustomerPriceCPGP [CPGP] -> szCustomerPricingGroup [PRGP]
"1" -> cSuppressWriteToWF [EV04]
"0" -> mnDiscountTrade [TRDC]
VA evt_LineTypeLNTY [LNTY] -> szLineType [LNTY]
BF szAgreementNoDMCT [DMCT] -> szAgreementNo [DMCT]
"1" -> cSuppressCostRetrieval [EV07]
00035 //
00036 //
00037 BF mnDifferenceMATH01 [MATH01] = [BF mnAmountExtendedPriceAEXP [AEXP]]-[BF mnAmtListPricePerUnitLPRC [LPRC]]
00038 //
00039 //
00040 //