Problem with tax calculate tax in BAPI_ACC_DOCUMENT_POST

Hi ,
I am using BAPI_ACC_DOCUMENT_POST to  post financial details to G/L accounts .
The BAPi has created the acoounting document with the data I have passed,but I am
unable to calculate tax(i.e.When i click Calculate tax check box in FB01 ,a tax line item gets created,)
but the same is not happening when i use the BAPI.
Can any one throw light on the data that needs to be passed to the TABLE ACCOUNTTAX and how the
corresponding changes that needs to be done to TABLE CURRENCYAMOUNT inorder to create this new line item.
i have also had a look at the OSS notes but still am facing issue .
Pl help!!I

Hi
This is my code to fill ACCOUNTTAX:
LOOP AT GL_ITEM INTO W_GL_ITEM .
    ITEMNO_ACC = ITEMNO_ACC + 1.
    IF W_GL_ITEM-VAT = SPACE.
      ACCOUNTGL-ITEMNO_ACC = ITEMNO_ACC.
      ACCOUNTGL-GL_ACCOUNT = W_GL_ITEM-HKONT.
      ACCOUNTGL-BUS_AREA   = W_GL_ITEM-GSBER.
      ACCOUNTGL-TAX_CODE   = W_GL_ITEM-MWSKZ.
      ACCOUNTGL-PROFIT_CTR = W_GL_ITEM-PRCTR.
      ACCOUNTGL-COSTCENTER = W_GL_ITEM-KOSTL.
      ACCOUNTGL-REF_KEY_2  = W_GL_ITEM-XREF2.
      ACCOUNTGL-REF_KEY_3  = W_GL_ITEM-XREF3.
      APPEND ACCOUNTGL.
      PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR 0.
      CLEAR ZSDFI_BAPI_EXTENSION.
      ZSDFI_BAPI_EXTENSION-ITEMNO_ACC = ITEMNO_ACC.
      ZSDFI_BAPI_EXTENSION-ZLIFNR     = W_GL_ITEM-ZLIFNR.
      ZSDFI_BAPI_EXTENSION-CANALE     = W_GL_ITEM-ZJ_3AKVGR6.
      MOVE ZSDFI_BAPI_EXTENSION TO EXTENSIONS.
      APPEND EXTENSIONS.
    ELSE.
      ACCOUNTTAX-ITEMNO_ACC = ITEMNO_ACC.
      ACCOUNTTAX-TAX_CODE   = W_GL_ITEM-MWSKZ.
      ACCOUNTTAX-ACCT_KEY   = W_GL_ITEM-KOSTL.
      ACCOUNTTAX-COND_KEY   = W_GL_ITEM-KSCHL.
      ACCOUNTTAX-TAXJURCODE = W_GL_ITEM-TXJCD.
      ACCOUNTTAX-TAXJURCODE_DEEP  = W_GL_ITEM-TXJCD_DEEP.
      ACCOUNTTAX-TAXJURCODE_LEVEL = W_GL_ITEM-TXJLV.
      APPEND ACCOUNTTAX.
      PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR W_GL_ITEM-BASE.
    ENDIF.
  ENDLOOP.
FORM FILL_AMOUNT USING    P_AMOUNT P_BASE.
  CURRENCYAMOUNT-ITEMNO_ACC = ITEMNO_ACC.
  CURRENCYAMOUNT-CURR_TYPE  = '00'.
  CURRENCYAMOUNT-CURRENCY   = T001-WAERS.
  CURRENCYAMOUNT-AMT_DOCCUR = - P_AMOUNT.
  CURRENCYAMOUNT-AMT_BASE   = - P_BASE.
  APPEND CURRENCYAMOUNT.
ENDFORM.                    " FILL_AMOUNT
The tax data are picked by fm CALCULATE_TAX_FROM_NET_AMOUNT
REFRESH T_MWDAT.
      CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
           EXPORTING
                I_BUKRS           = BUK_TO
                I_MWSKZ           = T_BASE-MWSKZ_OUT
                I_WAERS           = _BKPF-WAERS
                I_WRBTR           = T_BASE-WRBTR
           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.
      ELSE.
        LOOP AT T_MWDAT.
          CLEAR W_GL_ITEM.
          W_GL_ITEM-HKONT   = T_MWDAT-HKONT.
          W_GL_ITEM-MWSKZ   = T_BASE-MWSKZ_OUT.
          IF T_BASE-KBETR = T_MWDAT-KBETR.
            W_GL_ITEM-WRBTR   = T_BASE-FWSTE.
          ELSE.
            W_GL_ITEM-WRBTR   = T_MWDAT-WMWST.
          ENDIF.
          W_GL_ITEM-VAT   = 'X'.
          W_GL_ITEM-KTOSL = T_MWDAT-KTOSL.
          W_GL_ITEM-TXJCD = T_MWDAT-TXJCD.
          W_GL_ITEM-KSCHL = T_MWDAT-KSCHL.
          W_GL_ITEM-TXJCD_DEEP = T_MWDAT-TXJCD_DEEP.
          W_GL_ITEM-TXJLV = T_MWDAT-TXJLV.
          W_GL_ITEM-BASE  = T_BASE-WRBTR.
I hope it can help you
Max

Similar Messages

  • Problem with Excise Duty tax calcualtion in Invoice

    Hi experts,
    Need your rexpert advise on the below issue.
    We have MM invoice where by the tax is not calucalted correctly.
    The Material is subject to excise duty, on the GR the excise invoice is getting generated with Cenvat clering account with correct amount towards excise duty
    i.e. GR is done for amount - 52951.33 and corresponding Tax code is KE(10% excise duty, 3% Ecess and 2% CST) which comes correctly as 6214.73 approximately which is correct in case of GR
    But however when the Invoice is posted for corresponding GR, the amount of tax calculated is only 1307.50, which should have been 6214.73 as the amount on the GR.
    We really are not able to find out why their is diffrences in the calculation of excise duty.
    Request your expert advise on this regard.
    Thanks.
    Shahid.

    System will fetch the duties from J_1IGRXREF table into MIRO transaction. So firstly check whether duties are correctly updated for the respective Excise invoice in the said table.
    Secondly ensure you have selected the correct tax code in MIRO same as PO tax code. There may be a chance that user had changed the tax code after posting the GRN in the Purchase order.
    Finally check whether the condition records are valid for the selected tax code in FV13 transaction code and are not set to deleted.

  • Problem with "Tax Code" and "Calculate tax automatically" fields

    Hi again.
    I have made a program which posts account documents through the BAPI_ACC_DOCUMENT_POST function module, and, since there were some fields which weren't available for me to fill having the FM by itslef, I have implemented the AC_DOCUMENT BAdI.
    All document data is provided by means of an SAP XI interface, through a Z IDoc.
    When I create the Account Receivable (and/or Payable) structure, I fill, through the BAdI, the BKPF-XMWST (Calculate tax automatically) and BSEG-MWSKZ (Tax code) fields. However, even the resulting posted document does have the Tax Information fields completed (the ones in the BSET table), the BAPI doesn't create the tax position automatically (just like the FB01 or FB60 transactions do). Note that the amounts are sent in their gross value by the interface (that's why the debit and credit sides remain consistent and the document is posted correctly).
    How can I have that position created? Is there a function module which I can call or something?
    Thanks a lot in advance.

    Hi
    I only use the fm CALCULATE_TAX_FROM_NET_AMOUNT or CALCULATE_TAX_FROM_GROSSAMOUNT in order to get all information I need to transfer to the BAPI. Both fms return the data by table parameter T_MWDAT.
    U can read this table and get all information u need, these code is from my old program, I hope it can help you:
    - Calculate tax data:
    CALL FUNCTION 'CALCULATE_TAX_FROM_NET_AMOUNT'
            EXPORTING
              I_BUKRS           = BUK_TO
              I_MWSKZ           = T_BASE-MWSKZ_OUT
              I_WAERS           = _BKPF-WAERS
              I_WRBTR           = T_BASE-WRBTR
            TABLES
              T_MWDAT           = T_MWDAT
           EXCPTIONS.
          IF SY-SUBRC <> 0.
          ELSE.
    * Load tax item
            LOOP AT T_MWDAT.
              CLEAR W_GL_ITEM.
              W_GL_ITEM-HKONT   = T_MWDAT-HKONT.
              W_GL_ITEM-MWSKZ   = T_BASE-MWSKZ_OUT.
              IF T_BASE-KBETR = T_MWDAT-KBETR.
                W_GL_ITEM-WRBTR   = T_BASE-FWSTE.
              ELSE.
                W_GL_ITEM-WRBTR   = T_MWDAT-WMWST.
              ENDIF.
              W_GL_ITEM-IVA   = 'X'.
              W_GL_ITEM-KTOSL = T_MWDAT-KTOSL.
              W_GL_ITEM-TXJCD = T_MWDAT-TXJCD.
              W_GL_ITEM-KSCHL = T_MWDAT-KSCHL.
              W_GL_ITEM-TXJCD_DEEP = T_MWDAT-TXJCD_DEEP.
              W_GL_ITEM-TXJLV = T_MWDAT-TXJLV.
              W_GL_ITEM-BASE  = T_BASE-WRBTR.
              COLLECT W_GL_ITEM INTO GL_ITEM.
    - Append GL or Tax item for the BAPI
    LOOP AT GL_ITEM INTO W_GL_ITEM .
        ITEMNO_ACC = ITEMNO_ACC + 1.
        IF W_GL_ITEM-IVA = SPACE.
    * GL item
        ELSE.
    * Tax item
          ACCOUNTTAX-ITEMNO_ACC = ITEMNO_ACC.
          ACCOUNTTAX-TAX_CODE   = W_GL_ITEM-MWSKZ.
          ACCOUNTTAX-ACCT_KEY   = W_GL_ITEM-KOSTL.
          ACCOUNTTAX-COND_KEY   = W_GL_ITEM-KSCHL.
          ACCOUNTTAX-TAXJURCODE = W_GL_ITEM-TXJCD.
          ACCOUNTTAX-TAXJURCODE_DEEP  = W_GL_ITEM-TXJCD_DEEP.
          ACCOUNTTAX-TAXJURCODE_LEVEL = W_GL_ITEM-TXJLV.
          APPEND ACCOUNTTAX.
          PERFORM FILL_AMOUNT USING W_GL_ITEM-WRBTR W_GL_ITEM-BASE.
        ENDIF.
      ENDLOOP.
    Max
    Edited by: max bianchi on Nov 25, 2009 7:43 PM

  • Calculate tax item field name in bapi .. bapi_acc_document_post

    Hello Friends,
    Im using Bapi>> Bapi_acc_document_post to post vendor and customer invoices, im not getting mapping field for the "calculate tax item(checkbox)" technical name is xmwst in any of the bapi strucuture.
    please tell me in which bapi structure we have to pass this field so that the tax amount should get calculated automatically.
    regards,
    Sunny

    You can try the Financial Posting Interface (FIPI).
    *=======================================================================
    CONSTANTS:
    *=======================================================================
                c_typehead  TYPE stype_pi VALUE 'K',
                c_typepos   TYPE stype_pi VALUE 'P',
                c_waers     TYPE waers    VALUE 'EUR',
                c_blart     TYPE blart    VALUE 'ZN',
                c_debit     TYPE bschl    VALUE  '40',
                c_credit    TYPE bschl    VALUE  '50',
                c_inddebit  TYPE shkzg    VALUE  'S',
                c_indcredit TYPE shkzg    VALUE  'H'.
    *===================================================================
    FORM append_ftpost
    *===================================================================
                      USING    p_stype   TYPE stype_pi
                               p_count   TYPE count_pi
                               p_fnam    TYPE bdc_fnam
                               p_fval    TYPE any
                      CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: ls_ftpost LIKE LINE OF pt_ftpost.
      CLEAR ls_ftpost.
      ls_ftpost-stype = p_stype.
      ls_ftpost-count = p_count.
      ls_ftpost-fnam  = p_fnam.
      ls_ftpost-fval  = p_fval.
      APPEND ls_ftpost TO pt_ftpost.
    ENDFORM.                    "append_ftpost
    *===================================================================
    FORM post_document
    *===================================================================
                        USING    p_bukrs   TYPE bukrs
                                 p_gjahr   TYPE gjahr
                                 p_monat   TYPE monat
                                 p_tip     TYPE zga_nomtipcont
                                 p_saknr   TYPE saknr
                                 p_bktxt   TYPE bktxt
                                 pt_pos    TYPE tt_pos.
      DATA: lt_blntab TYPE tt_blntab,
            lt_ftpost TYPE tt_ftpost,
            lt_fttax  TYPE tt_fttax,
            ls_blntab LIKE LINE OF lt_blntab.
      REFRESH: lt_blntab,
               lt_ftpost,
               lt_fttax.
      CALL FUNCTION 'ENQUEUE_EZGA_NOMLOG'
        EXPORTING
          bukrs          = p_bukrs
          gjahr          = p_gjahr
          monat          = p_monat
          tipcont        = p_tip
          _wait          = 'X'
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      PERFORM fill_bkpf USING    p_bukrs p_gjahr
                                 p_monat p_bktxt
                        CHANGING lt_ftpost.
      PERFORM fill_bseg USING    p_saknr p_bktxt
                        CHANGING pt_pos lt_ftpost.
      CALL FUNCTION 'POSTING_INTERFACE_START'
        EXPORTING
          i_function = 'C'
          i_mode     = 'N'
          i_update   = 'S'.
      CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'
        EXPORTING
          i_tcode  = 'FB01'
        IMPORTING
          e_msgid  = sy-msgid
          e_msgno  = sy-msgno
          e_msgty  = sy-msgty
          e_msgv1  = sy-msgv1
          e_msgv2  = sy-msgv2
          e_msgv3  = sy-msgv3
          e_msgv4  = sy-msgv4
          e_subrc  = sy-subrc
        TABLES
          t_blntab = lt_blntab
          t_ftpost = lt_ftpost
          t_fttax  = lt_fttax.
      IF sy-subrc IS NOT INITIAL.
        MESSAGE i021(zga_nom).
      ELSE.
    *  Grabación en tabla de log y mensaje
        READ TABLE lt_blntab INTO ls_blntab INDEX 1.
        IF sy-subrc        IS INITIAL AND
           ls_blntab-belnr IS NOT INITIAL.
          PERFORM insert_log USING p_bukrs
                                   p_gjahr
                                   p_monat
                                   p_tip
                                   ls_blntab-belnr.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSE.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
      CALL FUNCTION 'POSTING_INTERFACE_END'
        EXCEPTIONS
          session_not_processable = 1
          OTHERS                  = 2.
      CALL FUNCTION 'DEQUEUE_EZGA_NOMLOG'
        EXPORTING
          bukrs   = p_bukrs
          gjahr   = p_gjahr
          monat   = p_monat
          tipcont = p_tip.
    ENDFORM.                    " post_document
    *===================================================================
    FORM insert_log
    *===================================================================
                    USING p_bukrs TYPE bukrs
                          p_gjahr TYPE gjahr
                          p_monat TYPE monat
                          p_tip   TYPE zga_nomtipcont
                          p_belnr TYPE belnr_d.
      DATA: lv_belnr TYPE belnr_d,
            ls_log   TYPE zga_nomlog.
      CLEAR: lv_belnr, ls_log.
      ls_log-bukrs   = p_bukrs.
      ls_log-gjahr   = p_gjahr.
      ls_log-monat   = p_monat.
      ls_log-tipcont = p_tip.
      ls_log-belnr   = p_belnr.
      SELECT SINGLE belnr INTO lv_belnr
        FROM zga_nomlog
        WHERE bukrs   = p_bukrs AND
              gjahr   = p_gjahr AND
              monat   = p_monat AND
              tipcont = p_tip.
      IF sy-subrc IS INITIAL.
        UPDATE zga_nomlog FROM ls_log.
      ELSE.
        INSERT zga_nomlog FROM ls_log.
      ENDIF.
    ENDFORM.                    "insert_log
    *===================================================================
    FORM get_posting_date
    *===================================================================
                          USING    p_gjahr TYPE gjahr
                                   p_monat TYPE monat
                          CHANGING p_date  TYPE dats.
      DATA: lv_date TYPE dats,
            lv_month TYPE tfmatage.
      IF p_monat <= '12'.
        CONCATENATE p_gjahr p_monat '01' INTO lv_date.
        CALL FUNCTION 'FIMA_END_OF_PERIOD_DETERMINE'
          EXPORTING
            i_date               = lv_date
            i_months             = '1'
          IMPORTING
            e_date_end_of_period = p_date.
      ELSE.
        CONCATENATE p_gjahr '1231' INTO p_date.
      ENDIF.
    ENDFORM.                    "get_posting_date
    *======================================================================
    FORM fill_bkpf
    *======================================================================
                     USING    p_bukrs   TYPE bukrs
                              p_gjahr   TYPE gjahr
                              p_monat   TYPE monat
                              p_bktxt   TYPE bktxt
                     CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: lv_posting_date TYPE dats,
            lv_dats TYPE char10.
      PERFORM get_posting_date USING    p_gjahr p_monat
                               CHANGING lv_posting_date.
      WRITE lv_posting_date TO lv_dats.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BUKRS' p_bukrs
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-MONAT' p_monat
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BLART' c_blart
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BUDAT' lv_dats
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BLDAT' lv_dats
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-WAERS' c_waers
                            CHANGING pt_ftpost.
      *PERFORM append_ftpost USING    c_typehead '1'*
                                     *'BKPF-XMWST'  'X'*
                            *CHANGING pt_ftpost.*
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-BKTXT' p_bktxt
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typehead '1'
                                     'BKPF-XBLNR' p_bktxt+0(16)
                            CHANGING pt_ftpost.
    ENDFORM.                    "fill_bkpf
    *===================================================================
    FORM fill_bseg
    *===================================================================
                          USING  p_saknr   TYPE saknr
                                 p_bktxt   TYPE bktxt
                        CHANGING pt_pos    TYPE tt_pos
                                 pt_ftpost TYPE tt_ftpost.
      DATA: ls_pos      LIKE LINE OF pt_pos,
            ls_ftpost   LIKE LINE OF pt_ftpost,
            lv_item     TYPE buzei,
            lv_wrbtr    TYPE wrbtr,
            lv_saknr    TYPE saknr,
            lv_bschl    TYPE bschl,
            lt_poscont  TYPE TABLE OF zga_nompospost,
            ls_poscont  LIKE LINE OF lt_poscont,
            ls_poscontaux LIKE LINE OF lt_poscont.
      CLEAR: ls_pos, ls_ftpost.
      REFRESH lt_poscont.
      LOOP AT pt_pos INTO ls_pos.
        MOVE-CORRESPONDING ls_pos TO ls_poscont.
        APPEND ls_poscont TO lt_poscont.
      ENDLOOP.
      SORT lt_poscont BY saknr.
      lv_item = '002'.
      LOOP AT lt_poscont INTO ls_poscontaux.
        ls_poscont = ls_poscontaux.
        AT NEW saknr.
          CLEAR: lv_wrbtr,
                 lv_saknr,
                 lv_bschl.
        ENDAT.
        CASE ls_poscont-shkzg.
          WHEN c_inddebit.
            lv_bschl = c_debit.
          WHEN c_indcredit.
            lv_bschl = c_credit.
        ENDCASE.
        IF ls_poscont-saknr IS INITIAL.
          lv_saknr = p_saknr.
        ELSE.
          lv_saknr = ls_poscont-saknr.
        ENDIF.
        IF ls_poscont-indhkont = abap_true.
          lv_wrbtr = lv_wrbtr + ls_poscont-wrbtr.
        ELSE.
          PERFORM fill_bsegpos USING   lv_bschl lv_saknr
                                       ls_poscont-wrbtr p_bktxt
                                       ls_poscont-kostl ls_poscont-prctr
                                       lv_item
                              CHANGING pt_ftpost.
          CLEAR: lv_wrbtr,
                 lv_saknr,
                 lv_bschl.
          lv_item = lv_item + 1.
        ENDIF.
        AT END OF saknr.
          IF ls_poscont-indhkont = abap_true.
            PERFORM fill_bsegpos USING   lv_bschl lv_saknr
                                         lv_wrbtr p_bktxt
                                         ls_poscont-kostl ls_poscont-prctr
                                         lv_item
                                CHANGING pt_ftpost.
            lv_item = lv_item + 1.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    "fill_bseg
    *===================================================================
    FORM fill_bsegpos
    *===================================================================
                        USING    p_bschl   TYPE bschl
                                 p_saknr   TYPE saknr
                                 p_wrbtr   TYPE wrbtr
                                 p_bktxt   TYPE bktxt
                                 p_kostl   TYPE kostl
                                 p_prctr   TYPE prctr
                                 p_pos     TYPE buzei
                        CHANGING pt_ftpost TYPE tt_ftpost.
      DATA: lv_wrbtrstr TYPE char16.
      WRITE  p_wrbtr TO lv_wrbtrstr
                    CURRENCY c_waers NO-SIGN.
      PERFORM append_ftpost USING    c_typepos p_pos
                               'BSEG-BSCHL' p_bschl
                      CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-HKONT' p_saknr
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-WRBTR' lv_wrbtrstr
                            CHANGING pt_ftpost.
      PERFORM append_ftpost USING    c_typepos p_pos
                                     'BSEG-SGTXT' p_bktxt
                            CHANGING pt_ftpost.
      IF p_kostl IS NOT INITIAL.
        PERFORM append_ftpost USING    c_typepos p_pos
                                      'COBL-KOSTL' p_kostl
                             CHANGING pt_ftpost.
      ENDIF.
      IF p_prctr IS NOT INITIAL.
        PERFORM append_ftpost USING    c_typepos p_pos
                                      'COBL-PRCTR' p_prctr
                             CHANGING pt_ftpost.
      ENDIF.
    ENDFORM.                    "fill_bsegpos
    Edited by: Javier Meavilla Olivas on Feb 25, 2010 1:25 PM

  • Problem with MRM_INVOICE_CREATE,Debit Notes and Withholding Tax Information

    Hi!
    I have a problem with MF MRM_INVOICE_CREATE.
    We use this MF to create a Debit Note. The problem is that the Debit Note is created without the withholding tax information.
    I send the info in this parameter: i_rbkpv-h_rbws.
    Do you have any idea? I couldn't find any information about this. I tried an alternative solution using a batch-input but we had some problems with user permitions (this MF is called from a Z RFC that is called from an ASP application).
    Thanks in advance!
    Bettina

    Hey, thanks.
    I send your solution to the person who was trying to solve this problem.
    For sure will solve the problem because, in a previous version, we were using the bapi you told me. For some unknown reason, they changed for the MRM_INVOICE_CREATE.
    Thanks a lot!

  • Problem with a vendor in Withholding tax.

    Dear Friends,
    I'm facing a problem with Vendor # 152230 from company code IN10. This vendor is withholding tax, and as you may know, when a vendor is withholding tax, the system gives a message informing that the vendor is withholding tax.
    With this particular vendor (Vendor # 152230), the system is not informing anything. Could you please check why this happens with this vendor, and others it does not?
    Please help me in solving this issue.
    Thanks a lot in advance to all!!

    Hi,
    Follow the menu path:
    IMG>>>Financial accounting>>accounts receivable & accounts payable>>>vendor accounts>>>>master data>>>preparation for creating master data>>>define screen layout per activity(vendors)....the new window will open.............you select Change Vendor (centrally) and go for details .double click on the Company code data for checking Field status whether the Withholding Tax field is Suppressed  or not......if not the make Optional and save it.
    Again do the same thing for :IMG>>>Financial accounting>>accounts receivable & accounts payable>>>vendor accounts>>>>master data>>>preparation for creating master data>>>define account group screen layout (vendors)....the new window will open.............double click on the Company code data for checking Field status whether the Withholding Tax field is Suppressed or not......if not the make Optional and save it.
    Now you check the GL field status(t.code OBC4) check whether the Withholding Tax field is Suppressed or not......if not the make Optional and save it.
    I think your problem will be solved.
    With Regards,
    sudipto

  • BAPI_ACC_INVOICE_RECEIPT_POST - can it calculate taxes

    Hi folks,
    I've serious problems with this BAPI. Thing is that I get document data for posting via IDoc INVOIC01.
    Now I want to map this data into structures of BAPI BAPI_ACC_INVOICE_RECEIPT_POST to post document via RFC in another system. Idoc data don't contain tax data.
    I expected that this BAPI can calculate tax, but it seems like I have to calculate tax one my own. This logic is to difficult.
    Is there a way to start the BAPI so that it calculates the tax internally and creates the line items accordingly???
    Thanks and best regards, Thomas

    Hi folks,
    I've serious problems with this BAPI. Thing is that I get document data for posting via IDoc INVOIC01.
    Now I want to map this data into structures of BAPI BAPI_ACC_INVOICE_RECEIPT_POST to post document via RFC in another system. Idoc data don't contain tax data.
    I expected that this BAPI can calculate tax, but it seems like I have to calculate tax one my own. This logic is to difficult.
    Is there a way to start the BAPI so that it calculates the tax internally and creates the line items accordingly???
    Thanks and best regards, Thomas

  • How to get the tax spliting functionality using BAPI_ACC_DOCUMENT_POST

    Hi Experts,
    In FB01 tcode when we post the invoice separate tax line item is getting created automatically.
    But we are posting invoice with BAPI_ACC_DOCUMENT_POST here it is not happening.
    Before posting this question here found a thread https://scn.sap.com/docs/DOC-43262.
    Here from the thread info we implemented the BADI and enabled the tax calc flag and implemented the exit.
    Still the separate tax line item is not getting created.
    Can any one please clarify how we can acheive that functionality.
    Thanks in advance.
    kind regards,
    Shiva

    Hello Shivram,
    Your requirement is post FI document with tax line item's automatically with using above BAPI ( FI Posting) ! Suppose you want to post vendor invoice as mentioned below.
    Expenses account.......Dr.....100
    Input tax account.........Dr.......10
      To Vendor account..............Cr....110
    Your upload format should be as mentioned below to post above document in SAP.
    Item No
    Company code
    Pos.date
    Doc.date
    Currency
    Ref
    Header text
    PK
    Account
    Amount
    Tax code
    Assignment
    Text
    00001
    1234
    28.05.2014
    28.05.2014
    USD
    TEST
    TEST
    40
    E1234
    5600
    XA
    TST
    TEST
    00002
    1234
    28.05.2014
    28.05.2014
    USD
    TEST
    TEST
    31
    1001
    6160
    Tax code line item of above '00001 pass in to Calculate tax BAPI which was mentioned above with all required fileds & you can get one retrun table over there > those line items ,you have to pass as additional line item in FI document. ( Through coding). Check with technical consultant.
    Read note : 1873588 - Filling tax information for BAPIs
    626235 - Tax postings with accounting BAPIs
    Above notes only information purpose
    Regards
    Mani Kumar

  • AP Tax Calculation issue with SINGLE TAX vs TAX GROUP

    Hi Gurus,
    i need your help on below, please advise!!
    i have to calculate ap VAT tax on AP invoice,
    (Rounding = nearest, precession=2, tax calcualtion= Include tax)
    if i calculate 5% is the tax rate, then the tax amount is 0.47cents,this is in case of single tax calculation.
    here my requirement was i need calculate 2 Taxes(TAX A AND TAX B (Rates are 5 AND 5%)
    EG:
    Invoce Base amount = 10 dollars
    in case of single tax = 5/105 * 10 = 0.4761 cents(this is 48cents in apps with rouning nearest and precession 2)
    tax mode = Include tax
    In case of tax group = Tax A and Tax B = 5 + 5 = 10%, when i calculate this in apps its showing 45cents and 45 cents as tax A and B
    why this tax caluclation is different with single tax and tax group.
    tax code actual amount tax amount remaining amount
    single tax 10 0.4761 10 - 0.48cents = 9.52 cents
    tax group 10 45+45=90 cents 9.10 cents
    Please Help !!!
    Thanks,
    Satish

    Hi Vineeth,
    This is Kathy from BSI Support.  I wanted to make sure that you understood that the TF80 Like Reciprocal flag was made available in TF90 for testing purposes only.  This was meant as a tool for customers to be able to compare their TF90 results to their TF80 output, to insure a successful upgrade.  This funcitonality, however, was never intended to be utilized going forward.  There have been significant changes implemented in BSI TaxFactory 9.0 regarding multi-state withholding (also known as reciprocity).  There is information available on our website that explains these changes.  If you log onto our website, please look under the "Whats New" section for an explanation of reciprocal functionality in BSI TaxFactoryu2122 9.0
    If you have specific scenarios that you need help with, please contact us and we will be happy to assist you.
    Regards,
    BSI Support - Kathy

  • When the user press the button Calculate Tax (see attached doc) and click on Tax details then this should be updated automatically. But it does not work it is empty and the user has to update manually.

    When the user press the button Calculate Tax  and click on Tax details then this should be updated automatically. But it does not work it is empty and the user has to update manually.
    All setup looks fine.
    Please let me know what can be done on this?
    Regards,
    Peu

    HarryAustralia wrote:
    I recently updated my ipad wifi only to the new ios 6.1.2 and initially I had the auto cover lock option which can be seen in the Generals tab, but then it stoped working!! Before the update, the auto cover lock worked fine. So after trying all the options, I then did a complete reset on the ipad and now its gone all together from the General tab!! I can no longer see the "auto cover lock" option.
    The iPad cover lock is for when you use a cover with magnets in it to lock and unlock the iPad when you close the cover or open it. Try running a refrigerator magnet along the sides of the iPad and see if that trips the iPad Cover Lock back into the settings.
    That is not the same thing as the iPad Auto Lock setting which allows you to set an allotted time before the iPad goes to sleep.
    You can try resetting all settings to see if the Auto Lock feature retinrs to the iPad.
    Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. This can be a little time consuming re-entering all of the device settings again.

  • Advance payment and down payment with two diffierent tax code

    HI expert!!!
    i have one scenario that advance payment and down payment with different tax code.
    in this time, advance payement post to vendor with po number,  we do not know how to use tax code V1(deductable tax) or VF(Non-deductable tax),  so we post advance payement amount by tax code V1(deductable) even though the amount included both. but we must know how amount is defined deductable tax or non-deductable tax when invoice.
    when we want to post down payment with VF , we could not post it because advance payement posted with V1 tax code.
    this is main problem with my scenario.
    and  as i know,   can i post two advance payement to  same vendor and same po item?, i can't do it with my system.
    only one advacne payment  is possible with one vendor and one po item. or  amount of  advance payment is all cleared by down payment, then i can post another advance payment to same vendor.  is it standard process with po?
    thank you in advance!!

    hi,
    As per my knowledge their is no difference between  advance payment and downpayment.
    and tax code is used for taxes purpose not for the payment terms.
    taxcode is created in ftxp.and related percentages are maintained in fv11.
    ex:-
    if i want  excise duty  - 10% on basic value
    education cesse 2% on excise duty
    sec.education cesses 1% on excise duty
    then fitst i have to create 3 condition types and that 3 condition types are used in my taxprocedure  and that taxprocedure is assigned to country code..
    after that i am created one taxcode in ftxp like v1= exciseduty10%educatiocess2%sec.edu.cesses1% with this description.
    and given the values for that conditions in fv11.
    and used that v1 taxcode in your p.o in invoice tab.
    and payment terms are came from vendor not from taxcode.
    Thanking you.

  • Tax Report - Tax Register Book with no data

    Hy all! I'm facing a problem with the tax report:
    When i try to run the tax report (output mode: Tax register Book) i get the info message: "Data is not available; modify selection criteria and re-enter  " and no results are display!
    If i deselect the output mode "tax register book" and select the "vat declaration", with the same filters.... i can get results!
    I'm working with SAP Business One 8.8 PL 20
    Can anyone give me a hint?
    Thanks in advance.
    Inê

    Hi,
    Check the issue whether the same is happening when the COPY of the database is upgraded to latest patch in Test Enviornment.
    Else, you would be needing to log a message to SAP Support to get the issue investigated.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • How to calculate taxes in purchase register

    Hi all,
      i want to calculate taxes in purchase register for that
    i use function module 'calculate_tax_item'  but it calculates
    tax on po . i want taxes should calculate as per miro
    means it should be calculated on basic amount.
    Thanks
    Dinesh

    Hi,
       i dont know whether there is any function module available of no.. but u can get it from FI tables... link is from MIRO u can get the invoice no.. go to BKPF table in that there is a AWKEY filed is there put the MIRO No + Miro Year in that..u can use a select single .. from that u get the FI document .... field is BELNR.. then go to BSET table.. it contain the duty amount put that FI document number , FI year and Compny code and also put Debit/credit indicator as S.. u will list of records with duty.. from that HWBAS is he duty amount field and there is one percentage field.. if it is 12 % in that field its look like 120 as a multiple of 10.  Note this BSET will only be populated if there is any tax involved.. other wise it will be empty(ofcourse it cointian the whole accessable value amount).. i think it will help u..
    Regards
    Maneesh Chandran

  • How to calculate tax / discount amount on PO

    Hi,
    I have to calculate tax and discount on Purchase order and have add that to ekpo-netwr to get the actual amount. Can you please tell me how to do that?
    So far I have been taking the EKKO-KNUMV and going to KONV table and serach for records with that KNUMV. But here I am stuck.
    I can not understand (I mean I can not find the field to distinguish) which of the records is actually being used in the PO and has an amount (non-zero) against it, which I see in ME23N in "Condition" at header label.
    Reward Points Guaranteed.
    Regards,
    Anid

    Hi,
    Ya. Actually I need to know the Discount, Indiviual taxes (Like Freight tax etc) which we see the the "condition" tab of Header Data in ME23N. I have to make a total of them and subtract from (Sum of EKPO-NETWR ) to calculate the ACTUAL PRICE.

  • How to calculate tax amount

    Hi,
    I am working in driver program of service sheet entry SF. i want calculate Tax Amount of every line item of service entry sheet number.
      tax code, net value, total value  mention in line item but tax amount not.
    then How to calculate tax amount according tax code...............?

    Hi,
    Try with the below function module.
    CALCULATE_TAX_FROM_NET_AMOUNT
    Jshree

Maybe you are looking for

  • Lock downs, freezes and MADNESS!

    I am having a problem with frequent freezing on my iBook. By frequent I mean this thing freezes everytime I use it. Sometimes I'm OK for 30 minutes, sometimes for 5 minutes, but no matter how my computer sessions begin, I unfortunately know how they

  • Getting error while deploying New WebService project on standalone server

    Hi, I have created a new Model project for WebService and I am able to test this new webservice project by launching "TalentTasksServiceImpl.java" file locally but getting some error while deploying it on standalone server. See below log for more det

  • Can't import MPEG4//video blackout in YouTube upload?

    Two issues: 1) I can't import a QT/MPEG4 .mov file to work on as an event. Ideas? It's 4.3 GB... 2) Have a 1:30 video finished in iMovie, looks great in preview... but when uploaded to YouTube account, all video is gone; audio is fine, and intro and

  • Business Graphic rendering problem.

    I’m running J2ee (NW2004) SP20. I’ve been following this simple business graphics tutorial (http://help.sap.com/saphelp_nw04/helpdata/en/e5/08b6eb35637a44830b9e6df22987aa/content.htm) and get a generic image not found red x with I try and render my s

  • No instruments available - New install

    Hi guys, I've just put re-installed Logic 7.1 onto my new computer and it boots up fine but when i select and instrument from the box under i/o, the only option it gives me is 'no plug-in'.. and none of logics instruments or any other plugins seem to