Results 1 to 2 of 2

Thread: Issue using CBSFN "CalcDiscNoTax" B0000283

  1. #1

    Issue using CBSFN "CalcDiscNoTax" B0000283

    I encountered some strange behavior in this standard Cbsfn. I'm using JDE 9.2. There is a line of code which says "iDec = Decimals(&lpDS->mnAmountGross);"
    This is used to know the Decimal place of the variable. When i debug this BSFN i see that when ever this BSFN is called from F0411Editline, this piece of code works but when i call this BSFN from my own UBE or APP it wont work though the inputs are exactly same.
    For example you can test this BSFN(through Object browser) using these inputs:

    IN->[ 1] <Item>: szTaxRateArea <type>: STRING <Value>: [ ]
    IN->[ 2] <Item>: szTaxexplanationcode1 <type>: STRING <Value>: [ ]
    IN->[ 3] <Item>: szPaymentTermsCode <type>: STRING <Value>: [110]
    IN->[ 4] <Item>: mnAmountGross <type>: MATH_NUMERIC <Value>: [21847.60]
    IN->[ 5] <Item>: mnAmtDiscountAvailable <type>: MATH_NUMERIC <Value>: [.00]
    IN->[ 6] <Item>: mnRunTotalUnroundDisc <type>: MATH_NUMERIC <Value>: [0]
    IN->[ 7] <Item>: mnDiscountPercent <type>: MATH_NUMERIC <Value>: [.01000]

    and in the output we will expect mnAmtDiscountAvailable to be 218.47 but unfortunately it will always be 218.00. This happens when u test this bsfn from your own UBE or through Object Browser but will work fine when called from Edit line.

    Any hints why this might be happening. I also noticed while debugging that the code doesn't go through iDec Variable Declaration.

  2. #2
    Senior Member craig_welton's Avatar
    Join Date
    Oct 2000
    Location
    Litchfield, CT
    Posts
    1,025
    In ObjectBrowser, try setting the currency and decimals of the input values. Hit the $ option from the BSFN toolbar to show the columns (USD, 2 for example). If that works, then you need to do the same in your code. IIRC B1100007.DecimalsTriggerGetbyCOCRCD is the currency trigger attached to F0411.

    Craig
    Craig Welton
    PatWel Group Inc.
    http://www.patwel.com
    Home of the FREE JDE Object Browser, JDETrace, NERDup and BusBuild+ Tools

    E1 9.0 8.98.4.2 Wintel SQL 2008
    E1 9.2 9.2.1.4 iSeries

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.