Skip to Content
author's profile photo Former Member
Former Member

Problems implementing BADI_ACC_DOCUMENT

Hi gurus,

I need to enhance badi_acc_document to change some document fields when posting via bapi but im facing some troubles here...

When i try to implement a Zbadi BADI_ACC_DOCUMENT enhancement my zbadi it´s not getting called...

Other problem that i see it's taht im able to create a Z class , CL_EXM_IM_ACC_DOCUMENT implementation, but im unable to implement a Z interface , IF_EX_ACC_DOCUMENT.

Does anyone allready had this kind of problems or know a soluiton to this problem.

Thanks in advance

Best regards

João Martins

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 12, 2010 at 12:53 PM

    Hello,

    You can create your Z Class for BADI implementation by copying class CL_EXM_IM_ACC_DOCUMENT to a Z class. This will copy the Standard interface, you don't need to implement a Z interface.

    After having the class implemented, it will only be used when executing FM BAPI_ACC_DOCUMENT_POST with the table parameter EXTENSION2 filled. If you execute FM BAPI_ACC_DOCUMENT_POST with EXTENSION2 initial, then the BADI will not be executed.

    Abraço.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2010 at 01:22 PM

    Solved Guys!

    Just needed to extend class CL_EXM_IM_ACC_DOCUMENT to a Z class and then define it in the Z badi implementation, and then enhance the Z class in order to implement both methods.

    Thanks for the tip Mario.

    Points will be given

    Abraço

    BTW there no need to fill extension2 table, cause the Bapi doesnt check if table is empty or not, for fill_accit method. If the badi implementation is active the it always passes thru this implementation

    Edited by: joao martins on Oct 12, 2010 3:22 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.