Application Development 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: 

User Exit for Changing G/L account in Accounting Document

Former Member
0 Kudos
5,744

hi all,

This one is urgent for me. If you guys can help.

Iam looking for a user-exit to change the G/L account while posting the accounting document.

If someone has worked on a similar user-exit Kindly help.

Thanks and Regards

Varun

1 ACCEPTED SOLUTION

Former Member
0 Kudos
904

Hi

Please close this thread if problem solved and reward some points if answers were helpful.

Cheers

15 REPLIES 15

Former Member
0 Kudos
904

Could you describe the whole posting ?

0 Kudos
904

Hi,

We have to change the G/L account during PGI for a delivery. While doing PGI a material document and accounting document is created. It is possible to change the G/L account in material document because there is an exit available in it.But then we need another exit where we can reflect the change made in the mat. doc to the accounting document.

If you get an idea as to what Iam trying to do and have a solution Kindly help as this one is urgetnt 4 me.

Thanks,

Varun

0 Kudos
904

If you want to create a substitution in FI, use transaction GGB1. If the substitution fields are not enough, refer to SAP note 42615.

Good luck,

Svetlin

0 Kudos
904

Hi,

or try field exit:

report RSMODPRF

regards Andreas

0 Kudos
904

Hi

Thanks for your support. I had one more question if u guys could guide me on that I was going through the OSS notes its very helpful.

However is it possible to change the G/L account in it??

Varun

0 Kudos
904

Hi,

You should be very careful if you have decided to do it anyway. Especially if the GL accounts are from different account groups. If your account is a reciliation account(vendor or customer), the better way is Sp.GL indicator(alternative account). I have never done it with G/L account field, but you can test it. May be it will work.

Good luck

0 Kudos
904

hey can i change the valuation class

valuation class is resides in COBL_BKLAS, we can override the substitution routing to update the value.

can u give me a lead

varun

Former Member
0 Kudos
904

Does anybody know any userexit that would let me change the G/L account determined at post goods issue time that a different G/L account can be put to the material document as well as carry onto the FI document? I have tried the user exit <b>ACCOBL01</b> (EXIT_SAPLKACB_002) but this will not execute if we do not have any custom fields in the coding block which we don't.

I also try to just change the G/L account at the FI document using BTE OPEN_FI_PERFORM_00001025_E but the original values is written back to BSEG after the BTE is executed.

Any advice is greatly appreciated.

Former Member
904

Hi

You can use user exit ZXMBCU02 in enhancement -

MBCF0002 ( EXIT_SAPMM07M_001 ).

However you cannot directly chnage as MSEG is available as importing parameter and whatever you change here will have no impact on main prog. Instead you can use following code -


FIELD-SYMBOLS <F2> TYPE ANY,"Field Symbol for the GL ACCOUNT

DATA : W_KONTO_NAME(50) VALUE '(SAPMM07M)DM07M-KONTO'.
      
        ASSIGN  (W_KONTO_NAME) TO <F2>.
        MOVE "GLACCOUNT" TO <F2>.

"GLACCOUNT" is the new GL account you want to change.

Cheers.

Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:18 PM

0 Kudos
904

Yes! This codes work. Thank you so much for your valuable advice. I had tried so many other user exit but none of them worked except this one. The account substitution actually got carried on to the FI document as well which is perfect!

Thank you so much Sanjay!

Elisa

0 Kudos
904

Hello Sanjay

This code is not working for me into this user exit . When I try to set breakpoint at this place it doesn't stop after PGI .

Please help me urgently on this .

Thanks

Tisha

Former Member
0 Kudos
905

Hi

Please close this thread if problem solved and reward some points if answers were helpful.

Cheers

0 Kudos
904

Thanks Sanjay,

We have been looking for this one since July and we had found an alternative way to change the G/L account as this exit didnot have MKPF as the exporting parameter. I will be discussing this with my fellow consultants let see which solutin we implement.

Thanks a lot for your inputs

Varun Sachdev

Former Member
0 Kudos
904

Thank You somuch, This works

0 Kudos
904

Hi Experts,

The requirement is to change the GL account when PGI is done for a delivery.

I have coded in the above user exit for changing the GL account. I am facing the issue here.

I am changing the GL account through a user exit, but even before the user exit is called the standard SAP is throwing a error.

the Error is GL account is blocked for posting in the company code. This check is happening for the GL account what standard SAP proposes from the customization. The GL account that is getting picked is blocked in SPRO for posting in the mentioned company code. Because of the error message, our z code is not getting executed.

Kindly suggest if some user exits that can be used even before this error message. or let me know if you have any suggestions to over come this.

I have coded this in the enhancement point. Include MM07MFK0_KONTIERUNG_PRUEFEN and subroutine kontierung_pruefen.

Thanks,