Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

issues with BAPI_ACC_DOCUMENT_CHECK

Former Member
0 Likes
1,209

hi

im trying to post a document, before posting, Im doing a check using the fm BAPI_ACC_DOCUMENT_CHECK

Im getting several errors

Error in document : BKPFF

and some accounts is not defined in the chart of accounts

When i do a manual posting, it works

does anybody know wats the issue?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
968

When you are Using this Function pass the GL Accounts padded with Zeroes. Otherwise it will consider the GL Accounts wrongly and give errors. Try to use some conversion exit to pad the zeroes.

try it once, if you are still getting the error let me know..

4 REPLIES 4
Read only

Former Member
0 Likes
969

When you are Using this Function pass the GL Accounts padded with Zeroes. Otherwise it will consider the GL Accounts wrongly and give errors. Try to use some conversion exit to pad the zeroes.

try it once, if you are still getting the error let me know..

Read only

Former Member
0 Likes
968

Hi Sia,

Did you feel your header structure properly.Just check once with these fields once

c_object_type = 'BKPFF'.

c_object_key = '$'.

c_bus_act = 'RFBU'.

lv_objsys = '$'.

*--To upload the Header Structure required By BAPI

wa_docheader-obj_type = c_object_type.

wa_docheader-obj_key = c_object_key.

wa_docheader-obj_sys = lv_objsys.

wa_docheader-bus_act = c_bus_act.

wa_docheader-username = sy-uname.

wa_docheader-header_txt = wa_lineitem-header_text.

wa_docheader-comp_code = wa_lineitem-header_company.

wa_docheader-doc_date = wa_lineitem-document_date.

wa_docheader-pstng_date = wa_lineitem-posting_date.

wa_docheader-fis_period = '00'.

wa_docheader-ref_doc_no = wa_lineitem-reference.

wa_docheader-doc_type = wa_lineitem-document_type.

Thanks

Sudharshan

Read only

Former Member
0 Likes
968

Hi anjali

There are some other fields which need to be taken care of padding zeros other than GL account if you are still not getting the results.Just check with the field length and then fill the data

some other fields are profit center,cost centers,,

Thanks

Sudharshan

Read only

0 Likes
968

I will try, the padding of gl accounts did not give errors, I will try with the cost center

thanks

hope it turns out to be good