Skip to Content

BAPI_ACC_DOCUMENT_CHECK tax item BKPF-XMWST

Hi gurus,

I have an issue.

I'm using BAPI_ACC_DOCUMENT_CHECK, to verify a document before posting. The document needs to have the BKPF-XMWST filled with the value "X".

I've created 2 enhancements for both ACC_DOCUMENT and I added the code:

METHOD if_ex_acc_document~change.

       LOOP AT c_accit INTO wa_accit WHERE mwskz IS NOT INITIAL.

         wa_accit-xmwst = 'X'.

         MODIFY c_accit FROM wa_accit INDEX sy-tabix TRANSPORTING xmwst.

       ENDLOOP.

 

ENDMETHOD.


but the resulting document doesn't have the 3rd line (the tax item) and I get no error message (the document is created).


Is there something I'm missing or did I do something wrong?


Thanks,

Marius



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 10, 2014 at 05:45 PM

    Hi

    The tax items should be transfered to the BAPI manually, so probably that flag doesn't trigger the process to create the item automatically

    Max

    Add comment
    10|10000 characters needed characters exceeded

    • In case some wonders, here

      ls_currencyamount-itemno_acc    = 3.

      ls_currencyamount-currency      = 'RON'.

      ls_currencyamount-amt_doccur    = -0.24.

      ls_currencyamount-amt_base      = -1.

      APPEND ls_currencyamount TO lt_currencyamount.

      You can change the amt_base from "-1" (minus), to "1". Some FI detalis ... in my case it's what I had to do to make he document 100% FI proof 🤪