Rounding problem

kschumac

Member
I have a developped a custom report that create journal entries. This program work fine, but we realised that we have a rounding problem with the currency.

I use the functions F0911 Begin Document, F0911 Edit Line and F0911 End Document to create the entries. With the F0911, I enter the currency amount and the ledger type 'AA'. The function create 2 lines : one in the ledger type 'AA' and the other in the ledger type 'CA'. The amount in 'CA' are good. But, the one in the 'AA' are rounded to a dollard, (ex : we should have 24.85, but we have 25.00).

If someone know witch parameter to set to have no rounding, please answer me. It will be very appreciated.

Thanks to all.
 

Imran

Active Member
Try same DD item which is used for the "CA" ledger type. or you can use the AG or any of the DD item related to amount.
 

GSI Inc.

Well Known Member
Can you attach a sample of the code. I would like to see the edit code you are using and the ER code that you are using. Also the DD name of the item. I am suprised if it is the same data item. Please also go into multi-currency setup and do a print screen of both currency type and the number of decimals. I'll try to help but need more info - Thanks - Angelis
 

kschumac

Member
Thanks Angelis,

Here are more information. I hope it will help you to figure where the problem is. Concerning the multi currency setup, i put what I think you want in attachement. If it's not what you are searching for, just ask and, to be sure, give my the program name and the window.

By the way, I forgot to say we are using OneWorld XE, version B7333.

Following is a part of the program. I only put one leg of the statement; the opposite is just another account with the reverse amount.

All the variable are ended with the Data Dictionnary Alias. I traced one transaction and add, at the end of a line, the value of the variable where I think it will help.


The following code create 2 lines in F0911. Here are the main field that showes the problem :

Line 1
LT = 'AA'
CRR = 1,193115
AA = -26373807100
Line 2
LT = 'CA'
CRR = 1,193115
AA = -22105000000

The result we want is : -22105000000 * 1,193115 = -26373807075
So the amount is rounded at a dollar without the cents.

F0011 Write Batch Header
VA rpt_F0911BatchType_ICUT -> szBatchType (value = 'G')
VA rpt_F0911BatchNumber_ICU <- mnBatchNumber
UNDEFINED X cPreviousBatchStatus
UNDEFINED X cPostOutOfBalance
UNDEFINED X cFLAGSuppressBatchControl
UNDEFINED X jdBatchDate
UNDEFINED X cBatchControlCancelFlag

F0911 Begin Document
VA rpt_BeginDocJobNumber_MATH01 <- mnJobNumber
"A" -> cDocAction
"1" -> cEditInstructionFlag
VA rpt_BeginDocErrorFlag_EV01 <- cErrorFlag
"J" -> cTypeDoc
UNDEFINED X mnLastLineNumber
VA rpt_F0911Company_CO -> szCompanyKey
"JE" -> szDocumentType
UNDEFINED X mnDocNumber
VA rpt_F0911DateGLandVoucher_DGJ -> jdGLDate
"AA" -> szLedgerType
VA rpt_F0911BatchNumber_ICU -> mnBatchNumber
"G" -> szBatchType
SL DateToday -> jdBatchDate
UNDEFINED X jdBatchSystemDate
UNDEFINED X mnBatchTime
VA rpt_F0911CurrencyCodeFrom_CRCD -> szTransactionCurrency (Value = 'USD')
VA rpt_F0911CurrencyConvRate_CRR -> mnCurrencyRate (Value = 1.1931150)
VA rpt_F0911NameAlphaExplan_EXA -> szExplanation
UNDEFINED X szReference1
UNDEFINED X szHomeBusinessUnit
UNDEFINED X szInvoiceNumber
UNDEFINED X jdInvoiceDate
UNDEFINED X cReverseVoid
UNDEFINED X jdHistoricalDate
UNDEFINED X mnHistoricalRate
"F" -> cCurrencyMode
UNDEFINED X szBaseCoCurrency
UNDEFINED X cMultiCurrencyInterco
UNDEFINED X mnAmountToDistribute
UNDEFINED X mnCurAmountToDistribute
"Y" -> cCurrencyFlag
UNDEFINED X cHeaderChangedFlag
"<Zero>" -> cModelFlag
UNDEFINED X szJEVersion
UNDEFINED X cExchangeRateDateFlag
UNDEFINED X cPaymentInstrument

F0911 Edit Line
VA rpt_BeginDocJobNumber_MATH01 -> mnJobNumber
"A" -> cLineAction
"1" -> cProcessingMode
"<Zero>" -> cEditFlag
VA rpt_F0911ErrorFlag_EV01 <- cErrorFlag
"<Zero>" -> cRecordWrittenFlag
"J" -> cTypeDoc
VA rpt_F0911LineNumber_JELN -> mnLineNumber
"<Zero>" -> mnAmount
VA rpt_F0911AcctNoInputMode_ANI -> szAccountNumber (Value = ' 67120.21120.USDRC ')
VA rpt_F0911AccountId_AID -> szAccountID
VA rpt_F0911CostCenter_MCU -> szBusinessUnit
VA rpt_F0911ObjectAccount_OBJ -> szObject
VA rpt_F0911Subsidiary_SUB -> szSubsidiary
"2" -> cAccountMode
VA rpt_F0911FiscalYear_FY -> mnFiscalYear
VA rpt_F0911PeriodNo_PN -> mnPeriodNumber
VA rpt_F0911Century_CTRY -> mnCentury
UNDEFINED X szSubledger
UNDEFINED X cSubledgerType
UNDEFINED X mnUnits
UNDEFINED X szUnitOfMeasure
VA rpt_F0911DateGLandVoucher_DGJ -> jdServiceDate
UNDEFINED X szLineExtension
UNDEFINED X szAssetID
UNDEFINED X cPostedCode
UNDEFINED X szExplanation
UNDEFINED X szReference2
UNDEFINED X szPayItem
UNDEFINED X cBillCode
UNDEFINED X mnDoiSub
UNDEFINED X szWorkOrder001
UNDEFINED X szOutsiderLeaseWellID
UNDEFINED X szOrderType
UNDEFINED X mnLineID
UNDEFINED X szPODocType
UNDEFINED X szPOKeyCompany
UNDEFINED X szPurchaseOrder
UNDEFINED X szPOSuffix
UNDEFINED X c1099Flag
VA rpt_F0911AmountField_AA -> mnCurrencyAmount (Value = -221050000)
UNDEFINED X mnForeignTaxAmount
UNDEFINED X mnForeignTaxableAmount
UNDEFINED X mnTaxAmount
UNDEFINED X mnAmountTaxable
UNDEFINED X szTaxExplanationCode
UNDEFINED X szTaxArea
SL CurrencyProcessing -> cCurrencyFlag (Value = 'Y')
VA rpt_F0911Company_CO -> szCompany
VA rpt_F0911DateGLandVoucher_DGJ -> jdCheckDate
UNDEFINED X szDisplayKeyCompany
UNDEFINED X szDisplayBaseCoCurr
UNDEFINED X szDisplayTransCurrency
UNDEFINED X mnDisplayExchgRate
UNDEFINED X cDisplayCurrencyMode
UNDEFINED X mnLastLineNo
UNDEFINED X mnOriginalAmount
UNDEFINED X mnOriginalAmountForeign
UNDEFINED X cGlPostCodeAlt001
UNDEFINED X cGlPostCodeAlt002
UNDEFINED X cGlPostCodeAlt003
UNDEFINED X cGlPostCodeAlt004
UNDEFINED X cGlPostCodeAlt005
UNDEFINED X cGlPostCodeAlt006
UNDEFINED X cCommitmentReliefFlag
UNDEFINED X cBillingControl
UNDEFINED X cGlPostCodeAlt009
UNDEFINED X cGlPostCodeAlt000
UNDEFINED X cGlPostCodeAlt00X
UNDEFINED X szCheckNumber
UNDEFINED X jdDateCheckCleared
UNDEFINED X cSummarizedCode
UNDEFINED X cPurgeCode
UNDEFINED X cBatchRearEndPostCode
UNDEFINED X szJobCategory
UNDEFINED X szJobStep
UNDEFINED X mnWeeklyYear
UNDEFINED X mnWeeklyPeriod
UNDEFINED X cFinalPayment
UNDEFINED X cAssetInputMode
UNDEFINED X mnSequenceNoOperations
UNDEFINED X mnOriginalDocNumber
UNDEFINED X szOriginalKeyCo
UNDEFINED X cClientFreeForm1
UNDEFINED X cClientFreeForm2
UNDEFINED X szGlClass
UNDEFINED X cDeleteNotAllowed
UNDEFINED X szIdType
UNDEFINED X szSubledgerDescription
UNDEFINED X szAccountDescription
UNDEFINED X cBypassMEditFlag
UNDEFINED X cReconciledCode
UNDEFINED X mnTaxAmountGross
UNDEFINED X mnForeignTaxAmountGross
UNDEFINED X cPostingCode1ManagerialAccount
UNDEFINED X cPostingCode2ManagerialAccount
UNDEFINED X cPostingCode3ManagerialAccount
UNDEFINED X cPostingCode4ManagerialAccount
UNDEFINED X cPostingCode5ManagerialAccount
UNDEFINED X cPostingCode6ManagerialAccount
UNDEFINED X cPostingCode7ManagerialAccount
UNDEFINED X cPostingCode8ManagerialAccount
UNDEFINED X cPostingCode9ManagerialAccount
UNDEFINED X cPostingCode10ManagerialAccoun
UNDEFINED X cManagerialAnalysisType1
UNDEFINED X szManagerialAnalysisCode1
UNDEFINED X cManagerialAnalysisType2
UNDEFINED X szManagerialAnalysisCode2
UNDEFINED X cManagerialAnalysisType3
UNDEFINED X szManagerialAnalysisCode3
UNDEFINED X cManagerialAnalysisType4
UNDEFINED X szManagerialAnalysisCode4
UNDEFINED X mnIdentifierShortItem
UNDEFINED X mnAddressNumber
UNDEFINED X szOverrideExplanation

F0911 End Document
VA rpt_BeginDocJobNumber_MATH01 -> mnJobNumber
VA evt_EndDocumentComputerID_CTID -> szComputerID
VA rpt_F0911ErrorFlag_EV01 <- cErrorFlag
VA rpt_F0911BatchNumber_ICU -> mnBatchNumber
VA rpt_F0911BatchType_ICUT -> szBatchType
UNDEFINED X cPrevBatchStatus
"<Zero>" -> cBatchStatus
"Y" -> cDocInBalance
"<Zero>" -> cSuppressBatchControl
"<Zero>" -> cExitedOnAdd
"A" -> cOverrideMode
UNDEFINED X mnStartingDocAmount
SL CurrencyProcessing -> cCurrencyFlag (Value = 'Y')
UNDEFINED X mnNextNumberIndex
UNDEFINED X szNextNumberSystemcode
"J" -> cTypeOfDocument
UNDEFINED X mnDocNumber
VA rpt_F56102ProgramId_PID -> szProgramID
SL UserID -> szUserID
"1" -> cUpdateBatchHeader
UNDEFINED X cBypassCurrencyConv

F0011 Close Batch
VA rpt_F0911BatchNumber_ICU -> mnBatchnumber
VA rpt_F0911BatchType_ICUT -> szBatchtype
"A" -> cPrevBatchstatus
"1" -> cChangeBatchStatus
"Y" -> cDocumentInBalance
"<Zero>" -> cSuppressBatchControl
UNDEFINED X cOverrideMode
"<Zero>" -> cSuppressDeleteFlag
 

Attachments

  • 112227-CurrencySetup.doc
    92.5 KB · Views: 130

Zoltan_Gyimesi

Legendary Poster
Hi kschumac,

First of all, what is your release and system???
On the other hand:
Q1.) What is the currency for AA and CA?
Q2.) How many decimal digit defined for these currencies in the Currency Master?
Q3.) How do you noticed the rounded value? Have you checked it in the database directly via Access, SQL or other way?

Read you later & Regards,

Zoltán
 

kschumac

Member
First of all, what is your release and system??? OneWorld XE, B7333

On the other hand:
Q1.) What is the currency for AA and CA?
The entry is in AA, but the amount have <zero> value and the CurrencyAmount have the value in USD. With this information, the function F0911 Edit Line produce 2 lines; one in the AA and another in the CA.

Q2.) How many decimal digit defined for these currencies in the Currency Master?
For what I know, all are defined with 2 decimals. But, i'm not sure to lood at the good place. I look in P0013 W0013A. If I should look at another place, please tell me where.

Q3.) How do you noticed the rounded value? Have you checked it in the database directly via Access, SQL or other way?
Yes, I used TOAD to acces directly the database.

Finaly, maybe before this answer, I sent an answer with more detail.

Thanks for the answer. I home someone will be able to help.
 

yamrani

Member
We are on 9.1 and are facing the same issue. Were you able to find out what the issue is around tax rounding when using F0911 Edit Line
 
Top