Skip to Content
0

Need to Post f-02 Using bapi:BAPI_ACC_DOCUMENT_POST

Oct 12, 2017 at 07:47 AM

73

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Oct 12, 2017 at 08:47 AM
1

Pass the vendor item in the accountpayable table, not to the accountgl one, fill VENDOR_NO and SP_GL_IND correctly. Which SGL ind did you try?

Show 9 Share
10 |10000 characters needed characters left characters exceeded

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.

sp1.png (12.5 kB)
sp2.png (5.4 kB)
0

I am getting as like below

FI/CO interface: Balance in transaction currency

Error in document: BKPFF $ VEDCLNT666

Message class: RW : 022

0

Did you create the amount records of currencyamount (transaction currency 00) for GL and AP records with a zero sum?

1

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

sp33.png (20.3 kB)
0

Have you put 4 items in GL(3) and AP(1) tables, with one occurence for each item number 1-4?

0

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.

accoungl.png (17.8 kB)
acconpay.png (20.5 kB)
0
Show more comments