cancel
Showing results for 
Search instead for 
Did you mean: 

Substitute G/L Account when posting Accounting Document

Former Member
0 Kudos

Hello Everyone,

I am an ABAP consultant.

I want to know if there is any way to substitute a G/L account which is already determined by the system.

When we post MIRO, when there is a price variance with GR, then a material price variance account will be determined and the variance gets posted to the material price variance account. Something like below.

Credit Vendor Account

Debit GR/IR Clearing Account

Debit Material Price Variance Account

I want to replace the Material Price Variance Account for certain scenario.

I tried with

1. BADI AC_DOCUMENT - But G/L account cannot be replaced with this

2. BTE - Able to change the G/L account, but it gives error "Internal error: Entry in COKA-Buffer not found". I found a SAP note for this. It seems G/L account and Fiscal year data gets transferred to COKA buffer and if there are any changes it does not allow to proceed.

I also found enhancement spots where i can make changes, but i want to know if this can be achieved in a standard way (Either Exits, BADI or FI Substitutions)

Regards

Rajvansh

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi Rajvansh,

Were you able to solve this issue. I too have a similar requirement where i need to substitue the G/L account for remaining balance in case if there is a difference between GR amount and Invoice amount.

Can you please proivde me your inputs on which approach you have choosen. Please share me the enhancement detals.

Thanks.

Regards,

Tulasi

vivek_srivastava12
Active Contributor
0 Kudos

Dear,

Yes it is very much possible to substitute the GL Account.

Please user User Exit Functionality.

Br, Vivek

sanilbhandari
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

It is possible to replace the GL Account at the time of posting , even if the posting comes from other modules like MM in your case. You have to allow field BSEG-HKONT and BSEG-SAKNR for substitution in maintainence view VWTYGB01.

There after, you should be able to substitute the GL Account. But you should be very clear on the prerequisites.

Regards

Sanil

Former Member
0 Kudos

Hi,

If you want to post to different GL Codes based on different Plants then, there is Valuation Grouping Code. When there are many Plants under a Company Code then, we can post to different GL Codes using Valuation Grouping Code.

Valuation Grouping Codes under each Plant are created in OMWD. After this, you can assign the GL Codes in OBYC under PRD.

Regards,

Kiron Kumar T.

atif_farooq
Active Contributor
0 Kudos

Hi:

Why don't you change your MM config , it would be better to have this defaulted by MM account determination. but if you still want to do this, then you can try MM exit that instead of changing the account, reduce the amount to zero in the "wrong" account, and insert a line with the "right" account.

Substitution GBB1 might not work here which can also induce MM/FI consistency issues. Hence find an MM exit and refer to the BADI's in note 1156325.

I hope it will help you.

Regards