2009 Jan 08 5:23 AM
Hi Guru's,
I'm using the BAPI_ACC_DOCUMENT_POST for posting AR & AP (Customer and Vendor ).
Now i've one scenario where i'm getting the following error ..
F5 846 - Debit/Credit indicator is inconsistent.
One CREDIT WITH ONE POSTING KEY
NUMBER OF DEBITS WITH DIFFERENT POSTING KEYS.
could you guys please help me in resolving the problem.
I've checked the currency table which i'm passing to BAPI, if i added the Debit values and Credit Values, the result is '0'.
I've debugged the BAPI, in Include "LFACIF02", it_accit internal table contains the wrong Values.
Please suggest me the solution.
Thanks in advance.
Adi.
2009 Jan 08 7:42 AM
when you posting the account document the Debit/Credit values always zero. even if you have multiple debit and credit psoting keys.
pst key| account | amount
40| 12345 | 100 ---> credit pstkey
40| 12345 | 200 ---> credit pstkey
50| 999999| 300 -
>debit pstkey
2009 Jan 08 8:00 AM
Hi Adi
You can use program ACC_BAPI_TEST_DOCUMENT if you're on the right SAP release. You can copy it to a Z-version and put your own data into it to simulate and/or post a financial document.
In my AP-example I have following setup
accountgl: itemnr 2, gl_account filled
accountap: itemnr 1, vendor_no filled
accounttax: itemnr 3, gl_account filled
currencyamount:
itemnr 1, amt_doccur -116
itemnr 2, amt_doccur 100
itemnr 3, amt _doccur 16
2009 Jan 08 10:36 AM
Hi,
Based on Debit/Credit indicator you have to fill the currency table.
1) First fetch the Debit/Credit indicator based on Posting Key.
SELECT SINGLE * FROM tbsl INTO l_tbsl WHERE bschl EQ wa_filedata-bschl.
wa_bapiacgl09-de_cre_ind = l_tbsl-shkzg.
wa_bapiacgl09-acct_type = l_tbsl-koart.
2) Then add the currency to currency table as below.
IF wa_bapiacgl09-de_cre_ind EQ 'S'.
wa_bapiaccr09-amt_doccur = wa_filedata-wrbtr .
ELSE.
wa_bapiaccr09-amt_doccur = wa_filedata-wrbtr * -1.
ENDIF.
2009 Jan 12 9:23 PM
Thanks Guys for your help.
I've resolved the Problem, the error is because of the Extension Structures i'm using in that BAPI.I'm not passing the Extension Structures in the BAPI,the Program is working Fine.