Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8944

Postings including VAT TAX using BAPI_ACC_DOCUMENT_POST

$
0
0

Hi All,

 

I am posting using BAPI_ACC_DOCUMENT_POST

I Stuck with tax code, Not sure what are all mandatory to pass on.

 

The below parameters i am passing into BAPI , always getting an error : FI/CO interface: Line item entered several times

Any one could please let me know do i am  missing some thing here ?

 

Account G/L,

 

    ls_bapi_gl-itemno_acc   = is_item-line_item_no. "Line Item Number

    ls_bapi_gl-gl_account   = is_item-saknr. "GL Account

    ls_bapi_gl-profit_ctr   = is_item-prctr. "Profit Centre

    ls_bapi_gl-fis_period   = is_header-monat. "Period

    ls_bapi_gl-pstng_date   = is_header-budat. "Posting Date

    ls_bapi_gl-tax_code     = is_item-mwskz. "Tax Code

    APPEND ls_bapi_gl TO ct_bapi_gl.

    CLEAR ls_bapi_gl.

 

Currency,

 

    ls_currency-itemno_acc = is_item-line_item_no.

    ls_currency-currency   = is_header-waers."Currency

 

 

    IF is_item-dmbtr IS NOT INITIAL.

      ls_currency-amt_doccur = is_item-dmbtr. "Debit Amount

      ls_currency-amt_base =  is_item-dmbtr. "Amount Base

    ELSE.

      ls_currency-amt_doccur = is_item-wrbtr * -1. "Credit Amount

      ls_currency-amt_base =  is_item-wrbtr * -1. "Amount Base

    ENDIF.

 

    ADD ls_currency-amt_doccur TO cv_balance.

    APPEND ls_currency TO ct_currency.

    CLEAR ls_currency.

 

Tax Build,

 

    ls_bapi_tax-itemno_acc = is_item-line_item_no. "Line Item Number

    ls_bapi_tax-gl_account = is_item-saknr.            "GL Account

    ls_bapi_tax-tax_code   = is_item-mwskz.           "Tax Code

    APPEND ls_bapi_tax TO ct_tax.

    CLEAR ls_bapi_tax.


Viewing all articles
Browse latest Browse all 8944

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>