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- GL account problem

Former Member
0 Likes
2,033

Hi to all,

I am trying to use BAPI_ACC_DOCUMENT_POST in a program and I am using GL Account number of a Customer but when I execute the bapi It gives an error such as

'Account 'XXX' in company code XXX cannot be directly posted...' .

Can I send the customer number instead of the GL account number for customer?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,182

I am not sure that it will work but you can try. Alternatively, if you think the GL account should actually allow you to post manual postings, then go to transaction FSS0(that is zero), enter the GL account and the company code. Under the 'Create/bank/interest' tab, uncheck 'Post automatically only'.

10 REPLIES 10
Read only

Former Member
0 Likes
1,183

I am not sure that it will work but you can try. Alternatively, if you think the GL account should actually allow you to post manual postings, then go to transaction FSS0(that is zero), enter the GL account and the company code. Under the 'Create/bank/interest' tab, uncheck 'Post automatically only'.

Read only

0 Likes
1,182

Thanks Srinivas ,

I' ve tried your approach but didn' t work . when I record a FI doc for customers from t-code 'F-02' as you know it lets to record it by customer number and I've checked its GL account and tried to use it in BAPI but still doesn't work.

Could there else be a another problem like when you create doc from F-02 you have to use posting key . do I've to use any other options as posting key ?

Thanks a lot.

Read only

0 Likes
1,182

Where are you passing the customer number in your call to the BAPI?

Are you filling in the CUSTOMER field of the ACCOUNTRECEIVABLE tables parameter?

Read only

0 Likes
1,182

I' ve tried customer field and gl_account field.. both of them didn't work

Read only

0 Likes
1,182

You have to pass only one of them at any time. Also, posting key has to be filled in. The documentation is very good on this one.

Read only

0 Likes
1,182

When I pass only Customer it says 'G/L account is mandatory field '.

And when I pass both it only shows the error I posted

Thanks a lot Srinivas.

Read only

0 Likes
1,182

can you please explain more and with example.

thanks,

Read only

Former Member
0 Likes
1,182

Hi,

Are you able to solve the problem. I am facing the same problem. Can you please let me know how you have solved it.

Thanks,

Rohit

Read only

0 Likes
1,182

Hi All,

I am facing the same problem. Pl give the suggestion.

I'll be Thankful

Read only

0 Likes
1,182

Hi shyamala,

DId u get any solution for this?