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 Member
0 Likes
5,964

Hi All,

We want to post the Enter G/L Account Posting / Customer Payment /F-02 through BAPI_ACC_DOCUMENT_POST. It is getting posted, but with different posting keys. So after searching in scn we have implemented BADI and passed Posting keys through Extension2 , now posting keys are getting passed internally but now we are getting the below error. We are on ECC5.0

Field Profit Ctr is a required field for G/L account 1000 105467


Below is the Input which we are passing, Please suggest.

DOCUMENTHEADER

BUS_ACT

RFBU

USERNAME

IT_SOB

HEADER_TXT

HEADER_TXT

COMP_CODE

1000

DOC_DATE

  1. 01.04.2015

PSTNG_DATE

  1. 01.04.2015

DOC_TYPE

DZ

REF_DOC_NO

REF_DOC_NO

ACCOUNTGL

ACCOUNTRECEIVABLE

ITEMNO_ACC

1

ITEMNO_ACC

2

GL_ACCOUNT

206880

CUSTOMER

16946

ITEM_TEXT

ITEM_TEXT

COMP_CODE

1000

ACCT_TYPE

S

ITEM_TEXT

ITEM_TEXT

COMP_CODE

1000

SP_GL_IND

A

PSTNG_DATE

  1. 01.04.2015

PROFIT_CTR

DP13

DE_CRE_IND

S

CURRENCYAMOUNT

ITEMNO_ACC

1

ITEMNO_ACC

2

CURRENCY

INR

CURRENCY

INR

AMT_DOCCUR

1,000.00

AMT_DOCCUR

1,000.0000-

EXTENSION2

STRUCTURE

POSTING_KEY

STRUCTURE

POSTING_KEY

VALUEPART1

1

VALUEPART1

2

VALUEPART2

40

VALUEPART2

19

1 ACCEPTED SOLUTION
Read only

0 Likes
5,367

Hi Chandu,

Have you tried posting the document through F-02 manually using the exact same data as you are passing to the BAPI? If it gets posted successfully, then we might need to tear apart the code and find the issue. If it does not get posted and you get the same error, then it is a data related issue that needs to be handled by your functional. Please try manually and respond with the results.

Thanks,

Soumyajit

22 REPLIES 22
Read only

Ankit_Maskara
Product and Topic Expert
Product and Topic Expert
0 Likes
5,367

Hi Chandu,

The error message means that for the G/L account needs a profit center as per customizing maintained in SPRO. You need to pass correct profit centre value and it cannot be empty.

PS: The G/L account mentioned in error and in tabular data is not same.

BR.

Read only

0 Likes
5,367

Hi Ankit,

The Profit Center which we are passing is only maintained .

yes,in the error it is showing different, we are not able to identify how is this coming

Read only

0 Likes
5,367

It could be that this error is for an automatically generated line item. So it could be a configuration issue.

Does it tell you which line item number the rrror is on?

Rob

Read only

0 Likes
5,366

Hi Rob,

it is just showing the following message,

Configuration issue means, can yo please elaborate which part of configuration.

Read only

0 Likes
5,366

Your business analyst should look into this. It looks like this is a generated item. He or she should be able tell you and also assign a profit center to the GL account.

Rob

Read only

0 Likes
5,366

Thanks Rob,

we will check with that team.

Read only

former_member182371
Active Contributor
0 Likes
5,366

Hi,

try to use fm CONVERSION_EXIT_ALPHA_INPUT for field PROFIT_CTR before passing the value to the BAPI.

Best regards.

Read only

0 Likes
5,366

Hi ,

We are Using this Conversion ( Other Required Conversions also), Still the same Error.

Read only

Former Member
0 Likes
5,366

Hi Chandu,

Can you share the source to check and advise accordingly.

Read only

0 Likes
5,366

Hi Abdul,

Even if we are Checking it Directly in BAPI(Using test Sequence) by Providing above Test Data, Same Error .

Read only

Former Member
0 Likes
5,366

This message was moderated.

Read only

0 Likes
5,368

Hi Chandu,

Have you tried posting the document through F-02 manually using the exact same data as you are passing to the BAPI? If it gets posted successfully, then we might need to tear apart the code and find the issue. If it does not get posted and you get the same error, then it is a data related issue that needs to be handled by your functional. Please try manually and respond with the results.

Thanks,

Soumyajit

Read only

0 Likes
5,366

Hi Soumyajit,

Through F-02,its getting posted.Only through BAPI its not getting posted. Maybe in BAPI some additional checks were processing while through transaction it was not ?

Read only

0 Likes
5,366

Hi

No the BAPI doesn't need additional controls, but it uses a different program to post FI document, so if you're sure you're trasfering all mandatary data, try to check some notes

Max

Read only

0 Likes
5,366

Hi Chandu,

If the document is getting posted manually that means there might be something wrong with the code. Are you passing any CO-PA values by any chance? It could be that profit center is automatically determined from some value you send to some field (could be employee number, sales order number, pernr etc) and since you are not passing it, the program is asking for profit center. From my experience with this BAPI, this seems quite plausible. So please check or better, if you can share the data you have to pass and for which fields. You can just "XXXX" out any sensitive data.

Thanks,

Soumyajit

Read only

0 Likes
5,366

Solved,Issue was it was asking the profit center for actual Reconciliation Account.

On passing(In BADI)  that it was getting posted.

Read only

0 Likes
5,366

Hi,

can we know which badi?

Best regards

Read only

0 Likes
5,366

Hi @chandu cu, appreciate you able to share us the badi and step.

Read only

0 Likes
5,366

Hi Kah Wai  N,

BADI Name - ACC_DOCUMENT

Method        - Change

Read only

0 Likes
5,366

Hi chandu,

What do you means actual Reconciliation Account? I looking tat the C_ACCIT table, the line item is filled by profit center, however, there is an extra line in C_ACCIT. The extra line do not fill up any profit center. Should I jus fill up the profit center for all the lines found in C_ACCIT?

Many thanks!

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
5,366

Hi CHandu, may be the error is valid, you are passing the Profit centre in the G/L level and there is a change that system could determine automatically based on the Company code or document type.

only thing I can suggest is Debug Debug and Debug.

Sorry

Read only

RaymondGiuseppi
Active Contributor
0 Likes
5,366

The error


Field Profit Ctr is a required field for G/L account 1000 105467

is related to an account that you did not transfer to BAPI (only GL 206880 and customer 16946?)

  • Are you sure the error is related to those data
  • If this is a generated account (some VAT or any other account) did you maintain some default value with Customizing, OKB9 or some substitution rule ?

Regards,

Raymond