Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

In this document is explained how the data are determined in the table VEIAV.

 

Central Routine for Determination: form REPORTING_CHARACT_DETERMINE in include RMIMSELS (transaction MEIS and transaction VI99).

In this routine the VEIAV fields are set and determined from the document data (good place for a Break Point!)

Customizing settings (transaction VEB1) define which records from this internal table are displayed in the incompletion log.

For this documentation the VEIAV fields (except key fields) are sorted in alphabetical order.

The documentation is valid for transaction MEIS and VI99. Whenever the VI99 logic is different it is documented separately.         

 

Key Fields

MANDT

Client / Mandant

= SY-MANDT

 

DATUMJAHR

Reporting Year / Meldejahr

= input from selection screen

 

DATUMMONA

 Reporting Month / Meldemonat

= input from selection screen

 

ARRIVDEPA

Goods Direction / Warenrichtung

= 1 (Arrival)

VI99:

= 2 (Dispatch)

 

LFDNRVEIA

Sequential Number / fortlaufende Satznummer

= automatically determined and increased during selection run

 

Function Fields

ARTGESCHA

Business Transaction Type / Geschäftsart

"Business Transaction Type" populated in the document (field EIPO-EXART)?

Y: = EIPO-EXART

N: → EIP011

VI99:

Note: Conversion of Import Business Transaction Type of the reporting country into Export Business Transaction Type of the reporting country is done in Customizing: Basic Data for Foreign Trade →  Control/Conversion → Convert Export into Import Business Transaction Type (=Transaction VI47)

Read conversion table T605U with (table may be read several times → recursive access) 

•Reporting Country

•Import Business Transaction Type (field EIPO-EXART)

•Reporting Country

Export Business Transaction Type found in conversion table?        

Y: = T605U-EXART_IMP

N: → EIP017                   

 

BELEGIDEN

Document Category / Belegtyp

= EKKO-BSTYP

 

BELEGNUMR

Document Number / Belegnummer

= EKPO-EBELN

Exception:

If data are determined from an inbound delivery (selection logic = A): = EKES-VBELN 

 

BESONMAAK

Quantity in Supplementary Unit / Menge in besonderer Maßeinheit

Note:  RESULT table contains quantities in PO unit

"Commodity Code" populated in the document (field EIPO-STAWN)?

Y: check if Supplementary Unit is defined for the Commodity Code → read table T604 with:

•Reporting Country

•Commodity Code (field EIPO-STAWN)

(if no entry is found or Supplementary Unit is not defined re-read,T604 with Commodity Code, length 8)

Entry found?

Y: Supplementary Unit is populated?

Y: Supplementary Unit = PO Unit? / T604-BEMEH = EKPO-MEINS

Y: = total of RESULT_tab-MENGE

N: Basic unit (field EKPO-LMEIN) populated?

Y: if basic unit <> PO unit → convert to basic unit / if conversion fails → EIP021

Basic Unit = Supplementary Unit?

Y: = result of unit conversion

N: convert Basic unit into Supplementary unit / if conversion fails → EIP021

= result of unit conversion

N: convert PO unit into Supplementary unit via FM CONVERSION_FACTOR_GET (possible only if both units have same Dimension / if it fails → EIP 021)

= result of unit conversion

N: = initial

N: → EIP012

 

BESONMAEH

Supplementary Unit / Besondere Maßeinheit

= T604-BEMEH (access see field BESONMMAK)

 

BESONMASS

 Quantity in Supplementary Unit / Menge in besonderer Maßeinheit

= initial (obsolete, new field: BESONMAAK)

 

BESTILAND

Delivering Country / Abgangsland

Note: Decision if numeric or alphanumeric country key is reported is made in Custoimzing: Periodic Declaration → Control Data → Data Selection Control → Data Selection Control (field T609IS-NLNKY)

"Country of Dispatch" populated?

Y: = EIPO-VERLD

N: Goods supplier (field EKKO-LLIEF) or (if missing) vendor (field EKKO-LIFNR) defined?

Y: = Country of the Goods Supplier resp. of the Vendor

N: = Country of Delivering Plant (PO transfer orders)

Read table T609II (transaction VEB2) with:

•BESTILAND

•Region of Goods Supplier resp. Vendor resp. Region of Delivering Plant (PO transfer orders)

•Inclusion flag = X

•Conversion flag = X

(if no entry is found re-read,T609II with field "Region" = initial)

Entry found?

Y: numeric country code required?

Y: = T609II-LANDA

N: = T609II-INTCA   

N: numeric country code required?

Y: = T005-INTCN

 N: = T005-INTCA

Destination Country not determined → EIP 006                     

VI99:

For dispatches BESTILAND contains Destination Country! VI99 sets Destination Country only if PO item is flagged as return (field EKPO-RETPO). Otherwise, same logic as for MEIS.

 

BESTIREGI

Destination Region / Bestimmungsregion

Notes: not relevant for dispatches (usually) / see note 1805680 for documentation / Customizing: Periodic Declarations → Maintain Region          

Read table T005S (regions) with:

•Reporting Country (input from selection screen)

Entry found?

Y: read table T005S with:

•Reporting Country

•Destination Region (field EIPO-HERKR)

Place of Manufacture populated?

Y: = T005S-HERBL

N: = T005S-BLAND (Region)

N: → EIP 003

VI99:

Same logic (see above), but call of routine not with Reporting country and Destination region but with Goods Supplier/Vendor Country and Region.

 

EIGENBLND

Federal State of Tax Office / Bundesland des Finanzamtes

= initial (obsolete)   

   

EIGENMAAK

 Tare Mass / Nettogewicht

Note: field EKPO-NTGEW contains weight in unit EKPO-GEWEI (= KG usually) per 1 PO quantity unit (e.g. 1 PC), not the total wight of the item.

> begin of special processing for weight of batch items <

product unit of measure (field EKPO-KZFME = B) defined?

(EKPO-KZFME taken from MARA-KZWSM: = alternative quantity unit for conversion into Basic unit in the batch master → as a result, weigth of batches are calculated separately)

Y: are there Goods Receipts for batch items?

Y: conversion to unit KG via batch master record, then cumulate batch weights

Subtract batch quantity from PO item quantity (result: PO quantity without batches)

Go on with standard processing

> end of special processing for weight of batch items < 

PO quantity > 0 ?

Y: PO item weight (field EKPO-NTGEW)  > 0 ?

Y:  = EKPO-NTGEW * PO quantity

N: PO unit (field EKPO-MEINS) = KG ?

Y: = PO quantity

N: PO quantity unit defined with Dimension = 'mass'?

Y: convert PO quantity into KG

N: calculate weight via material master:

PO quantity unit (field MARA-BSTME) = PO quantity unit from PO (field EKPO-MEINS) ?

Y: determine conversion factor from table MARM and convert into KG

N: determine PO quantity unit and conversion factor from info record (table EINA) and convert into KG

Add total of batch weights

N: = Total of batch weights

Remark: Special logic included for low weights

 

EIGENMAEH

 Weight Unit / Gewichtseinheit

= KG   

 

EIGENMASS

Tare Mass in Kilograms / Eigenmasse in KG

= initial (obsolete, new field: EIGENMAAK)

Exception:  low weight handling (see field EIGENMAAK). At STEP 2 (file creation) this field is accessed during cumulation of records. Intention: sum of cumulated low weights can be relevant for reporting,  

Note:  if field EIGENMASS is populated transaction VEFU (manual maintenance) displays another field for weigth maintenance than usually (display only!)

 

EIGENUINR

Intrastat ID number / Intrastat-Kennnummer

Note: Details of ID number maintenance see here and here

Call of FM RV_FTT_GOV_ID_CODES_READ

Country of plant = Reporting country?

Y: read table T001Z (additional data) with:

•Company Code (field VBRK-BUKRS)

•PARTY = SAPI01

= T001Z-PAVAL

N: read table T001N (EU tax numbers) with:

•Company Code (field VBRK-BUKRS)

•Plant country                

= T001N-INKNR

Field initial? → EIP 022

 

EINKAUFOR

 Purchasing Organization / Einkaufsorganisation

= initial

 

EINLADFGH

 Customs Office / Zollstelle

Mode of transport (field EIPO-EXPVZ) = 1 (sea) or 4 (ship) (for country = NL: or 8)?

Y: = EIKP-ZOLLA (Customs Office of Exit) / Field initial? → EIP 010

N:→ EIP 040        

            

FAKTDATUM

Billing Date / Fakturadatum

= First Day of Reporting Month (e.g. 01.03.2014)

 

FLAGEUROC

EURO indicator / EURO-Kennzeichen

Read table TCURC (currency units) with:

•Reporting Currency (input from selection screen)

ISO currency dode (field TCURC-ISOCD) = EUR?

Y: = X

N: =initial


GENES

VEIAV Data Origin Indicator / Ursprung des VEIAV-Satzes

= initial (MEIS → arrival)

VI99:

= 1 (VI99 → dispatch)

 

GESAMANZA

 Total Number of Items / Gesamtanzahl der Positionen

= initial (obsolete)  

 

GRENZWEAK

Statistical Value / Statistischer Wert

= Total of RESULT_tab-GRWRT_P (plus currency conversion if necessary)

Field initial? → EIP 020  

 

GRENZWEEH

Currency Unit of the Statistical Value / Währungseinheit des Statistischen Werts

= Reporting Currency (input from selection screen)

 

GRENZWERT

Statistical Value / Statistischer Wert

= initial (obsolete, new field: GRENZWEAK)

 

HAUPTPOSI

Item Number / Positionsnummer

= EKPO-EBELP

 

ICORFORTZ

Plus-Minus for Corrections / Vorzeichen für Korrekturen

= initial

 

IFREMDWAK

Invoice Value in Vendor Currency / Rechnungswert in Landeswährung des Lieferanten

= initial

Reporting Country = IT:

= Total of RESULT_tab-WRBTR (plus currency conversion into vendor currency if necessary)

 

IFREMDWEH

Currency of Vendor's Country / Währung im Land des Lieferanten

= initial

Reporting Country = IT:

= Currency of vendor country

 

IFREMDWER

Invoice Value in Vendor Currency / Rechnungswert in Landeswährung des Lieferanten

= initial (obsolete, new field: IFREMDWAK)

 

IREFBELEG

Reference Document for Correction /  Referenzbeleg der Berichtigung

= initial

 

IREFJAHR

Year of Reference Document for Correction / Referenzjahr für Berichtigung

= initial

 

IREFMONAT

Month of Reference Document for Correction / Referenzmonat für Berichtigung

= initial

 

IREFPOSIT

Item from Reference Document for Correction / Referenzposition der Berichtigung

= initial

 

IREFWERKS

Plant of Reference Document for Correction / Referenzwerk der Berichtigung

= initial

 

ISESSIONE

Indicator: common business or correction / Kennzeichen: normal Prozess oder Korrekturen

= 1

 

KUNDEUINR

Vendor VAT ID number / Umsatzsteueridentifikations-Nr. des Lieferanten

= LFA1-STCEG

If internal stock transfer order: = inital

Field initial? → EIP 029

 

KUNNR

Vendor / Lieferant

= number of the Goods Supplier

 

LIEFERBED

Incoterms / Lieferbedingung

Field EKPO-INCO1 populated?

Y: = EKPO-INCO1

N: = EKKO-INCO1

Field initial? → EIP 013

 

LIEFERWAE

Vendor Currency / Lieferantenwährung

Vendor defined in PO?

Y: = Vendor Currency

N: = Country Currency of Delivering Plant

 

LIEFRUINR

Goods Supplier VAT ID number / Umsatzsteueridentifikations-Nr. des liefernden Lieferanten

= LFA1-STCEG

Field initial? → EIP 029 (Note: this number is also used for field KUNDEUINR)

 

LIFNR

Vendor / Lieferant

= number of the Goods Supplier (field EKKO-LLIEF). A Goods Supplier is defined in the PO with partner role WL (in German, for "Warenlieferant"). If this partner role is not defined the Goods Supplier is equal to the "common" vendor (field EKKO-LIFNR). 

 

MATERIALN

Material Number / Materialnummer

= initial (obsolete, new field: MATNR)

 

MATNR

Material Number / Materialnummer

= EKPO-MATNR

 

NLDBOCODE

BOE Code (used for country NL)

= initial

 

NUMMBUKRS

Company Code / Buchungskreis

= EKKO-BUKRS

 

NUMMWERKS

Receiving Plant / Empfangendes Werk

= EKKO-WERKS

 

ORDPA

Classification Key / Ordnungsbegriff

= initial

 

P_LANDKEY

Indicator: Numeric or ISO2 Country Key / Kennzeichen: Numerischer oder ISO2-Länderschlüssel

Read table T609IS with:

•1 (Intrastat)

•Reporting Country

•1 (Arrival)

= T609IS-NLNKY (Customizing: “Control Data Selection”)

Possible values:

initial = ISO2 / alphanumerisch

X = numeric                

                     

PREFPACOD

Preference Code / Präferenzcode

= EIPO-PREFPACOD

Field initial? → EIP011

 

RECHNWEAK

Invoice Value / Rechnungswert

= Total of RESULT_tab-WRBTR (plus currency conversion into reporting currency if necessary)

Field initial? → EIP019

 

RECHNWEEH

Currency Unit of Invoice Value / Währungseinheit des Rechnungswerts

= Reporting Currency (input from selection screen)

 

RECHNWERT

Invoice Value / Rechnungswert

= initial (obsolete, new field: RECHNWEAK)

 

RETOURCOD

Indicator: Returns / Kennzeichen: Retoure

= initial

VI99:

= X

 

SATZERDAT

Record Creation Date / Erstelldatum des Satzes

= SY-DATLO (current date)

 

SPANIENID

Indicator: Domestic or Foreign / Kennzeichen:  In- oder Ausland

Read table T609IS (control data selection) with:

•1 (Intrastat)

•Reporting Country

•1 (Arrival)

"Indicator: Incoterms - Second Supplement" (field T609IS-HITZS) flagged?

Y: Incoterms (field EKPO-INCO1 and EKKO-INCO1) = initial ?

Y: → EIP 014

N: first byte of EKPO/EKKO-INCO1 = E ?

Y: = 2

N: = 1

N: = first Byte of EKPO/EKKO-INCO2              

                           

STATWAREN

Commodity Code / Statistische Warennummer

= EIPO-STAWN

Field initial? → EIP 011       

            

THIERISCH

Indicator: how was record created / Kennzeichen: wie wurde Satz erstellt

= initial (created by selection run)

 

URSPRSLND

Country of Origin / Ursprungsland

Note: Decision if numeric or alphanumeric country key is reported is made in Custoimzing: Periodic Declaration → Control Data → Data Selection Control → Data Selection Control (field T609IS-NLNKY)

"Country of Origin" (field EIPO-HERKL) populated?

Y: read table T005 (countries) with:

•Country of Origin (field EIPO-HERKL)

Read table T609II (transaction VEB2) with:

•Vendor Country

•Vendor Region

•Inclusion flag = X

•Conversion flag = X

(if no entry is found re-read,T609II with field "Region" = initial)

Entry found?

Y: numeric country code required?

Y: = T609II-LANDA

N: = T609II-INTCA   

N: numeric country code required?

Y: = T005-INTCN

 N: = T005-INTCA

Country of Origin not determined → EIP 006

N: → EIP 011                     

Special Logic for Reporting Country = DE:

If EIPO-HERKL = DE: = EIPO-VERLD

 

URSPRSREG

Region of Origin / Ursprungsregion      

Note: Maintain table T005S in Customizing: Periodic Declarations → Maintain Region

= initial

VI99:

Special Logic if parameter "Copy Region from Plant" is flagged on selection screen ?:

Y: = Region of Receiving Country (field EKPO-WERKS) / Field initial? → EIP 005    

N: = determine country and region of origin from material master: MARC-HERKL / MARC-HERKR 

Read table T005S (regions) with:

•Country of Origin (field EIPO-HERKL)

•Region of Origin (field EIPO-HERKR)

Entry found?

Y: Place of Manufacture populated?

Y: = T005S-HERBL

N: = T005S-BLAND (Region)

N: → EIP004

Special Logic for Reporting Country = DE:

 If EIPO-HERKL <> DE: = initial

 

USERNNAME

User Name / Benutzername

= SY-UNAME

 

VERFAHREN

Export/Import Procedure / Verfahren

= EIPO-EXPRF

Field initiall? → EIP 011

VI99:

Note: Conversion of Import Procedure of the reporting country into Export Procedure of the reporting country is done in Customizing: Basic Data for Foreign Trade →  Control/Conversion →  Convert Export Into Import Procedures (=Transaction VI50)

Read conversion table T616U with (table may be read several times → recursive access) 

•Reporting Country

•Export Procedure (field EIPO-EXPRF)

•Reporting Country

Import Procedure found in conversion table?        

Y: = T616U-EXPRF_IMP

N: → EIP 016

 

VERKAUFOR

Sales Organization / Verkaufsorganisation

= initial

 

VERKEHRZW

Mode of Transport / Verkehrszweig

= EIKP-EXPVZ

Field initial? → EIP 010

 

VERSENDER

Importer HQ / Sitz des Einführers

= initial (obsolete)

 

WERKSLAND

Country of Plant / Werksland

Read table T001W (plants) with:

•Receiving Plant (field EKPO-WERKS)

= T001W-LAND1

 

ZUSATZNUM

Additional Number for Intrastat / Intrastat-Zusatzummer

Note: Details of ID number maintenance see here and here

Call of FM RV_FTT_GOV_ID_CODES_READ

Country of plant = Reportung country?

Y: read table T001Z (additional data) with:

•Company Code (field EKKO-BUKRS)

•PARTY = SAPI02

= T001Z-PAVAL

N: read table T001N (EU tax numbers) with:

•Company Code (field EKKO-BUKRS)

•Reporting Country                

= T001N-INZNR

Field initial? → EIP 023

 

 

 

  • No labels