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_GL_POSTING_POST to Customer

Former Member
0 Likes
822

Hi all

i am creating this document for customer.

so it gives me this error: "Account 1250701 in company code 2000 cannot be directly posted to"

and if i  didnt pass the GL account it give me error you must set the GL Account parameter.

FYI, i did create this document by my hand from the screen F-02 and it is working very good.

here is the sample of my code:

                                     ("ITEMNO_ACC", "1");

                table.SetValue("CUSTOMER", "241");

                table.SetValue("GL_ACCOUNT", "0001250701");

please advise.

thanks,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
697

please i need help.

thanks,

Hi all

i am creating this document for customer.

so it gives me this error: "Account 1250701 in company code 2000 cannot be directly posted to"

and if i  didnt pass the GL account it give me error you must set the GL Account parameter.

FYI, i did create this document by my hand from the screen F-02 and it is working very good.

here is the sample of my code:

                                     ("ITEMNO_ACC", "1");

                table.SetValue("CUSTOMER", "241");

                table.SetValue("GL_ACCOUNT", "0001250701");

please advise.

thanks,

2 REPLIES 2
Read only

Former Member
0 Likes
698

please i need help.

thanks,

Read only

0 Likes
697

BAPI_ACC_GL_POSTING_POST only allows G/L accounts (e.g. CC 40; 50), not customer nor vendor, you must use another BAPI. e.g. generic BAPI_ACC_DOCUMENT_POST. (Also use search tool before posting - The SCN Rules of Engagement)

NB: You should not be allowed to post directly on a Reconciliation Account.

Regards,

Raymond