Skip to end of metadata
Go to start of metadata

Purpose

The purpose of this is page is to explain how the fields are filled he table VEIAV in the transactions VE01 and VI98.

Overview

 

Central routine for determination: form DATEN_SELEKTIEREN in program RVEXST00 (transaction VE01) and RVIVST00 (transaction VI98).

In this routine the VEIAV fields are set and determined from the document data (good place for a break point for debugging). 

If there's an issue with the data (for example: field is not populated) an entry under message class EIP is created in the incompletion log. 

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 VE01 and VE98. Whenever the VI98 logic is different it is documented separately.          

This should be an executive summary of the content and argument being made in the document. Basically a summary (not repeat) of the information you are explaining.

Key Fields

MANDT

 Client

= SY-MANDT 

DATUMJAHR

Reporting Year

= input from selection screen

DATUMMONA

Reporting Month

= input from selection screen

ARRIVDEPA

Goods Direction

= 2 (Dispatch)

for Returns (except Italy):

= 1 (Arrival)

VI98:

= 1 (Arrival)

LFDNRVEIA

Sequential Number

= automatically determined and increased during selection run

Function Fields

ARTGESCHA

Business Transaction Type

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

Y: = EIPO-EXART

N: → EIP 011

VI98:

Note: Conversion of Export Transaction Type of the delivering country into Import 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)

Country of the Delivering Plant

Export Business Transaction Type (field EIPO-EXART)

Reporting Country

Import Business Transaction Type found in conversion table?         

Y: = T605U-EXART_IMP

N: → EIP 016                  

BELEGIDEN

Document Category

= VBRK-VBTYP

for Cancellation of Internal Credit Memo:

= N (Cancellation)     

BELEGNUMR

Document Number

= VBRK-VBELN

BESONMAAK

Quantity in Supplementary 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 then re-read T604 , this time with the first 8 digits of the Commodity Code) 

Entry found?

Y: Supplementary Unit is populated?

Y: Supplementary Unit = Sales Unit? / T604-BEMEH = VBRP-VRKME

Y: = VBRP-FKIMG (sales quantity)

N: Sales Unit = Basic Unit? / VBRP-VRKME = VBRP-MEINS

Y: convert Basic Unit into Supplementary Unit / if conversion fails → EIP 021 

N: convert Sales Unit into Basic Unit / then convert Basic Unit into Supplementary Unit / if conversion fails → EIP 021 

N: =initial

N: → EIP 007

N: → EIP 012

BESONMAEH

Supplementary Unit

= T604-BEMEH (access see field BESONMMAK)

BESONMASS

Quantity in Supplementary Unit

= initial (obsolete, new field: BESONMAAK)

BESTILAND

Destination Country

 (info) 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 )

[Remark: Also for Returns field BESTILAND is filled with country of ship-to party.]   

Read table T005 (countries) with:

Country of Ship-to Party (field VBRK-LAND1)

Read table T609II (transaction VEB2) with:

Country of Ship-to Party (field VBRK-LAND1)

Region of Ship-to Party (field VBRK-REGIO)

Inclusion flag = X (field T609II-MABIN)

Conversion flag = X (field T609II-MKONV)

(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     

VI98:

(warning)For arrivals BESTILAND contains Delivering Country

Same logic as for VE01 (see above), but call of routine not with country and region of ship-to party but with country and region of Delivering Plant (country table T001W is read with VBRP-WERKS)

BESTIREGI

Destination Region

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

Read table T005S (regions) with:

Country of Ship-to Party (field VBRK-LAND1)

Entry found?

Y: read table T005S with:

Country of Ship-to Party (field VBRK-LAND1)

Region of Ship-to Party (field VBRK-REGIO)

Entry found?

Y: Place of Manufacture (T005S-HERBL) populated?

Y: = T005S-HERBL

N: = T005S-BLAND (Region)

N: = initial

N: → EIP 003 

Returns:     

(warning)For arrivals this field contains the dispatch region = “from which region were the goods returned?”

Same logic (see above), but call of routine not with country and region of ship-to party but with Country and Region of Delivering Plant:country table T001W is read with VBRP-WERKS.

Entry not found in T005S: → EIP 005 

VI98:

Same logic (see above), but call of routine not with country and region of ship-to party with Reporting Country (= country of Delivering Plant) and Region from the address data of the Ship-to Party.

Address data of ship-to party not found: → EIP 026  

Entry not found in T005S: → EIP 027  

EIGENBLND

Federal State of Tax Office

= initial (obsolete)       

EIGENMAAK

Tare Mass

Tare Mass populated in the document (field VBRP-NTGEW)?

Y: mass unit = KG (field VBRP-GEWEI)?

Y: = VBRP-NTGEW

N: convert VBRP-GEWEI into KG (via FM UNIT_CONVERSION) / if conversion fails → EIP 021 

Mass determined greater equal 0.001 KG ?

Y: = mass determined         

N: call special routine for low weight handling 

N: → EIP 018

Credit and Debit Memos:

Weights are set to zero during productive run, because weights may not be cumulated with weights from Original Invoice (only values). 

EIGENMAEH

Weight Unit

= KG    

EIGENMASS

Tare Mass in Kilograms

= 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,   

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

EIGENUINR

Intrastat ID number

(info)Details of ID number maintenance see here (see points "Maintain Official Numbers for Declarations to Authorities" and  "Special Processing for Plants Abroad")

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: (i.e. Plants Abroad scenario)

  read table T001N (EU tax numbers → transaction VI62) with:

Company Code (field VBRK-BUKRS)

Plant country                 

= T001N-INKNR

Field initial? → EIP 022

VI98:

Same logic (see above), but call of routine not with Delivering Company Code and Plant Country but with Ordering Company Code (from selection screen) and Reporting Country.

This is like a plants abroad scenario, maintain the table T001N (Trcode VI62 → field Intrastat ID number) for ordering company and reporting country. 

EINKAUFOR

Purchasing Organization

= initial

EINLADFGH

Customs Office

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

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

VI98:

(info) Conversion of Export Customs Office of the delivering country into Import Customs Office of the reporting country is done in Customizing: Basic Data for Foreign Trade → Control/Conversion → Convert Export into Import Customs Office (=Transaction VI48 )

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

Country of the Delivering Plant

Export Customs Office (field EIPO-ZOLLA)

Reporting Country

Import Customs Office found in conversion table?         

Y: = T615U-ZOLLS_IMP

N: → EIP 016      

N:→ EIP 040   

FAKTDATUM

Billing Date

= VBRK-FKDAT      

FLAGEUROC

EURO indicator

Read table TCURC (currency units) with:

Reporting Currency (from selection screen)

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

Y: = X

N: =initial

GENES

VEIAV Data Origin Indicator

= initial (VE01 → dispatch)

Returns:

= 3 (VE01 → arrival)

VI98:

= 2 (VI98 → arrival)

GESAMANZA

Total Number of Items

= initial (obsolete)   

GRENZWEAK

Statistical Value

= EIPO-GRWRT  (plus currency conversion if necessary)

GRENZWEEH

Currency Unit of the Statistical Value

= Reporting Currency (from selection screen)

GRENZWERT

Statistical Value

= initial (obsolete, new field: GRENZWEAK)

HAUPTPOSI

Item Number

= VBRP-POSNR

ICORFORTZ

Plus-Minus for Corrections

= initial

Debit Memo:

= +

Credit Memo or Cancellation:

= -

Credit Memo for Returns:

= initial 

IFREMDWAK

Invoice Value in Vendor Currency

= initial

Returns (Reporting Country = IT only):

Net Value (field VBRP-NETWR) = 0 ?

Y: Plants Abroad active? (checked with FM CHECK_PLANTS_ABROAD_ACTIVE)

Y: = VBRP-BRTWR (Gross value of billing item)  

N: free of charge item? / TVAP-PRSFD = initial or VBRP-PRSFD = B

Y: = 0

N: → EIP 019

N: = VBRP-NETWR 

(possibly, conversion into currency of vendor's country from field IFREMDWEH via form INVOICE_VALUE)

IFREMDWEH

Currency of Vendor's Country 

= initial

Returns (Reporting Country = IT only)

= VBRK-WAERK

If reporting country’s currency <> EUR:

= currency of the country

VI98:

= initial

If reporting country = IT:

= VBRK-WAERK

If the currency of the delivering plant’s country is <> EURO:

= currency of the country

IFREMDWER

Invoice Value in Vendor Currency

= initial (obsolete, new field: IFREMDWAK)

IREFBELEG

Reference Document for Correction

= populated only for credit memos, debit memos and cancellations

IREFJAHR

Year of Reference Document for Correction

= populated only for credit memos, debit memos and cancellations

IREFMONAT

Month of Reference Document for Correction

= populated only for credit memos, debit memos and cancellations

IREFWERKS

Plant of Reference Document for Correction

= initial

ISESSIONE

Indicator: common business or correction

[Remark: determined in  FORM get_reference_data / used NOT only for IT]

= 1

Credit Memo / Debit Memo / Cancellation:

= 2

KUNDEUINR

Customer VAT ID number

"Customer VAT ID no." (VBRK-STCEG) populated in document?

Y: = VBRK-STCEG

N: → EIP 015

Additional checks:

a)  Reporting Country = IT and Triangular Business?

Y: read table T001N with:

Company Code of Delivering Plant

Country of Delivering Plant

Entry found and field T001N-STCEG populated?

Y: = T001N-STCEG

N: → EIP 024

b) Reporting Country = FR?

Y: field VBRK-STCEG populated?

Y: = VBRK-STCEG

N: determine VAT ID number (field STCEG) from master record of:

ship-to party from item or

ship-to party from header or

ship-to party from item of reference document or

ship-to party from header of reference document or

sold-to party

        No VAT ID no. found? → EIP 028

Returns:

= initial

VI98:

(info) VI98 reports arrivals, i.e. the VAT ID no. of the vendor is determined; in a cross-company process the vendor is equal to the Delivering Company

= VAT ID number of the Delivering Company in the Reporting Country (maintained with Customizing transaction OB87 (table T001N)).

(warning) It is necessary to maintain a Intrastat ID number (even a "dummy" no.) with transaction VI62 for Delivering Company / Reporting Country; but it is the VAT ID number from transaction OB87 which is determined in any case.

Transaction VI62 doesn't permit to create or delete entries, use transaction OB87 instead. 

KUNNR

Customer / Kunde

= VBRK-KUNAG (sold-to party)

LIEFERBED

Incoterms / Lieferbedingung

= VBRK-INCO1

Field initial? → EIP 013

LIEFERWAE

Vendor Currency

= initial

Returns:

= VBRK-WAERK (document currency)

VI98:

= VBRK-WAERK (document currency)

LIEFRUINR

Vendor VAT ID number

= initial

Returns (logic corresponds to field KUNDEUINR):

"Customer VAT ID no." populated in document?

Y: Reporting Country = IT and Triangular Business?

Y: read table T001N with:

Company Code of Delivering Plant

Country of Delivering Plant

Entry found and field T001N-STCEG populated?

Y: = T001N-STCEG

N: → EIP 024

N: = VBRK-STCEG

N: Reporting Country = FR?

Y: determine VAT ID number (field STCEG) from master record of:

ship-to party from item or

ship-to party from header or

ship-to party from item of reference document or

ship-to party from header of reference document or

sold-to party

   No VAT IF no. found? → EIP 028

N: → EIP 015

VI98: 

= KUNDEUINR (see there for VI98 )

LIFNR

Vendor

= initial

MATERIALN

Material Number

= initial (obsolete, new field: MATNR)

MATNR

Material Number

= VBRP-MATNR

NLDBOCODE

BOE Code (used for country NL)

= digits 9 and 10 from Commodity Code (see field STATWAREN) 

NUMMBUKRS

Company Code

= VBRK-BUKRS

VI98:

Read table TVKO (sales organizations) with:

Ordering Organisational Unit (field VBRP-VKORG_AUFT)

= TVKO-BUKRS

NUMMWERKS

Delivering Plant

= VBRP-WERKS

VI98:

= initial

ORDPA

Classification Key

= initial 

P_LANDKEY

Indicator: Numeric or ISO2 Country Key

Read table T609IS with:

1 (Intrastat)

Reporting Country

2 (Dispatch)

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

Possible values:

initial = ISO2 / alphanumerisch

X = numeric

VI98:

Read table T609IS with 1 (arrival) instead of 2 (dispatch) 

PREFPACOD

Preference Code

= initial

RECHNWEAK

Invoice Value

Net Value (field VBRP-NETWR) = 0 ?

Y: Plants Abroad active? (checked with FM CHECK_PLANTS_ABROAD_ACTIVE)

Y: = VBRP-BRTWR (Gross value of billing item)  

N: free of charge item? / TVAP-PRSFD = initial or VBRP-PRSFD = B

Y: Reporting Country = BE?

Y: = EIPO-GRWRT (statistical value)

N: = 0

N: → EIP 019

N: = VBRP-NETWR (net value) 

(possibly, conversion from document currency into reporting currency in form INVOICE_VALUE) 

RECHNWEEH

Currency Unit of Invoice Value

= Reporting Currency (input from selection screen)

RECHNWERT

Invoice Value

= initial (obsolete, new field: RECHNWEAK)

RETOURCOD

Indicator: Returns

Net Value < 0 ?

Y: = X

N: = initial

Returns:

 Net Value > 0 ?

Y: = X

N: = initial

VI98:

= initial

SATZERDAT

Record Creation Date

= SY-DATLO (current date) 

 

SPANIENID

Indicator: Domestic or Foreign

Read table T609IS (control data selection) with:

1 (Intrastat)

Reporting Country

2 (Dispatch)

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

Y: Incoterms (field VBRK-INCO1) = initial ?

Y: → EIP 014

N: first byte of VBRK-INCO1 = E ?

Y: = 1

N: = 2

Returns:

First byte of VBRK-INCO1 = E ?

Y: = 2

N: = 1

N: = first Byte of VBRK-INCO2

Field initial? → EIP 014

VI98:

same logic as for Returns, except: read T609IS with 1 ("arrival")  

STATWAREN

Commodity Code

= EIPO-STAWN

Field initiall? → EIP 011

VI98:

(info) Conversion of (Export) Commodity Code of the delivering country into Import Code Number of the reporting country is done in Customizing: Basic Data for Foreign Trade → Control/Conversion → Commodity Codes: Convert Export into Import Code Numbers (= transaction VI45 )

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

Country of the Delivering Plant

Commodity Code (field EIPO-STAWN)

Reporting Country

Import CodeNumber found in conversion table?         

Y: = T604U-STAWN_IMP

N: read MARC with: material number and for all selected plants (located in the reporting country)

Loop:

read MARC-STAWN → read T604 with MARC-STAWN → T604-NIHON: = '1' or '_' ?

Y:  = T604U-STAWN_IMP

N: → EIP 016

:Endloop  

THIERISCH

Indicator: How the record was created

= initial (created by selection run)

URSPRSLND

Country of Origin

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:

Country of Ship-to Party (field VBRK-LAND1)

Region of Ship-to Party (field VBRK-REGIO)

Inclusion flag = X (field T609II-MABIN)

Conversion flag = X (field T609II-MKONV)

(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 = initial oder = DE:

If Returns: read table T005 with: Country of Ship-to Party (field VBRK-LAND1)

If VI98: read table T005 with: Country of Delivering Plant

URSPRSREG

Region of Origin

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

"Country of Origin " and "Region of Origin" populated?

Y: Read table T005 (countries) with:

Country of Origin (field EIPO-HERKL)

Entry found? (i.e. regions are defined)

Y: Read table T005S (regions) with:

Country of Origin (field EIPO-HERKL)

Region of Origin (field EIPO-HERKR)

    Entry found?

    Y: Place of Manufacture (T005S-HERBL) populated?

Y: = T005S-HERBL

N: = T005S-BLAND (Region)

    N: = initial

N: → EIP 003 

N: → EIP 012 (country) / EIP 011 (region)

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

or (if EIPO-HERKR = initial and reporting country = BE or IT):

Read table T005 and T005S with: Country of Delivering Plant and Region of Deliverin Plant

Special Logic for Reporting Country = DE:

 If EIPO-HERKL <> initial and <> DE: → EIP 043 

VI98:

= initial

USERNNAME

User Name

= SY-UNAME

VERFAHREN

Export/Import Procedure

= EIPO-EXPRF 

Field initial? → EIP 011

VI98:

Note: Conversion of Export Procedure of the delivering country into Import 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): 

Country of the Delivering Plant

Export Procedure (field EIPO-EXPRF)

Reporting Country

  Import Procedure found in conversion table?         

  Y: = T616U-EXPRF_IMP

  N: → EIP 016

VERKAUFOR

Sales Organization

= VBRK-VKORG

VI98:

= VBRP-VKORG_AUFT

VERKEHRZW

Mode of Transport

= EIKP-EXPVZ

Field initial? → EIP 010

VI98:

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

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

Country of the Delivering Plant

Export Procedure (field EIPO-EXPVZ)

Reporting Country

    Import Procedure found in conversion table?         

    Y: = T618U-EXPVZ_IMP

    N: → EIP 016 

VERSENDER

Importer HQ

= initial (obsolete)

WERKSLAND

Country of Plant

Read table T001W (plants) with:

Delivering Plant (field VBRP-WERKS)

= T001W-LAND1

Special Logic for Reporting Country = FR:

If triangular Process: = Reporting Country

Note: "triangular" means: Country of Delivering Plant <> Reporting Country <> Country of Ship-to Party

VI98:

= Reporting Country

ZUSATZNUM

Additional Number for Intrastat

In Country GB = Branch ID trader 

Note: Details of ID number maintenance see above. 

Call of FM RV_FTT_GOV_ID_CODES_READ

Country of plant = Reportung country?

Y: read table T001Z (additional data) with:

Company Code (field VBRK-BUKRS)

PARTY = SAPI02

    = T001Z-PAVAL

N: (i.e. Plants Abroad scenario)

    read table T001N (EU tax numbers) with:

Company Code (field VBRK-BUKRS)

Plant country                 

    = T001N-INZNR

Field initial? → EIP 023

VI98:

Same logic (see above), but call of routine not with Delivering Company Code and Plant Country but with Ordering Company Code (from selection screen) and Reporting Country.

                                                        

Related Content

Related Documents

Related SAP Notes/KBAs