2021年6月8日星期二

Tax classification of Billing Determination

 LV60AA95 

Form VBRK_VBRP_DATENTRANSPORT

TVKOのXSTCEG(Tax Number)

A:From Sold To

B:From Payer

C: Destination Country of Ship-to

1.Get Tax classification from Sold-to ,payer or ship-to

 if vbrk-vbtyp na vbtyp_fkiv and
      vbrp-vgtyp ca vbtyp_lief and   "! delivery relevant
          lips-fkrel charj and         "! plant abroad / EU-TAX
          lips-vgtyp ne charv or       "! consignment fill-up, pickup
        not xvbpa_we-stceg is initial or "! manual value from order
        not vbrk-stceg_l is initial )"!
    perform vbrk-stceg_fuellen.
  else.
* control determination of the VAT registration
    if kurgv-stceg ne space and kurgv-kunnr ne kuagv-kunnr and
       tvko-xstceg is initial or tvko-xstceg flg_stceg_std or
       tvko-xstceg flg_stceg_rg.
* from payer

    vbrk-stceg  =  kurgv-stceg.
      vbrk-stceg_h 'B'.
      vbrk-stceg_l kurgv-land1.
      if kurgv-stceg_l ne space.
        vbrk-stceg_l kurgv-stceg_l.
        vbrk-stceg_h 'D'.
      endif.
      vbrk-taxk1  =  kurgv-taxk1.
      vbrk-taxk2  =  kurgv-taxk2.
      vbrk-taxk3  =  kurgv-taxk3.
      vbrk-taxk4  =  kurgv-taxk4.
      vbrk-taxk5  =  kurgv-taxk5.
      vbrk-taxk6  =  kurgv-taxk6.
      vbrk-taxk7  =  kurgv-taxk7.
      vbrk-taxk8  =  kurgv-taxk8.
      vbrk-taxk9  =  kurgv-taxk9.
    elseif kuwev-stceg ne space or kuagv-stceg space and
      tvko-xstceg is initial or tvko-xstceg flg_stceg_std ).
      vbrk-stceg  =  kuwev-stceg.
      vbrk-stceg_h 'A'.
      vbrk-stceg_l kuwev-land1.
      vbrk-taxk1  =  kuwev-taxk1.
      vbrk-taxk2  =  kuwev-taxk2.
      vbrk-taxk3  =  kuwev-taxk3.
      vbrk-taxk4  =  kuwev-taxk4.
      vbrk-taxk5  =  kuwev-taxk5.
      vbrk-taxk6  =  kuwev-taxk6.
      vbrk-taxk7  =  kuwev-taxk7.
      vbrk-taxk8  =  kuwev-taxk8.
      vbrk-taxk9  =  kuwev-taxk9.
    elseif tvko-xstceg is initial or
      tvko-xstceg flg_stceg_ag  or
      tvko-xstceg flg_stceg_std.
      vbrk-stceg  =  kuagv-stceg.
      vbrk-stceg_h 'C'.
      vbrk-stceg_l kuagv-land1.
      if kuagv-stceg_l ne space.
        vbrk-stceg_l kuagv-stceg_l.
        vbrk-stceg_h 'J'.
      endif.

* from Sold to

      vbrk-taxk1  =  kuagv-taxk1.
      vbrk-taxk2  =  kuagv-taxk2.
      vbrk-taxk3  =  kuagv-taxk3.
      vbrk-taxk4  =  kuagv-taxk4.
      vbrk-taxk5  =  kuagv-taxk5.
      vbrk-taxk6  =  kuagv-taxk6.
      vbrk-taxk7  =  kuagv-taxk7.
      vbrk-taxk8  =  kuagv-taxk8.
      vbrk-taxk9  =  kuagv-taxk9.
    endif.
  endif.                               "WIA / EU-TAX

2.IF tax classification of VBAK is not initial,vbrk will use the tax classification of vbak.

Function VIEW_KUAG2 (get Sold-to view)
LV60AA45  FORM KUAGV_FUELLEN


 CLEAR vtcom.
  vtcom-kunnr xvbpa-kunnr.
  vtcom-vkorg vbrk-vkorg.
  vtcom-vtweg vbrk-vtweg.
  vtcom-aland vbrp-aland.
  IF vbrk-landtx NE space.
    vtcom-aland vbrk-landtx.
  ENDIF.
 



CALL FUNCTION 'VIEW_KUAG2'
    EXPORTING
      comwa         vtcom
      init_kuagv    lvf_clear_kuagv
    IMPORTING
      agwa          kuagv
    EXCEPTIONS
      no_kna1       1
      no_knvv       2
      error_message 8
      OTHERS        7.

  IF sy-subrc <> AND sy-msgty 'A'.
    MESSAGE ID sy-msgid TYPE 'A' NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.



LV05EF1I  FORM READ_KNVI_KNVI_DD_01   Line  15

  CLEAR LKNVI.
  REFRESH LKNVI.
  CALL FUNCTION 'KNVI_GENERIC_READ_LAND'
       EXPORTING
            I_KUNNR   LVF_KUNNR
            I_ALAND   VTCOM-ALAND
       TABLES
            O_KNVI    LKNVI
       EXCEPTIONS
            NOT_FOUND 1
            OTHERS    2.



Defining the Tax Category by Departure Country (SD)

Use

A tax category must be defined by departure country. Allowable departure country is the plant’s country and/or the company code’s country.

The tax category allows entry of the tax classification indicator in the customer master data and material master data .

The tax category displayed in the customer master record depends on:

  • Customer sales organization’s company code country

  • Country of each plant assigned to that sales organization

The tax category displayed in the material master record depends on:

  • Material sales organization’s company code country

  • Country of each plant assigned to that sales organization

Procedure

In Customizing for Sales and Distribution, choose  Basic functions  Taxes    Define Tax Determination Rules.  You can also use transaction OVK1 (Table TSTL).

Tax category UTXJ must be maintained using a sequence of 1 for the US.

Tax category CTXJ must be maintained using a sequence of 1 for Canada.






没有评论:

发表评论

Customer Characteristic

  Characteristic Descriptions are stored in the table - CABNT - Language - SPRAS - Characteristic description - ATBEZ Characteristic Values ...