Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation of OSS note 10560

Former Member
0 Kudos

I am trying to Implement OSS note 10560.

At one point its saying:

For synchronization of the tax determination and the export relevancy, extend the copying requirement you use for the billing document (item level) with the following source code:

III. Copying requirement billing document

FORM BEDINGUNG_PRUEFEN_nnn.

...

IF VBRK-LANDTX = KUWEV-LAND1. <<<<<<insert

CLEAR: VBRK-EXPKZ, VBRK-EXNUM. <<<<<<insert

ENDIF. <<<<<<insert

ENDFORM.

I am not able to understand how and where to implement it. Can someone help pls?

Answeres will be rewarded.

1 REPLY 1

Former Member
0 Kudos

Hi,

Before the Code to be implemented there is a program name for each and every code:

go to that program and find for that FORM or PERFORM statement and find the similar line then change:

Here is the note for you completely:

*********************************************

Note 10560 - Tax determination for plant abroad

Symptom

Case 1: Determination of the tax-relevant country of departure and

destination country in the customer billing document

The tax determination in SD is calculated according to the country of the supplying plant (country of departure) and the country of the ship-to party (destination country).

Access to the customer master and the material master for tax classification is carried out with the country of departure.

Access to the tax condition records takes place with the country of departure and the destination country.

In some cases, particularly the Cross Company case, you may wish to use the country of the sales organization rather than the country of the supplying plant as the departure country.

Case 2: Determination of the tax-relevant country of departure and

destination country in the special case of intercompany billing

(billing type IV)

In the case of intercompany billing for a Cross Company transaction, the company code country is used as the departure country.

The destination country is defined by the sales organization (customer master data record of the sales organization for intercompany billing).

Access to the tax condition records is carried out with the departure country and destination country.

Access to customer master and material master for tax classification takes place with the country of the plant.

In the standard system, the related company code is determined as follows:

Up to Release 2.2E:

Using the (supplying) sales organization for intercompany billing (Customizing: Transactions -> Billing documents -> Intercompany billing -> Plant).

As of Release 2.2F:

Using the plant (tables T001W, T001K)

Apart from these standard behaviors, the implementation of the following requirements is possible:

a) In some cases, you may wish to use the country of the supplying plant, instead of the country of the company code as the departure country.

b) In some cases you may wish to use the country of the ship-to party from the sales order instead of the country of the intercompany billing customer as the destination country.

Other terms

VA01, VF01, cross company, intercompany billing, country of departure, plant, destination country, ALAND, LAND1

Reason and Prerequisites

This is the standard system logic. If you require a behavior which is different from that of the standard system, this note describes possible solutions for the requirements specified under 1) and 2) which can basically be implemented via user exits.

If you have problems implementing this solution or special questions concerning Customizing, refer to your SAP consultant or to Remote Consulting.

Solution

You must refer to the related Note 381348.

Case 1: Customer Billing Document -

Using the Sales Organization Country as the Country of Departure

Note that the solution described here affects ALL customer billing documents and not just cross company transactions.

For order processing

-


Make the following change to determine the tax condition:

I. Program <b>MV45AFZZ</b>:

FORM USEREXIT_PRICING_PREPARE_TKOMK.

TKOMK-ALAND = T001-LAND1.

ENDFORM.

If the customer or material tax classification is also to be determined with this country, you must make a modification in programs FV45PFAP and FV45PF0M. No User exit exists here yet.

II. Program <b>FV45PFAP</b>

FORM VBAPD_FUELLEN_T001W.

CHECK: VBAP-WERKS NE SPACE.

PERFORM T001W_SELECT(SAPMV45A) USING VBAP-WERKS

SPACE

SY-SUBRC.

IF SY-SUBRC = 0.

  • Data for tax determination and cost determination

VBAPD-WKLND = T001W-LAND1.

VBAPD-WKREG = T001W-REGIO.

VBAPD-WKCOU = T001W-COUNC.

VBAPD-WKCTY = T001W-CITYC.

VBAPD-BWKEY = T001W-BWKEY.

ENDIF.

perform t001_select(sapmv45a) using tvko-bukrs <<<<<<<<<< insert

' ' <<<<<<<<<< insert

sy-subrc. <<<<<<<<<< insert

IF SY-SUBRC = 0. <<<<<<<<<< insert

VBAPD-WKLND = T001-LAND1. <<<<<<<<<< insert

ENDIF. <<<<<<<<<< insert

...

III. Program <b>FV45PF0M</b>

FORM MAEPV_SELECT USING US_MATNR

...

IF MTCOM-ALAND = SPACE.

PERFORM T001W_SELECT(SAPMV45A) USING US_WERKS

US_ERROR

SY-SUBRC.

MTCOM-ALAND = T001W-LAND1.

perform t001_select(sapmv45a) using tvko-bukrs <<<<<<<<<< insert

' ' <<<<<<<<<< insert

sy-subrc. <<<<<<<<<< insert

if sy-subrc = 0. <<<<<<<<<< insert

MTCOM-ALAND = T001-LAND1. <<<<<<<<<< insert

endif. <<<<<<<<<< insert

ENDIF.

...

For billing document processing

-


Make the following change to determine the tax condition:

I. <b>Program RV60AFZZ:</b>

FORM USEREXIT_PRICING_PREPARE_TKOMK.

IF XVBRK-VBTYP NA VBTYP_FKIV AND XVBRP-AUTYP NE 'V'.

TKOMK-ALAND = T001-LAND1.

ENDIF.

ENDFORM.

If the customer or material tax classification is also to be determined with this country, you must perform a modification in Program LV60AF0V (before Release 3.0C). A user exit exists as of Release 3.0C.

II. Program <b>LV60AF0V</b> (prior to release 3.0C)

FORM VBRK_VBRP_FUELLEN.

...

VBRP-ALAND = T001W-LAND1.

IF VBRK-VBTYP NA VBTYP_FKIV. <----


insert

VBRP-ALAND = T001-LAND1. <----


insert

ENDIF. <----


insert

VBRP-WKREG = T001W-REGIO.

VBRP-WKCOU = T001W-COUNC.

VBRP-WKCTY = T001W-CITYC.

VBRP-NETWR = 0.

VBRP-WAVWR = 0.

...

II. Program<b> RV60AFZC</b> (as of Release 3.0C)

FORM USEREXIT_FILL_VBRK_VBRP.

  • Example: change Tax country

  • VBRK-LANDTX = T001-LAND1.

IF VBRK-VBTYP NA VBTYP_FKIV AND LIPS-VGTYP NE 'V'. <<<<<<< insert

VBRK-LANDTX = T001-LAND1. <----


insert

ENDIF. <----


insert

ENDFORM.

For synchronization of the tax determination and the export relevancy, extend the copying requirement you use for the billing document (item level) with the following source code:

III. Copying requirement billing document

FORM BEDINGUNG_PRUEFEN_nnn.

...

IF VBRK-LANDTX = KUWEV-LAND1. <<<<<<insert

CLEAR: VBRK-EXPKZ, VBRK-EXNUM. <<<<<<insert

ENDIF. <<<<<<insert

ENDFORM.

Notes and restrictions for case 1:

Output tax posting is not generated automatically in the delivering plant (with the tax indicator of the delivering country)

Input tax posting is not generated automatically in the country of goods receipt (with the tax indicator of this country)

In the Intrastat declaration (issue country of the delivering plant and receipt country of goods receipt), the transaction is not reported.

Case 2: 'Intercompany billing'

a) Using the Country of the Plant as the Country of Departure

b) The Country of the Ship-to party from the Sales order as

Destination Country

a) Using the Country of the Plant as the Country of Departure

-


I. In copying control for billing documents (RVCPF), check which data

transport routines you use for intercompany billing. You find this

information in field 'Data VBRK/VBRP' in the detail view of the

item category.

Example: IV - LF item category TAN -> 'Data VBRK/VBRP': 001

II. Afterwards call up transaction VOFM and branch to:

Data Transfer -> Billing Document

III. Copy the form routine from the above (-> 5XX) and extend as follows:

TABLES: T001W. <<<<<<<<<< insert 1

FORM DATEN_KOPIEREN_5XX.

...

  • Item data

  • VBRP-xxxxx = ............

VBRP-ALAND = T001W-LAND1. <<<<<<<<<< insert

VBRK-LANDTX = T001W-LAND1. <<<<<<<<<< insert 2

  • Begin of insertion (2)

data: begin of xdummy occurs 1,

xdummy,

end of xdummy.

Tables: mtcom, maepv, mtcor. <<<<<<<<<< insert (3)

clear: mtcom, maepv, mtcor.

mtcom-kenng = 'MAEPV'.

mtcom-matnr = vbrp-matnr.

mtcom-werks = vbrp-werks.

mtcom-lgort = vbrp-lgort.

mtcom-novor = 'X' ." charx.

mtcom-aland = vbrp-aland.

call function 'MATERIAL_READ'

EXPORTING

schluessel = mtcom

IMPORTING

matdaten = maepv

return = mtcor

TABLES

seqmat01 = xdummy

EXCEPTIONS

material_not_found = 1

plant_not_found = 2.

IF MTCOR-RMLAN IS INITIAL.

if not maepv-taxm1 is initial.

vbrp-taxm1 = maepv-taxm1.

endif.

if not maepv-taxm2 is initial.

vbrp-taxm2 = maepv-taxm2.

endif.

if not maepv-taxm3 is initial.

vbrp-taxm3 = maepv-taxm3.

endif.

if not maepv-taxm4 is initial.

vbrp-taxm4 = maepv-taxm4.

endif.

if not maepv-taxm5 is initial.

vbrp-taxm5 = maepv-taxm5.

endif.

if not maepv-taxm6 is initial.

vbrp-taxm6 = maepv-taxm6.

endif.

ENDIF.

  • End of insertion (2)

..... ENDFORM.

Caution !!!

The INSERT marked (1) is only required if table T001W is not already defined in program FV60CTOP.

The INSERT marked (2) is only required as of Release 3.0X.

In the INSERT marked (3), the table definition of Table MAEPV is only required, if it had not already been defined in Program FV60CTOP.

IV. Check, save and activate the routine.

V. Assign the new routine in copying control for billing documents by replacing the routine determined under I.

Also consider Notes 51361 and 63103 for the general settings for the tax treatment if you use plants abroad.

b) Using the Coutry of the ship-to party from the Sales order as

Destination country

-


You have this option only as of Release 3.0A. For Releases 3.0A - 3.1Iyou have to implement Note 99745 first.

You proceed similar as in case 2.a. Instead of the correction of the

data transport routine described in 2.a you only apply a line in the

transport routine you used before.

FORM DATEN_KOPIEREN_5XX. ...

VBRK-LAND1 = VBRP-LLAND_AUFT. <<<<<<<<<< insert

...

ENDFORM.

Header Data

Release Status: Released for Customer

Released on: 28.04.2003 13:05:51

Priority: Recommendations/additional info

Category: Workaround for missing functionality

Primary Component: SD-BIL Billing

Releases

Software

Component Release From

Release To

Release And

subsequent

SAP_APPL 22 22A 22J X

SAP_APPL 30 300 31I X

SAP_APPL 40 40A 40B X

SAP_APPL 45 45A 45B X

SAP_APPL 46 46A 46B X

SAP_APPL 46C 46C 46C X

SAP_APPL 470 470 470 X

SAP_APPL 500 500 500 X

SAP_APPL 600 600 600 X

EBP 46B 461 461

Highest Implemented Support Package

Support

Packages Release Package

Name

EBP 461 SAPKGB1A03

Related Notes

434562 - Determination and country of VAT registration number

381348 - Using user exit, customer exit, VOFM in SD

354222 - Foreign trade data incomplete for domestic business

204996 - Region in the billing document

202377 - Incorrect tax determ. for order-related intercompany billing

159115 - Region with intercompany billing

99745 - Destination country for intercompany billing

63103 - Plants abroad (tax procedure)

51361 - Plants abroad

21734 - Determining sales tax (VAT) from any partner

1779 - VAT could not be found

Reward if useful,

Regards,

anji