02-24-2014 6:13 PM
Hi All
We are trying to post a document against different GL accounts via BAPI_ACC_DOCUMENT_POST for group currency.
But it is throwing an error 'Balance in transaction currency'. I am assuming that the credit - debit is not coming out to be ZERO. This requirement is for Hyperinflation in Venezuela.
I am doing it in USD as well as the local currency VEF. Below are the values I am passing in the structure CURRENCYAMOUNT.
credit:
wa_curramt-itemno_acc = '0001'.
wa_curramt-curr_type = '10'.
wa_curramt-curr = 'VEF'.
wa_curramt-amt_doccur = '68.4'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
credit:
wa_curramt-itemno_acc = '0001'.
wa_curramt-curr_type = '30'.
wa_curramt-curr = 'USD'.
wa_curramt-amt_doccur = '10'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
credit:
wa_curramt-itemno_acc = '0002'.
wa_curramt-curr_type = '10'.
wa_curramt-curr = 'VEF'.
wa_curramt-amt_doccur = '68.4'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
credit:
wa_curramt-itemno_acc = '0002'.
wa_curramt-curr_type = '30'.
wa_curramt-curr = 'USD'.
wa_curramt-amt_doccur = '10'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
debit:
wa_curramt-itemno_acc = '0003'.
wa_curramt-curr_type = '10'.
wa_curramt-curr = 'VEF'.
wa_curramt-amt_doccur = '136.8'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
debit:
wa_curramt-itemno_acc = '0003'.
wa_curramt-curr_type = '30'.
wa_curramt-curr = 'USD'.
wa_curramt-amt_doccur = '20'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
Let me know if some more info is needed from my end.
Thanks in advance,
Tejaswini
02-25-2014 1:13 AM
I think instead of looking at SAP Notes, i believe the error is in my amount passed in VEF curr. Seems like it is not becoming zero for debit - credit..
Please help.
02-24-2014 6:53 PM
02-24-2014 6:56 PM
Hello,
Have you had a look for notes, Depending on the release and industry solution you can find several notes on this subject (start looking for message RW 022 "FI/CO interface: Balance in transaction currency").
Regards,
Sameer
02-24-2014 7:02 PM
Hello Tejaswini,
Please refer to the below OSS note.It might solve your problem.
209979 - Error F5703 'Balance in local currency'
207743 - Balance error w/ company code clearing
1755379 - Error balance in transaction currency invoice reduction-MIRO
115788 - FI/CO interface:Balance in transaction currency RW022
1830126 - Info: Currencies in real-time integration CO with FI
Regards,
Thanga
02-25-2014 1:13 AM
I think instead of looking at SAP Notes, i believe the error is in my amount passed in VEF curr. Seems like it is not becoming zero for debit - credit..
Please help.
02-25-2014 4:26 AM
The code should be like this...
credit:
wa_curramt-itemno_acc = '0001'.
wa_curramt-curr_type = '10'.
wa_curramt-curr = 'VEF'.
wa_curramt-amt_doccur = '68.4'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
credit:
wa_curramt-itemno_acc = '0002'. "line items should not be same s.no
wa_curramt-curr_type = '30'.
wa_curramt-curr = 'USD'.
wa_curramt-amt_doccur = '10'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
credit:
wa_curramt-itemno_acc = '0003'.
wa_curramt-curr_type = '10'.
wa_curramt-curr = 'VEF'.
wa_curramt-amt_doccur = '68.4'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
credit:
wa_curramt-itemno_acc = '0004'.
wa_curramt-curr_type = '30'.
wa_curramt-curr = 'USD'.
wa_curramt-amt_doccur = '10'.
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
debit:
wa_curramt-itemno_acc = '0005'.
wa_curramt-curr_type = '10'.
wa_curramt-curr = 'VEF'.
wa_curramt-amt_doccur = '-136.8'. "debit indicator is mandatory
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
debit:
wa_curramt-itemno_acc = '0006'.
wa_curramt-curr_type = '30'.
wa_curramt-curr = 'USD'.
wa_curramt-amt_doccur = '-20'. "debit indicator is mandatory
APPEND wa_curramt TO ta_curramt.
CLEAR wa_curramt.
02-25-2014 2:09 PM
Thanks for your response Chandra.
I tried it, but on changing the line nos it gives me a short dump as below:
'Exception condition "SYSTEM_ERROR" raised'/
Also, when i post the document manually, it asks me 'To enter positive values only'.
Please help.
02-25-2014 4:48 PM
Hello,
Can you try only making amount +ve for credit and -ve for debit.
Regards,
Sameer
02-25-2014 5:03 PM
Hello Tejaswini,
I guess there is some problem in your currency, don't directly pass value like below.
wa_curramt-amt_doccur = '-136.8'.
The data element in which it is referring is having 4 decimals. Try like below or do the conversion of the value before passing into the table.
wa_curramt-amt_doccur = '136,800- '. "minus at last, try with comma separator ( or ) if it doesn't work
try with dot as seperator
Regards,
Thanga
02-26-2014 11:58 AM
Hi Tejaswini
The only change needed in your code is passing the credit entries (the ones you are passing with SHKZG = 'H' corresponding to entries in ACCOUNTGL structure) with the '-' sign. The rest everything should be the same. Remember, the credit - debit = 0.
Try doing that and let me know.
Thanks,
Harsh
06-04-2015 11:36 PM
Hi Tejaswini, If the suggestion from Harsh had worked, I am stuck in the same case. Can you please share the code.