Get Unit Price of an item for a customer

Kishore03

Active Member
Hi,

I want to display item unit price for customer in a report .Is there any BSFN available to get unit price when i pass customer number,branch plant,item number and price effective date? .We are using advance pricing and unit price is depends on Item group and customer group setups with price effective date.Need help.

Thanks
Kishore
 
You could run F4211FSBeginDoc, F4211FSEditLine, then pull the unit price from the edit line then run F4211FSCancelDoc. OR dig into F4211FSEditLine and find the exact function
 
I created my own.
This is one that spits it out CalculateSalesPricesAndCosts(B4201500.CalculateSalesPricesAndCosts), but you have to pass in certain fields not always available to you.
So using GetSoldToBillingInstructions(B4200100.GetSoldToBillingInstructions) and a few others below, you can call the B4201500 in the same way the F4211 Edit line does :)


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 = [BF mnAmountExtendedPriceAEXP]-[BF mnAmtListPricePerUnitLPRC]
00038 //
00039 //
00040 //
 
Last edited:
HI,

I decide to fetch unit price using F4211 Edit Line,I pass the required parameters and still i am not able to get Unit Price,Please find the NER below and let me know if any changes required.

0010 F4211 Begin Document
VA rpt_mnJobNumber_JOBN <- BF mnCMJobNumber
"A" -> BF cCMDocAction
"1" -> BF cCMProcessEdits
VA rpt_mnWorkStationId_JOBN <> BF szCMComputerID
VA rpt_Error_EV01 <- BF cCMErrorConditions
"2" -> BF cCMUpdateWriteToWF
"R56IMS001" -> BF szCMProgramID
"STE0001" -> BF szCMVersion
VA rpt_szCompany_CO <> BF szOrderCo
"1" -> BF mnOrderNo
VA rpt_szOrderType_DCTO <> BF szOrderType
VA rpt_sz_BusinessUnit_MCU <> BF szBusinessUnit
PO mnAddressNumber -> BF mnAddressNumber
PO mnAddressNumber <> BF mnShipToNo
PO jdDateEffective -> BF jdRequestedDate
PO jdDateEffective -> BF jdOrderDate
PO jdDateEffective -> BF jdPromisedDate
"R56IMS001" -> BF szReference
"F" -> BF cMode
VA rpt_mn_CurrencyCode_CRCD <> BF szCurrencyCode
SL UserID -> BF szOrderedBy
SL UserID -> BF szOrderTakenBy
SL UserID -> BF szUserID
VA rpt_mn_CurrencyCode_CRCD <> BF szWKBaseCurrency
<Blank> -> BF cWKSourceOfData
VA rpt_mnProcessID_PEID <> BF mnProcessID
VA rpt_mnTransactionID_TCID <> BF mnTransactionID
0011 F4211 Edit Line
VA rpt_mnJobNumber_JOBN <> BF mnCMJobNo
"A" -> BF cCMLineAction
"1" -> BF cCMProcessEdits
"2" -> BF cCMWriteToWFFlag
VA rpt_mnWorkStationId_JOBN -> BF szCMComputerID
VA rpt_Error_EditLine_EV01 <- BF cCMErrorConditions
VA rpt_szCompany_CO -> BF szOrderCo
<Zero> -> BF mnOrderNo
VA rpt_szOrderType_DCTO <> BF szOrderType
VA rpt_mnLineNumber_LNID <> BF mnLineNo
VA rpt_sz_BusinessUnit_MCU <> BF szBusinessUnit
PO mnAddressNumber <> BF mnShipToNo
VA rpt_szIdentifier2ndItem_LITM <> BF szItemNo
BC Description (F4101)(DSC1) <> BF szDescription1
VA rpt_mnQty_Orderd_TRQT <> BF mnQtyOrdered
VA rpt_mnUnitPrice_UPRC <- BF mnUnitPrice
"1.000" -> BF mnCMLineNo
"R56IMS001" -> BF szCMProgramID
SL VersionName -> BF szCMVersion
<Blank> -> BF cWKSourceOfData
<Blank> -> BF cWKCheckAvailability
"4" <> BF mnWKSuppressProcess
BC Item Number - Short (F4101)(ITM) <- BF mnShortItemNo
VA rpt_jdDateUpdated_UPMJ <> BF jdPriceEffectiveDate
"1" -> BF cBypassCommitments
VA rpt_mnProcessID_PEID <> BF mnProcessID
VA rpt_mnTransactionID_TCID <> BF mnTransactionID
VA rpt_szSOEMBFInternalFlags_SEOF -> BF szSOEMBFInternalFlags
0012 F4211 Delete Work File
VA rpt_mnJobNumber_JOBN -> BF mnJobNo
VA rpt_mnWorkStationId_JOBN -> BF szComputerID
<Zero> -> BF mnFromLineNo
<Zero> -> BF mnThruLineNo
"2" X BF cClearHeaderWF
"2" X BF cClearDetailWF
"R56IMS001" -> BF szProgramID
SL VersionName -> BF szCMVersion
VA rpt_mnProcessID_PEID <> BF mnProcessID
VA rpt_mnTransactionID_TCID <> BF mnTransactionID

Regards
Kishore
 
Back
Top