MikeS
Member
Hello JDEList,
I have been struggling with the two BSFNs over the past three days trying to get them to work. This is on E8.12 on an AS400 V5R3 OS. I want to obtain a total Sales Tax Rate for a customer based on his ship to zip code. I am using B4000050 to load the vertex cache and then B4001090 to retrieve (I hope) the Tax Rate(s) and Sales Tax amounts. I have found one example where the two BSNFs are used and have tried to fill them in accordingly. However the error code returned from from B4001090 is always 1 and all variables that I try to retrieve data with keep staying at "0".
Here is the code:
0164 If VA rpt_TaxArea1_TXA1 is not equal to <Blank>
0165 VA rpt_Company_CO = "00101"
0167 VA sec_TaxExplanationCode1_EXR1 = "S "
0168 VA sec_TaxArea1_TXA1 = [VA rpt_TaxArea1_TXA1]
0169 VA rpt_PaymentTermsCode01_PTC = "A"
0170 VA rpt_IdentifierShortItem_ITM = "359860SS"
0171 VA rpt_UnitsPrimaryQtyOrder_PQOR = "5000"
0172 VA rpt_AmountTaxable_ATXA = "187.50"
0173 VA sec_TaxableYN_TAX1 = "Y"
0175 Load and Retrieve Vertex Cache
"2" -> BF cCalledFromFlag
VA rpt_AddressNumber_AN8 -> BF mnSupplierOrShipTo
VA rpt_Date01_DATE01 -> BF jdDateTransactionJulian
"00101" -> BF szCompany
" 101" -> BF szHeaderBranchPlant
" 101" -> BF szDetailBranchPlant
VA rpt_JobnumberA_JOBS <> BF mnJobnumberA
"1" -> BF cModeProcessing
<Zero> -> BF cWriteRegisterFlag
VA rpt_IdentifierShortItem_ITM -> BF mnIdentifierShortItem
"SO" -> BF szOrderType
"S" -> BF szLineType
VA sec_TaxArea1_TXA1 <> BF szShipToGeoCode
"10801532" -> BF mnDocumentOrderInvoiceE
"00101" -> BF szCompanyKeyOrderNo
"000" -> BF szOrderSuffix
"1.000" -> BF mnLineNumber
VA sec_TaxableYN_TAX1 -> BF cTaxableYN
0176 Tax, Calculate for Sales and Purchasing
VA sec_TaxArea1_TXA1 -> BF szTaxArea1
VA sec_TaxExplanationCode1_EXR1 -> BF szTaxExplanationCode1
VA rpt_Date01_DATE01 -> BF jdTransactionDate
VA rpt_PaymentTermsCode01_PTC -> BF szPaymentTermsCode1
"00101" -> BF szCompany
VA rpt_IdentifierShortItem_ITM -> BF mnShortItemNumber
VA rpt_UnitsPrimaryQtyOrder_PQOR -> BF mnUnitsPrimaryQtyOrder
VA rpt_AmountTaxable_ATXA -> BF mnAmountTaxable
VA rpt_AmtTax2_STAM <- BF mnAmtTax2
VA sec_AmtDiscountAvailable_ADSC <- BF mnAmtDiscountAvailable
VA sec_TaxRate01_TRATE01 <- BF mnTaxRate1
VA sec_TaxRate02_TRATE02 <- BF mnTaxRate2
VA sec_TaxRate03_TRATE03 <- BF mnTaxRate3
VA sec_TaxRate04_TRATE04 <- BF mnTaxRate4
VA sec_TaxRate05_TRATE05 <- BF mnTaxRate5
VA sec_TaxAuthority1A_TA1 <- BF mnTaxAuthority1A
VA sec_TaxAuthority2_TA2 <- BF mnTaxAuthority2
VA sec_TaxAuthority3_TA3 <- BF mnTaxAuthority3
VA sec_TaxAuthority4_TA4 <- BF mnTaxAuthority4
VA sec_TaxAuthority5_TA5 <- BF mnTaxAuthority5
VA sec_TaxCalculationMethod_TXAV <- BF cTaxCalcMethod2
VA sec_TaxTypeForInterm3_T003 <- BF cTaxType3
VA sec_TaxTypeForInterm4_T004 <- BF cTaxType4
VA sec_TaxTypeForInterm5_T005 <- BF cTaxType5
VA sec_DescriptionBR_BDS4 <- BF szDescriptionTaxArea
VA sec_TaxRate10_TRATE10 <- BF mnTotalAreaTaxRate
VA sec_FactorValueMethod_FVMD <- BF cFactorValueType
VA sec_ErrorCode_ERRC <- BF cErrorCode
"4" -> BF cSystemCode
VA rpt_JobnumberA_JOBS -> BF mnJobnumberA
"1" -> BF cIsVertexActive
VA sec_Description_DESC <- BF szAuthority1Desc
VA sec_Description1_DESC01 <- BF szAuthority3Desc
VA sec_Description2_DESC02 <- BF szAuthority2Desc
VA sec_Description3_DESC03 <- BF szAuthority5Desc
VA sec_Description4 <- BF szAuthority4Desc
"10801532" -> BF mnDocumentOrderInvoiceE
"SO" -> BF szOrderType
"00101" -> BF szCompanyKeyOrderNo
"000" -> BF szOrderSuffix
"1.000" -> BF mnLineNumber
0178 End If
Any help is greatly appreciated. There have not been many posts here in the Vertex Forum but since this clearly is a Vertex item I did not want to double post this also in the regular Developer Forum. I am hoping still to receive some feedback here. Thank you for your time.
Mike
E8.12 - AS400 V5R3
I have been struggling with the two BSFNs over the past three days trying to get them to work. This is on E8.12 on an AS400 V5R3 OS. I want to obtain a total Sales Tax Rate for a customer based on his ship to zip code. I am using B4000050 to load the vertex cache and then B4001090 to retrieve (I hope) the Tax Rate(s) and Sales Tax amounts. I have found one example where the two BSNFs are used and have tried to fill them in accordingly. However the error code returned from from B4001090 is always 1 and all variables that I try to retrieve data with keep staying at "0".
Here is the code:
0164 If VA rpt_TaxArea1_TXA1 is not equal to <Blank>
0165 VA rpt_Company_CO = "00101"
0167 VA sec_TaxExplanationCode1_EXR1 = "S "
0168 VA sec_TaxArea1_TXA1 = [VA rpt_TaxArea1_TXA1]
0169 VA rpt_PaymentTermsCode01_PTC = "A"
0170 VA rpt_IdentifierShortItem_ITM = "359860SS"
0171 VA rpt_UnitsPrimaryQtyOrder_PQOR = "5000"
0172 VA rpt_AmountTaxable_ATXA = "187.50"
0173 VA sec_TaxableYN_TAX1 = "Y"
0175 Load and Retrieve Vertex Cache
"2" -> BF cCalledFromFlag
VA rpt_AddressNumber_AN8 -> BF mnSupplierOrShipTo
VA rpt_Date01_DATE01 -> BF jdDateTransactionJulian
"00101" -> BF szCompany
" 101" -> BF szHeaderBranchPlant
" 101" -> BF szDetailBranchPlant
VA rpt_JobnumberA_JOBS <> BF mnJobnumberA
"1" -> BF cModeProcessing
<Zero> -> BF cWriteRegisterFlag
VA rpt_IdentifierShortItem_ITM -> BF mnIdentifierShortItem
"SO" -> BF szOrderType
"S" -> BF szLineType
VA sec_TaxArea1_TXA1 <> BF szShipToGeoCode
"10801532" -> BF mnDocumentOrderInvoiceE
"00101" -> BF szCompanyKeyOrderNo
"000" -> BF szOrderSuffix
"1.000" -> BF mnLineNumber
VA sec_TaxableYN_TAX1 -> BF cTaxableYN
0176 Tax, Calculate for Sales and Purchasing
VA sec_TaxArea1_TXA1 -> BF szTaxArea1
VA sec_TaxExplanationCode1_EXR1 -> BF szTaxExplanationCode1
VA rpt_Date01_DATE01 -> BF jdTransactionDate
VA rpt_PaymentTermsCode01_PTC -> BF szPaymentTermsCode1
"00101" -> BF szCompany
VA rpt_IdentifierShortItem_ITM -> BF mnShortItemNumber
VA rpt_UnitsPrimaryQtyOrder_PQOR -> BF mnUnitsPrimaryQtyOrder
VA rpt_AmountTaxable_ATXA -> BF mnAmountTaxable
VA rpt_AmtTax2_STAM <- BF mnAmtTax2
VA sec_AmtDiscountAvailable_ADSC <- BF mnAmtDiscountAvailable
VA sec_TaxRate01_TRATE01 <- BF mnTaxRate1
VA sec_TaxRate02_TRATE02 <- BF mnTaxRate2
VA sec_TaxRate03_TRATE03 <- BF mnTaxRate3
VA sec_TaxRate04_TRATE04 <- BF mnTaxRate4
VA sec_TaxRate05_TRATE05 <- BF mnTaxRate5
VA sec_TaxAuthority1A_TA1 <- BF mnTaxAuthority1A
VA sec_TaxAuthority2_TA2 <- BF mnTaxAuthority2
VA sec_TaxAuthority3_TA3 <- BF mnTaxAuthority3
VA sec_TaxAuthority4_TA4 <- BF mnTaxAuthority4
VA sec_TaxAuthority5_TA5 <- BF mnTaxAuthority5
VA sec_TaxCalculationMethod_TXAV <- BF cTaxCalcMethod2
VA sec_TaxTypeForInterm3_T003 <- BF cTaxType3
VA sec_TaxTypeForInterm4_T004 <- BF cTaxType4
VA sec_TaxTypeForInterm5_T005 <- BF cTaxType5
VA sec_DescriptionBR_BDS4 <- BF szDescriptionTaxArea
VA sec_TaxRate10_TRATE10 <- BF mnTotalAreaTaxRate
VA sec_FactorValueMethod_FVMD <- BF cFactorValueType
VA sec_ErrorCode_ERRC <- BF cErrorCode
"4" -> BF cSystemCode
VA rpt_JobnumberA_JOBS -> BF mnJobnumberA
"1" -> BF cIsVertexActive
VA sec_Description_DESC <- BF szAuthority1Desc
VA sec_Description1_DESC01 <- BF szAuthority3Desc
VA sec_Description2_DESC02 <- BF szAuthority2Desc
VA sec_Description3_DESC03 <- BF szAuthority5Desc
VA sec_Description4 <- BF szAuthority4Desc
"10801532" -> BF mnDocumentOrderInvoiceE
"SO" -> BF szOrderType
"00101" -> BF szCompanyKeyOrderNo
"000" -> BF szOrderSuffix
"1.000" -> BF mnLineNumber
0178 End If
Any help is greatly appreciated. There have not been many posts here in the Vertex Forum but since this clearly is a Vertex item I did not want to double post this also in the regular Developer Forum. I am hoping still to receive some feedback here. Thank you for your time.
Mike
E8.12 - AS400 V5R3