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

BAPI_ACC_DOCUMENT_POST error

former_member206377
Active Contributor
0 Likes
1,569

Hi ,

I am using BAPI_ACC_DOCUMENT_POST for GL postings. I am getting an error Cost center 0001/89234 does not exist on 2010.10.12 .

Also, I would like to know for which documents Cost Center, Profit center and order has to be passed?It is required for GL acounts defined as cost elements ,but how do we validate this condition in teh program?

Thanks

Vasuki

1 ACCEPTED SOLUTION
Read only

MaryM
Participant
0 Likes
1,162

hi,

are you sure you are passing cost center in its right format char10?

For the bapi you have to pass it with the 0-s in front: 0000089234.

It also looks like you are passing the date reversed.

Regards,

MaryM

7 REPLIES 7
Read only

Former Member
0 Likes
1,162

Hi,

Ye check wih functional consultant.

Cost center must be mandatory for accounting document.

Thanks.

Read only

MaryM
Participant
0 Likes
1,163

hi,

are you sure you are passing cost center in its right format char10?

For the bapi you have to pass it with the 0-s in front: 0000089234.

It also looks like you are passing the date reversed.

Regards,

MaryM

Read only

0 Likes
1,162

Hi Mary ,

I am using CONVERSION EXIT to convert the cost center to required format. YEs, as you mentioned, date that I have mentioned here is wrong, but in the program I am using it in the right format. Sorry for misguiding

Read only

Former Member
0 Likes
1,162

Which conversion exit? It should be CONVERSION_EXIT_ALPHA_INPUT.

Rob

Edited by: Rob Burbank on Jan 14, 2010 11:14 AM

Read only

0 Likes
1,162

Hi,

but you are still having problems with cost center?

Have you tried using online transaction to create the document - all data you enter online you have to pass also to the Bapi.

Hope you can solve it,

MaryM

Read only

0 Likes
1,162

Hi Rob,

Yes its CONVERSION_EXIT_ALPHA_INPUT . it still doesnt work fine.

I guess its because only GL accounts which are defined as cost elements require Cost center Profit center and Order to be passed. But how do i determine which GL account is defined as cost element? is it maintained in any table ,or is it dependent on posting key. Can anyone please let me know.

Thanks,

Vasukl

Read only

Former Member
0 Likes
1,162

I think this is more a functional question - not ABAP.

Rob