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.