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: 

BADI ACC_DOCUMENT

Former Member
0 Kudos

Hi,

I am using BAPI_ACC_DOCUEMNT_POST to upload data for FB01.

To enter the Posting Key and Special-GL-Indicator i have entered values in the Extension2 table.

I wrote my code in BADI ACC_DOCUMENT to change the posting key and special gl indicator in ACCIT table.

This BADI is active and implemented but when i run the BAPI this is not called. i put a break point n checked but its not helping

I dont know where i am going wrong.

Kindly help.

Regards,

Shraddha

1 ACCEPTED SOLUTION

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

You can also do it with a BTE. See SAP Note 487722 - Using EXTENSION1 for accounting BAPIs

Regards

Eduardo

8 REPLIES 8

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

You can also do it with a BTE. See SAP Note 487722 - Using EXTENSION1 for accounting BAPIs

Regards

Eduardo

0 Kudos

Hi,

thanks a lot for your reply.

i dunno how to do it with BTE...can u explain..

Regards,

0 Kudos

Hi

The BADI ACC_DOCUMENT needs a filter?

Which values have you set there?

Max

0 Kudos

Hi,

i have used BKPF...is it incorrect?

0 Kudos

No

Try to use BKPFF

Max

0 Kudos

thank u soo much!!

0 Kudos

Just a clarification of reply by Max. BAdI will be called only when the value in BAPI structure field DOCUMENTHEADER-OBJ_TYPE is available in BAdI filter condition. See the reference code in LACC9F50.

CALL METHOD g_exit->change
    EXPORTING
      flt_val      = gs_aw-awtyp
    CHANGING
      c_acchd      = ls_acchd
      c_accit      = it_accit
      c_acccr      = it_acccr
      c_accwt      = it_accwt
      c_acctx      = it_acctx
      c_extension2 = p_extension[]
      c_return     = lt_return.

Regards, Vinod

0 Kudos

Hi

The object type BKPF and BKPFF are similar, they mean the posting is from FI module, but BKPF is set by SAP transactions (like FB01,.....) and BKPFF by external "transaction" like BAPI.

Max