Tax data with BAPI_ACC_DOCUMENT_POST

Hi All,
I am facing problem in passing tax data to BAPI BAPI_ACC_DOCUMENT_POST.
below is my code:
   *fill header
gd_documentheader-username   =  sy-uname.
gd_documentheader-header_txt = 'Test'.
gd_documentheader-comp_code  = p_ccode.   "SQ
gd_documentheader-doc_date   =  sy-datum.
gd_documentheader-pstng_date =  sy-datum.
gd_documentheader-doc_type   = 'KR'.
gd_documentheader-ref_doc_no = p_xblnr. "SQ
gd_documentheader-bus_act = 'RMWE'.
city = p_city.
state = p_state.
zipcode = p_zip.
*get tax juridisction code
IF NOT ( city     IS INITIAL ) AND
   NOT ( state    IS INITIAL ) AND
   NOT ( zipcode IS INITIAL ).
  SELECT SINGLE rfcdest INTO ttxd-rfcdest FROM ttxd
   WHERE kalsm = 'TAXUSX'.
  CLEAR x_com_jur.
  REFRESH t_com_jur.
  x_com_jur-city     =  city.
  x_com_jur-state    =  state.
  IF zipcode+5(4) EQ space.
    zipcode+5(4) = '0000'.
  ENDIF.
  CONCATENATE zipcode+0(5) '-' zipcode+5(4)
         INTO x_com_jur-zipcode.
  x_com_jur-country  = 'US'.
  CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'
    DESTINATION ttxd-rfcdest
    EXPORTING
      location_data    = x_com_jur
    IMPORTING
      location_err     = x_com_err
    TABLES
      location_results = t_com_jur.
  IF sy-subrc = 0.
    READ TABLE t_com_jur INTO x_com_jur INDEX 1.
    it_accountgl-taxjurcode =  x_com_jur-txjcd.
  ENDIF.
ENDIF.
*fill AP (line 1) - vendor related data
SELECT SINGLE zterm FROM lfb1 INTO p_zterm WHERE lifnr = p_lifnr.
it_accountpayable-itemno_acc = 1.
it_accountpayable-pmnttrms   = p_zterm. "SQ
it_accountpayable-vendor_no  = p_lifnr. "SQ
*it_accountpayable-item_text = 'S2P Testing in UDR1'. - SQ
it_accountpayable-pymt_meth = p_pmet. "- SQ
APPEND it_accountpayable.
*fill GL (line 2)
it_accountgl-itemno_acc      =  2.
*item_text - sq
IF p_asset IS NOT INITIAL.
  TABLES : anlz,
           anla.
  SELECT SINGLE * FROM anlz  WHERE anln1 = p_asset.
  SELECT SINGLE * FROM anla WHERE anln1 = p_asset.
*concatenate '00' anla-KTOGR into it_accountgl-gl_account .
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = anla-ktogr
    IMPORTING
      output = it_accountgl-gl_account.
  it_accountgl-asset_no = p_asset.
  it_accountgl-sub_number = '0000'.
  it_accountgl-cs_trans_t = '105'.
  it_accountgl-acct_type = 'A'.
ELSE.
  it_accountgl-gl_account      = p_gl.
  it_accountgl-costcenter      = p_cc.
  it_accountgl-wbs_element     = p_posid.
ENDIF.
it_accountgl-comp_code       = p_ccode.
it_accountgl-tax_code = p_txcd.  "SQ
it_accountgl-pstng_date      =  sy-datum.
it_accountgl-fisc_year       =  sy-datum(4).
APPEND it_accountgl.
*fill currency ammounts for lines 1 & 2
it_currencyamount-currency    = p_waers.  "SQ
it_currencyamount-itemno_acc  = 1.
it_currencyamount-amt_doccur  = - p_totamt.  "SQ
APPEND it_currencyamount.
CLEAR  it_currencyamount. .
it_currencyamount-itemno_acc  = 2.
it_currencyamount-currency    = p_waers.  "SQ
it_currencyamount-amt_base    =  P_lamt.
it_currencyamount-TAX_AMT  = p_ttax.  "SQ
APPEND it_currencyamount.
*tax data
it_accounttax-itemno_acc = 2.
it_accounttax-tax_code = p_txcd.
it_accounttax-GL_ACCOUNT = p_gl.
APPEND it_accounttax.
   CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader          = gd_documentheader
IMPORTING
   obj_key                 = wa_obj_key
  TABLES
   accountgl               = it_accountgl
*   ACCOUNTRECEIVABLE       =
   accountpayable          = it_accountpayable
   ACCOUNTTAX              = it_accounttax
    currencyamount          = it_currencyamount
*   CRITERIA                =
*   VALUEFIELD              =
*   EXTENSION1              =
    return                  =  it_return
COMMIT WORK.
I am getting folowwing error.
Message Type:    E
Message Class:   RW
Message Number:  609
Message:         Error in document: BKPFF $ UDRCLNT200
Message Type:    E
Message Class:   RW
Message Number:  602
Message:         Required field ACCT_KEY was not transferred in parameter ACCOUNTTAX
Message Type:    E
Message Class:   FF
Message Number:  765
Message:         Transaction key  does not exist
Message Type:    E
Message Class:   ZVAL1
Message Number:  021
Message:         Cost Center US00000012 is closed.
Message Type:    E
Message Class:   KI
Message Number:  235
Message:         Account 54010011 requires an assignment to a CO object
Can anyone help me on this.
Regards,
Priyaranjan

Hi Nabheet,
I have passed these required data.
Now erros is :
Message Type:    E
Message Class:   RW
Message Number:  609
Message:         Error in document: BKPFF $ UDRCLNT200
Message Type:    E
Message Class:   RW
Message Number:  008
Message:         FI/CO interface: Inconsistent currency information
Below is the code
   *fill header
gd_documentheader-username   =  sy-uname.
gd_documentheader-header_txt = 'Test'.
gd_documentheader-comp_code  = p_ccode. gd_documentheader-doc_date   =  sy-datum.
gd_documentheader-pstng_date =  sy-datum.
gd_documentheader-doc_type   = 'KR'.
gd_documentheader-ref_doc_no = p_xblnr.
city = p_city.
state = p_state.
zipcode = p_zip.
*get tax juridisction code
IF NOT ( city     IS INITIAL ) AND
   NOT ( state    IS INITIAL ) AND
   NOT ( zipcode IS INITIAL ).
  SELECT SINGLE rfcdest INTO ttxd-rfcdest FROM ttxd
   WHERE kalsm = 'TAXUSX'.
  CLEAR x_com_jur.
  REFRESH t_com_jur.
  x_com_jur-city     =  city.
  x_com_jur-state    =  state.
  IF zipcode+5(4) EQ space.
    zipcode+5(4) = '0000'.
  ENDIF.
  CONCATENATE zipcode+0(5) '-' zipcode+5(4)
         INTO x_com_jur-zipcode.
  x_com_jur-country  = 'US'.
  CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'
    DESTINATION ttxd-rfcdest
    EXPORTING
      location_data    = x_com_jur
    IMPORTING
      location_err     = x_com_err
    TABLES
      location_results = t_com_jur.
  IF sy-subrc = 0.
    READ TABLE t_com_jur INTO x_com_jur INDEX 1.
    it_accountgl-taxjurcode =  x_com_jur-txjcd.
  ENDIF.
ENDIF.
*fill AP (line 1) - vendor related data
SELECT SINGLE zterm FROM lfb1 INTO p_zterm WHERE lifnr = p_lifnr.
it_accountpayable-itemno_acc = 1.
it_accountpayable-tax_code = p_txcd.
it_accountpayable-pmnttrms   = p_zterm. "SQ
it_accountpayable-vendor_no  = p_lifnr. "SQ
*it_accountpayable-item_text =
it_accountpayable-pymt_meth = p_pmet. "- SQ
APPEND it_accountpayable.
*fill GL (line 2)
it_accountgl-itemno_acc      =  2.
*item_text - sq
IF p_asset IS NOT INITIAL.
  TABLES : anlz,
           anla.
  SELECT SINGLE * FROM anlz  WHERE anln1 = p_asset.
  SELECT SINGLE * FROM anla WHERE anln1 = p_asset.
*concatenate '00' anla-KTOGR into it_accountgl-gl_account .
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = anla-ktogr
    IMPORTING
      output = it_accountgl-gl_account.
  it_accountgl-asset_no = p_asset.
  it_accountgl-sub_number = '0000'.
  it_accountgl-cs_trans_t = '105'.
  it_accountgl-acct_type = 'A'.
ELSE.
  it_accountgl-gl_account      = p_gl.
  it_accountgl-costcenter      = p_cc.
  it_accountgl-wbs_element     = p_posid.
ENDIF.
it_accountgl-comp_code       = p_ccode.
it_accountgl-tax_code = p_txcd.  "SQ
it_accountgl-pstng_date      =  sy-datum.
it_accountgl-fisc_year       =  sy-datum(4).
APPEND it_accountgl.
CLEAR it_currencyamount.
*fill currency ammounts for lines 1 & 2
it_currencyamount-currency    = p_waers.  "SQ
it_currencyamount-curr_type = '00'.
it_currencyamount-itemno_acc  = 1.
it_currencyamount-amt_base = - '1000'.
it_currencyamount-amt_doccur  = '200'. "p_totamt.
*it_currencyamount-tax_amt  = p_ttax.
APPEND it_currencyamount.
CLEAR it_currencyamount.
it_currencyamount-itemno_acc  = 2.
it_currencyamount-currency    = p_waers.  "SQ
it_currencyamount-amt_doccur  = '800'.
APPEND it_currencyamount.
*tax data
it_accounttax-itemno_acc = 1.
it_accounttax-tax_code = p_txcd.
**it_accounttax-tax_rate = p_ttax.
it_accounttax-gl_account = p_gl.
it_accounttax-acct_key = 'NVV'.
it_accounttax-cond_key = 'XP2I'.
*it_accounttax-direct_tax = 'X'.
APPEND it_accounttax.
   CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
  EXPORTING
    documentheader          = gd_documentheader
IMPORTING
   obj_key                 = wa_obj_key
  TABLES
   accountgl               = it_accountgl
*   ACCOUNTRECEIVABLE       =
   accountpayable          = it_accountpayable
   accounttax              = it_accounttax
    currencyamount          = it_currencyamount
*   CRITERIA                =
*   VALUEFIELD              =
*   EXTENSION1              =
    return                  =  it_return
COMMIT WORK.
Regards,
Priyaranjan

Similar Messages

  • With holding tax report with material and qty fields

    Dear All,
    Is there any standard report available with with holding tax data with material and qty fields.
    Thanks,
    Sekhar.

    dear Friend,
    Withholding tax will deduct on services. Hence Material and quantity is not relavent.
    There is no report is available also.
    reg
    Madhu M

  • Problem creating A/R Invoice with Withholding tax data via DI-Server

    Hi!
    Using the following SOAP Request to the DI-Server, I wanted to create an A/R Invoice having a withholding tax data but it always respond with an error saying
    Total taxable amount of all rows exceeds the base amount  [INV5.TaxbleAmnt][line: 1]
    SOAP Request:
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Header>
        <SessionID>203A3C01-7808-4638-8322-2307DF3C0F8F</SessionID>
      </env:Header>
      <env:Body>
        <dis:Add xmlns:dis="http://www.sap.com/SBO/DIS">
          <Service>InvoicesService</Service>
          <Document>
            <DocType>dDocument_Items</DocType>
            <HandWritten>tNO</HandWritten>
            <DocDate>2010-02-08</DocDate>
            <DocDueDate>2010-02-08</DocDueDate>
            <TaxDate>2010-02-08</TaxDate>
            <VatDate>2010-02-08</VatDate>
            <CardCode>NPI</CardCode>
            <Comments>test di-server soap message 1</Comments>
            <DocumentLines>
              <DocumentLine>
                <ItemCode>TRC</ItemCode>
                <Quantity>1</Quantity>
                <Price>1000</Price>
                <TaxCode>OVAT</TaxCode>
                <VatGroup>OVAT</VatGroup>
                <TaxLiable>tYES</TaxLiable>
                <WTLiable>tYES</WTLiable>
              </DocumentLine>
            </DocumentLines>
            <WithholdingTaxDataCollection>
              <WithholdingTaxData>
                <WTCode>C140</WTCode>
                <TaxableAmount>1000</TaxableAmount>
                <WTAmount>100</WTAmount>
              </WithholdingTaxData>
            </WithholdingTaxDataCollection>
          </Document>
        </dis:Add>
      </env:Body>
    </env:Envelope>
    OVAT rate above is 10%.
    The withholding tax code C140 is setup as
    rate=10,
    Category=Payment,
    Base Type=Net,
    % Base Amount = 100,
    Rounding Type = Commercial Values.
    We are using the New Zealand/Australia localization in SAP B1 2007A PL49.
    The above code can be successful only if I set the <WithholdingTaxDataCollection> node to:
            <WithholdingTaxDataCollection>
              <WithholdingTaxData>
                <WTCode>C140</WTCode>
                <TaxableAmount>0</TaxableAmount>
                <WTAmount>100</WTAmount>
              </WithholdingTaxData>
            </WithholdingTaxDataCollection>
    setting TaxableAmount equal to 0 which is not desired.
    Can anyone extend me some help, please?
    Thanks.

    Albert,
    Did you try adding this via the DI API and not the DI Server?  Do you get the same error?  Please see this SAP Note ...
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0001303019
    Eddy

  • Customer master with holding tax data

    Hi,
    I am working on customer master transaction 'XD01'. I want add new fields to the existing subscreen 'with holding tax' and new fields in the new subscreen. There is  no enhancement is available for this, but there a BADI 'CUSTOMER_ADD_DATA_CS'. But with this we can not update the data to table KNBW(with holding tax data). Can anybody worked on this type of requirements.
    Thanks in Advance
    Rajavardhana Reddy

    Hi Rajavardhana
    Here there two interfaces you can use for transfering data to database and getting data from database.
    SET_DATA     Data Transfer
    GET_DATA     Transfer Data
    Hope this helps you.
    Cheers
    Manohar

  • Posting Tax Amount in BAPI_ACC_DOCUMENT_POST (Tcode FB60 - Vendor Invoice)

    Where do I need to populate the Tax amount in BAPI_ACC_DOCUMENT_POST inorder to create Vendor Invoice (Non PO) - FB60.
    I have populated Tax information GL A/c, Condition key, Account key, Tax Code in u2018ACCOUNTTAXu2019 table and Tax amount $7 in 'CURRENCYAMOUNT' table but got below errors:
    u2018Balance in transaction currencyu2019 - when we have $-107in Vendor line, $100 in GL line & $7 in Tax line. (It showing difference $7).
    The tax amount must not be greater than the tax baseu2019 - When we have $-107 in Vendor line, $107 in GL line & $7 in Tax line.
    Here is the code, please check and suggest me:
    Header Details:
    it_documentheader-obj_type   = u2018BKPFFu2019.
    it_documentheader-doc_date   = u201811/08/2011u2019.
    it_documentheader-pstng_date = u201811/08/2011u2019.
    it_documentheader-comp_code  = u20180001u2019.
    it_documentheader-ref_doc_no = u2018TESTQ108u2019.
    it_documentheader-doc_type   = u2018KRu2019.
    it_documentheader-obj_key    = u2018$u2019.
    it_documentheader-username   = sy-uname.
    it_documentheader-bus_act    = u2018RFBUu2019.
    it_documentheader-fisc_year  = u20182011u2019.
    Vendor Line u2013 Accounts Payable
    lv_item_no  = 1.
    it_accountpayable-itemno_acc = u20181u2019.
    it_accountpayable-vendor_no  = u20187800988u2019.
    it_accountpayable-comp_code  = u20180001u2019.
    it_accountpayable-pmnttrms   = u2018DUBPu2019.
    it_accountpayable-tax_code   = u2018I1u2019.
    it_accountpayable-taxjurcode = u2018000003749u2019.
    it_accountpayable-item_text = u2018Test123u2019.
    Populate currency amount for account payable data
    it_currencyamount-itemno_acc = u20181u2019.
    it_currencyamount-curr_type  = '00'.
    it_currencyamount-currency   = u2018USDu2019.
    it_currencyamount-amt_doccur = -107.
    it_currencyamount-amt_base = 100.
    Append it_currencyamount.
    G/L Account data
    it_accountgl-acct_type  = u2018Su2019.                         " GL
    it_accountgl-itemno_acc = u20182u2019.
    it_accountgl-gl_account = u2018623000u2019.
    it_accountgl-item_text  = u2018Test123u2019.
    it_accountgl-costcenter = u20181099u2019.
    it_accountgl-profit_ctr = u20181u2019.
    it_accountgl-comp_code  = u20180001u2019.
    it_accountgl-tax_code   = u2018I1u2019.
    it_accountgl-taxjurcode = u2018000003749u2019.
    Append it_accountgl.
    it_currencyamount-itemno_acc = u20182u2019.
    it_currencyamount-curr_type  = '00'.
    it_currencyamount-currency   = u2018USDu2019.
    it_currencyamount-amt_doccur = 100.
    Append it_currencyamount.
    Tax Line Details:
    it_accounttax-itemno_acc = '3'.
    it_accounttax-gl_account = '0000210000'. 
    it_accounttax-acct_key = 'NVV'.
    it_accounttax-cond_key = 'XP1I'.
    it_accounttax-tax_code   = 'I1'.
    Append it_accounttax.
    it_currencyamount-itemno_acc = '3'.
    it_currencyamount-curr_type  = '00'.
    it_currencyamount-currency   = u2018USDu2019.
    it_currencyamount-amt_doccur = 7.
    it_currencyamount-amt_base = 100.
    Append it_currencyamount.

    Hi
    See this [post|BAPI_ACC_DOCUMENT_POST and partial non deductible VAT;. It's related with Note 487064 - Direct posting to tax account with AC BAPIs.
    I hope this helps you
    Regards
    Eduardo

  • Tax Data calculation using BAPI_ACC_INVOICE_RECEIPT_POST

    Hi,
    We are creating invoices using BAPI_ACC_INVOICE_RECEIPT_POST. However Tax is not getting calculated for the line items even if we pass the tax data through the field u201CTAX_CODEu201D in the table u201CACCOUNTGLu201D. The Tax value is to be updated in table BSEG and BSET, which is not happening after the IDOC posting. Please advice whether we need to pass the parameter (table) u201CACCOUNTTAXu201D (with data filled) in order to calculate the tax for the line items.
    We are passing the following parameters presently and IDOCS are getting posted successfully even though tax amounts are not getting calculated.
             CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_POST'
    exporting
       DOCUMENTHEADER = DOCUMENTHEADER  (With data)
       CUSTOMERCPD = CUSTOMERCPD                  (blank)
                  importing
                    OBJ_TYPE = OBJ_TYPE (blank)
                    OBJ_KEY = OBJ_KEY     (blank)
                    OBJ_SYS = OBJ_SYS      (blank)
           tables
             ACCOUNTPAYABLE = ACCOUNTPAYABLE   (Filled with data)
             ACCOUNTGL = ACCOUNTGL                           (Filled with data)
             ACCOUNTTAX = ACCOUNTTAX              (blank)
             CURRENCYAMOUNT = CURRENCYAMOUNT                          (Filled with data)
             PURCHASEORDER = PURCHASEORDER            (blank)
             PURCHASEAMOUNT = PURCHASEAMOUNT            (blank)
             RETURN = RETURN
             CRITERIA = CRITERIA
             VALUEFIELD = VALUEFIELD
             EXTENSION1 = EXTENSION1
           exceptions
             OTHERS =  1
    Regards,
    Gaurav.

    hiiii
    go throgh following link..it will solve your problem..
    make BAPI_ACC_DOCUMENT_POST calculate tax.
    regards
    twinkal

  • Tax calculation in BAPI_ACC_DOCUMENT_POST

    Hi all,
    We have a program in which BDC (Call Transaction) is used to do postings to GL accounts with transaction FB01.
    Now, the requirement is to use BAPI ‘BAPI_ACC_DOCUMENT_POST’ to do the postings. I did with bapi but one problem is coming in this. The tax data is calculated and displayed in the document but posting is not made to the tax account when done with bapi.
    If you have any pointers regarding this, please provide the same.
    Thanks and regards,
    Ridhima

    Hi,
    Check the following code :
    *&      Form  fill_account_tax
    FORM fill_account_tax USING p_compt CHANGING p_tax_amount.
    * ACCOUNTTAX
      PERFORM calculate_vat_amount USING t_notilus-comp_code
                                         t_notilus-vat_cod
                                         t_notilus-amt_doccur
                                CHANGING p_tax_amount
                                         accounttax-tax_code
                                         accounttax-tax_rate
                                         accounttax-acct_key
                                         accounttax-gl_account
                                         accounttax-cond_key.
      accounttax-tax_date   = sy-datum.
      accounttax-itemno_acc = p_compt.
      accounttax-itemno_tax = p_compt - 1.
      APPEND accounttax.
    ENDFORM.                    " fill_account_tax
    *&      Form  calculate_vat_amount
    FORM calculate_vat_amount  USING    p_comp_code
                                        p_vat_cod
                                        p_amount
                               CHANGING tax_amount
                                        w_vat_cod
                                        w_msatz
                                        w_ktosl
                                        w_hkont
                                        w_kschl.
      DATA : BEGIN OF t_mwdat OCCURS 0.
              INCLUDE STRUCTURE rtax1u15.
      DATA : END OF t_mwdat.
      DATA : w_ttc LIKE bseg-wrbtr.
      w_ttc = p_amount.
      CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
        EXPORTING
          i_bukrs           = p_comp_code
          i_mwskz           = p_vat_cod
          i_waers           = 'EUR'
          i_wrbtr           = w_ttc
        TABLES
          t_mwdat           = t_mwdat
        EXCEPTIONS
          bukrs_not_found   = 1
          country_not_found = 2
          mwskz_not_defined = 3
          mwskz_not_valid   = 4
          ktosl_not_found   = 5
          kalsm_not_found   = 6
          parameter_error   = 7
          knumh_not_found   = 8
          kschl_not_found   = 9
          unknown_error     = 10
          account_not_found = 11
          txjcd_not_valid   = 12
          OTHERS            = 13.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR t_mwdat.
      READ TABLE t_mwdat INDEX 1. "INTO s_mwdat
    * w_tax_amount = t_mwdat-WMWST.
      w_tax_amount = t_notilus-vat_amount.
      w_ktosl      = t_mwdat-ktosl.
      w_hkont      = t_mwdat-hkont.
      w_kschl      = t_mwdat-kschl.
      w_msatz      = t_mwdat-msatz.
      w_vat_cod    = p_vat_cod.
    ENDFORM.                    " calculate_vat_amount
    * call BAPI-function in this system
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader = documentheader
        IMPORTING
          obj_type       = l_type
          obj_key        = l_key
          obj_sys        = l_sys
        TABLES
          accountgl      = accountgl
          accountpayable = accountpayable
          currencyamount = currencyamount
          accounttax     = accounttax
          extension1     = extension1
          return         = return.
    Hope this helps,
    Erwan

  • Withholding Data With GL Posting BAPI

    Greetings,
    I am trying to use BAPI_ACC_GL_POSTING_POST to post line items (two of which are for state and federal withholding).  I am using an extension to send exit EXIT_SAPLACC4_001 some custom fields data and withholding data (through structure ACCIT_WT).  When I run the program that calls the bapi, I get desired reults for the line items I expect to see in the posted document.  However, when I double-click on the line item for which I expect to see withholding tax data there are problems.  Withholding tax code does not exist and none of the amounts that I am sending show up.  The Withholding tax types and names of the withholding tax types are the only fields that show up in the subscreen "Display Withholding Tax Info" of transaction F-43. Can someone please give me some insight into what I am doing wrong.  I am sending the following fields for structure ACCIT_WT:
    WITHT
    WT_WITHCD
    WT_QSSHH
    WT_QSSHB
    WT_BASMAN
    and I have tried sending values for the other fields.
    Does the grouping key WT_KEY have anything to do with my problem?
    Your assistance is greatly anticipated.  Thanks in advance.
    Kind Regards,
    Jason

    Hi Jason,
    Sorry to resurrect an old topic.
    I assume you managed to fix this problem? I found that I was able to get the system to automatically calculate the Extended Withholding Tax when using BAPI_ACC_DOCUMENT_POST by populating the following fields:
    IT_ACCIT-WT_KEY - link from the line item to the Withholding Tax data.
    IT_ACCWT-WT_KEY - same value as above.
    IT_ACCWT-WITHT - Withholding Tax type.
    IT_ACCWT-WT_WITHCD - Withholding Tax code.
    IT_ACCWT-WT_QSSHB - Withholding Tax Base amount in doc curr.
    I left the WT_BASMAN field empty.
    Hope this helps someone out there.
    Cheers,
    JB

  • How to pass dat to BAPI_ACC_DOCUMENT_POST

    hi,
    i'm working with BAPI_ACC_DOCUMENT_POST.in my program i need to adjust the account document ...so i pass the document number in the  document header of import parameters...and i need to pass the credit and debit data in the accountgl table..here i need to pass more than one debit/credit information against one document number(belnr)...can any one tell me how to code this in the program..i'm stuck here ..and this is urgent..thank you..
    challa

    Hi erwan,
    Looking to your code, i think you are filling with the same item number the GL item and the TAX item. They must be different. Also, you have to create an amount record for each item, one for GL and other to TAX item.
    Example:
    w_compt = w_compt + 1.
    GL Item.
    accountgl-itemno_acc   = w_compt.
    accountgl-comp_code    = t_notilus-comp_code.
    accountgl-tax_code     = t_notilus-vat_cod.
    accountgl-item_text    = t_notilus-item_text.
    accountgl-doc_type     = t_notilus-doc_type.
    APPEND accountgl.
    Currencyamount For GL Item.
    currencyamount-itemno_acc = w_compt.
    currencyamount-currency   = t_notilus-currency.
    currencyamount-curr_type  = '00'.
    currencyamount-amt_doccur = t_notilus-amt_doccur.
    APPEND currencyamount.
    ENDIF
    Tax information.
    w_compt = w_compt + 1.
    perform calulate_tax_amount.
    accounttax-itemno_acc = w_compt.
    accounttax-gl_account  = '0000445660'.
    accounttax-tax_code   = t_notilus-vat_cod.
    accounttax-acct_key   = 'VST'.
    accounttax-cond_key   = 'MWVS'.
    APPEND accounttax.
    Currencyamount for Tax Item.
    currencyamount-itemno_acc = w_compt.
    currencyamount-currency   = t_notilus-currency.
    currencyamount-curr_type  = '00'.
    currencyamount-amt_doccur = t_notilus-amt_doccur.
    currencyamount-amt_base = w_tax_amount.
    APPEND currencyamount.
    I think that w_tax_amount must be informed in currencyamount-amt_doccur and t_notilus-amt_doccur in currencyamount-amt_base.
    Regards
    PabloX.

  • SEGMENT  FOR  WITHOLDING TAX DATA  FOR IDOC CREMAS03

    Hi all!
    Is there any segment for withholding tax data when creating creditor master data with IDoc CREMAS03? I need an other IDoc for this purpose?
    Thanks in advance
    Zapla

    Dear Atul,
    In function module AC_DOCUMENT_CREATE there is the structure
    T_ACCWT to pass the calculated tax items. In the
    BAPI_ACC_DOCUMENT_POST the corresponding BAPI structure has been added
    with release 6.0. For older releases it is posssible to pass the
    withholding tax items in structure EXTENSION1 and map it to T_ACCWT
    using a customer exit or the Business Transaction Event RWBAPI01.
    For the corresponding IDOC ACC_DOCUMENT the same holds.
    From release 6.0 on there is the IDOC segment E1BPACWT09 for
    passing WT information, in older releases E1BPPAREX
    can be used to pass the extension data, see note 487722.
    I hope this can help You.
    Mauri

  • Hello Technical Experts... please help me on this error :- 'Tax data is missing ArrayOffset 12, srcLineNum 0, srcGroupNum -1'.

    In my A/P credit memo screen i have incorporated a column for adding reference to closed A/P Invoices. upon filling this field with DocNum of APInvoice certain other fields also get filled from an SQL query. One among them is the TaxCode. My problem is that the TaxAmount(LC) field at the last row of the matrix is not filled with the appropriate value, it remains 0. On trying to add the document or pressing the link button on the TaxAmount field a status bar error message pops up showing, 'Tax data is missing ArrayOffset 12, srcLineNum 0, srcGroupNum -1'.
    Please Help me solve this issue.
    Thanks in Advance
    Rajeev

    Hi,
    Please check SAP note:
    1860926 - When updating a Purchase Order via DI API "-12109 Tax data
    is missing..." Error occurs
    Thanks & Regards,
    Nagarajan

  • Goods Receipt by DI API - Tax Data is Missing

    Hi all,
    When I add new document Goods Receipt by DI API then I have error : Tax data is missing.
    fragment my code : l
    pobranie = ((SAPbobsCOM.Documents)(SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenEntry)));
         pobranie.Reference2 = dr["RefNum"].ToString();
         pobranie.DocDate = DateTime.Now.Date;
         pobranie.DocDueDate = DateTime.Now.Date;
         pobranie.TaxDate = DateTime.Now.Date;
                                pobranie.Lines.ItemCode = dr["ItemCode"].ToString();
                                pobranie.Lines.Quantity = double.Parse(dr["Qty"].ToString());
                                pobranie.Lines.UnitPrice = (double)decimal.Parse(dr["Price"].ToString());
                                pobranie.Lines.Currency = dr["Currency"].ToString();
                                pobranie.Lines.AccountCode = dr["AcctCode"].ToString();
                                pobranie.Lines.WarehouseCode = dr["WhsCode"].ToString();
    dr - datareader in C#     
    I try to add line pobranie.Lines.TaxOnly = SAPbobsCOM.BoYesNoEnum.tYES or tNO it does't in proof
    Where is problem ?                
    THANKS a lot for your help
    Tomasz Derus

    Tomas, what support pack are you on?  There was a problem with the Material DI load.  The first 2 OSS Notes were in Support pack 14.  The third is coming in Support Pack 15.  Loading OSS NOTE 1265114 should fix your issue.
    Jayden
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1121867
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0001234550
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=0001265114

  • Clear Withholding tax data while posting customer invoice

    Gurus,
    I am trying to post Customer invoice document using FB01 transaction.
    If the customer has with holding tax information available in Customer Master the corresponding information is getting posted into invoice document.
    Is there any user exit, enhancement or substitution available to clear this with holding tax data.
    Please do share if any code examples on this issue.
    Appreciate your quick response.
    Thanks,
    Suneel

    Dear AMD008
    were you maintain properly in OB40 MWS (out put tax) relevant GL Account
    Note: are you using NEW GL please conform me
    Regards
    shankar

  • Tax issue with Direct Input mode of RFBIBL00

    Hi, I have a problem using <b>RFBIBL00</b> (direct input mode) to create A/R invoices. There is no tax associated with the invoice, however, when I use direct input mode, instead of posting immediately, a batch input session is created. In the log, an <b>information</b> message: <i>'Specify a tax jurisdiction key'</i>. The BDC session is processed with no error.
    When using Call transaction mode for RFBIBL00, the document is posted immediately but the requirement is to use Direct input mode.
    There is no converted data in the BBTAX structure since the doc. does not need to post to tax account. Do I need to populate the Tax amount, Tax code and jurisdiction code in this structure and BBSEG in order to by pass the information message?
    Any advice is appreciated.
    - Minami

    Problem solved. Just need to untie the relationship between the ITEM import structure and the BBTAX so the Direct Input program will not require a tax jurisdiction code.

  • Tax code with more than one tax rate

    Hi,
    I am using TAXINN procedure and I created on tax codes with more than one rate. i.e. for service tax I created  a tax code S1 with 3 rates as follows
    Acc. Key    Tax %      condition type
    VS9            12             JSE4
    VS0              2             JES4
    VSS              1             JHS4
    When I am trying to post a document with the above tax code the system is giving the following error message
    Tax code S1 may only contain one assignment line
    Message no. FF731
    Diagnosis
    For direct postings to tax accounts, only tax codes containing exactly one tax line may be used. Tax codes with several rates or a nondeductible portion are not allowed here.
    Procedure
    Use a different tax code.
    For direct postings to a tax account, you might have to define a separate tax code for which only one line with a percentage rate other than zero is active in percentage rate maintenance. All other lines must be inactive.
    To do this, choose Maintain entries (F5).
    Could you please let me know how to rectify this problem? I want to post 3 line items for each of base rate, Edu. Cess and Higher Edu.cess.
    Advance thanks for your help and
    Regards
    Koteswara Rao Padarti

    The problem is in the master data of the revenue account. the tax category should not be > and it should be *

Maybe you are looking for