‎2017 Oct 12 8:47 AM
Hi,
I am facing one problem.
I need to post Gl account posting Using Bapi::BAPI_ACC_DOCUMENT_POST
If i post Gl account credit debit everything is fine.
But If i post or mention Vendor code with special Gl it is not working.
I am calling bapi:
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = documentheader
* IMPORTING
* OBJ_TYPE = OBJ_TYPE
* OBJ_KEY = OBJ_KEY
* OBJ_SYS = OBJ_SYS
TABLES
accountgl = accountgl
accountpayable = accountpay
currencyamount = currencyamount
extension1 = extension
return = return.
In the abvoe
accountgl I am passing Vendor and account type
accountgl-vendor_no = it_final-lifnr.
accountgl-acct_type = 'K'.
and accountpay Details
i am passing Special Gl account too.
While posting Front end f-02 with same data , document posting. But using bapi I am not able to post. Any thing i missed Please Suggest me.
‎2017 Oct 12 9:47 AM
‎2017 Oct 12 9:53 AM
Thank you very much for your reply.
yes , I am passing vendor_no and sp_gl_ind
Can you please have a look on below images.
Any thing i am missing, Special Gl indicator . E i am passing. If i post Front end , Document posting.


‎2017 Oct 12 10:11 AM
I am getting as like below
FI/CO interface: Balance in transaction currency
Error in document: BKPFF $ VEDCLNT666
Message class: RW : 022
‎2017 Oct 12 12:00 PM
‎2017 Oct 12 12:08 PM
Yes Sir, i did.

What is the problem i did not understood. problem is coming creation with vendor it is coming. otherwise working fine.But i need with vendor code. Error message leading me at se91 Message class:RW and mess no:022
Did not understood what is the problem
‎2017 Oct 12 12:25 PM
‎2017 Oct 12 12:42 PM
hi, Sir,
Accoun Gl 4 lines

4th line is for vendor that is the reason not passing gl only passing vendor.
Accountpay

Only single line passing vendor.
Anything is wrong. please update me.
‎2017 Oct 12 2:38 PM
‎2017 Oct 12 3:55 PM
‎2017 Oct 18 9:22 AM
I got the answer. There is One Custom Function module is there, When i ever i create the Entry with Vendor, one field xfield is passing as x automatically. This line is deleting the function module.
Now i remove the code. Now working.I did not understood. 1 point,When ever line entry is having posting key with 39,One more line with posting key 31 is coming. In the zfunction module they are removing the 31 line entry, Then only I can add the entry using bapi. Other wise fi interface error is coming.