I_OIL_ExchangeStatementHeader

DDL: I_OIL_EXCHANGESTATEMENTHEADER Type: view_entity BASIC

Exchange Statement Header

I_OIL_ExchangeStatementHeader is a Basic CDS View that provides data about "Exchange Statement Header" in SAP S/4HANA. It reads from 1 data source (oiaqa) and exposes 72 fields with key field ExchangeStatementDocument. It has 17 associations to related views.

Data Sources (1)

SourceAliasJoin Type
oiaqa oiaqa from

Associations (17)

CardinalityTargetAliasCondition
[1..1] I_Supplier _Supplier _Supplier.Supplier = $projection.ExchangePartner
[1..1] I_BillingDocumentType _BillingDocumentType _BillingDocumentType.BillingDocumentType = $projection.ExchangeStatementType
[1..1] I_SalesOrganization _SalesOrganization _SalesOrganization.SalesOrganization = $projection.SalesOrganization
[1..1] I_Division _Division _Division.Division = $projection.Division
[1..1] I_DistributionChannel _DistributionChannel _DistributionChannel.DistributionChannel = $projection.DistributionChannel
[1..1] I_Currency _Currency _Currency.Currency = $projection.Currency
[1..1] I_Currency _CompanyCodeCurrency _CompanyCodeCurrency.Currency = $projection.CompanyCodeCurrency
[1..1] I_OIL_ExchangeAgreement _ExchangeHeaderFrom _ExchangeHeaderFrom.ExchangeAgreement = $projection.FromExchangeAgreement
[1..1] I_OIL_ExchangeAgreement _ExchangeHeaderTo _ExchangeHeaderTo.ExchangeAgreement = $projection.ToExchangeAgreementNumber
[1..1] I_ExchangeAgreementType _ExchangeAgreementTypeFrom _ExchangeAgreementTypeFrom.ExchangeAgreementType = $projection.FromExchangeType
[1..1] I_ExchangeAgreementType _ExchangeAgreementTypeTo _ExchangeAgreementTypeTo.ExchangeAgreementType = $projection.ToExchangeType
[1..1] I_Material _MaterialFrom _MaterialFrom.Material = $projection.FromMaterialNumber
[1..1] I_Material _MaterialTo _MaterialTo.Material = $projection.ToMaterialNumber
[1..1] I_Plant _PlantFrom _PlantFrom.Plant = $projection.FromPlant
[1..1] I_Plant _PlantTo _PlantTo.Plant = $projection.ToPlant
[1..1] I_UnitOfMeasure _UnitOfMeasure _UnitOfMeasure.UnitOfMeasure = $projection.UnitOfMeasure
[1..1] I_OIL_ExchangeDocumentStatusVH _ExchangeDocumentStatusVH _ExchangeDocumentStatusVH.ExchangeDocumentStatus = $projection.ExchangeDocumentStatus

Annotations (10)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Exchange Statement Header view
ObjectModel.representativeKey ExchangeStatementDocument view
ObjectModel.sapObjectNodeType.name OIL_ExchangeStatement view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.viewType #BASIC view

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY ExchangeStatementDocument preqno ExgSt req no.
ExchStatementIsNettingDocument netdoc Netting doc.
ExchangeStatementType preqtyp Exg. stmnt type
ExchangePartner exgptr Exg.partner
SalesOrganization vkorg SD Sales Org.
Division spart Source supplier
DistributionChannel vtweg RefDistCh-Cust/Mat.
Currency waers Transaction Currency
FromExchangeAgreement vexgnum FromExchangeNo.
ToExchangeAgreementNumber bexgnum ToExchangeNo.
FromExchangeType vexgtyp FromExchangeTyp
ToExchangeType bexgtyp ToExchangeTyp
FromMaterialGroupReference vmatref FromMatGrp ref.
ToMaterialGroupReference bmatref ToMatGrpRef
FromMaterialNumber vmatnr From mat. no.
ToMaterialNumber bmatnr To material
FromBaseProductNumber voibasprod FromBaseProduct
ToBaseProductNumber boibasprod ToBaseProduct
FromPlant vwerks Plant
ToPlant bwerks To plant
FromPeriod From month
ToPeriod To month
ExchangeMovementFromDate vsptag From day
ExchangeMovementToDate bsptag To day
FromWeek From week
ToWeek To week
FromPostingPeriod From period
ToPostingPeriod To period
ExchangeDocumentStatus docstat Nt.doc status
FinancialYear njahr Fiscal Year
BatchInputSessionName mappe Session
NettingDocumentBatchInputValue bicnt BatchI.counter
NetBalance netbal Netting bal.
CreationDate erdat Entered On
CreationTime ertim Time
CreatedByUser ernam User Name
LastChangeDate aedat Obsolete
ChangedTime aetim Time
LastChangeByUser aenam User Name
InvoiceCycle1IsActive oiinvcyc1 Inv.CycleInd
InvoiceCycle2IsActive oiinvcyc2 Inv.CycleInd
InvoiceCycle3IsActive oiinvcyc3 Inv.CycleInd
InvoiceCycle4IsActive oiinvcyc4 Inv.CycleInd
InvoiceCycle5IsActive oiinvcyc5 Inv.CycleInd
InvoiceCycle6IsActive oiinvcyc6 Inv.CycleInd
InvoiceCycle7IsActive oiinvcyc7 Inv.CycleInd
InvoiceCycle8IsActive oiinvcyc8 Inv.CycleInd
InvoiceCycle9IsActive oiinvcyc9 Inv.CycleInd
LgclInvtryAdjustmentIsIncluded oiinclia LIA incl. ind.
PureFinancialsAreIncluded oiincpfa PFA incl. ind.
UnitOfMeasure dispme Unit of measure
MvtWithoutFinancialsIsIncluded oiamwofi Mov. w/o FI
ExchangeBalanceIsIncluded oiabalan Balance ind.
CompanyCodeCurrency
PrmtHbSchedDtaAgingFltrDte _dataaging Data Aging
_BillingDocumentType _BillingDocumentType
_Supplier _Supplier
_SalesOrganization _SalesOrganization
_Division _Division
_Currency _Currency
_DistributionChannel _DistributionChannel
_ExchangeHeaderFrom _ExchangeHeaderFrom
_ExchangeHeaderTo _ExchangeHeaderTo
_ExchangeAgreementTypeFrom _ExchangeAgreementTypeFrom
_ExchangeAgreementTypeTo _ExchangeAgreementTypeTo
_MaterialFrom _MaterialFrom
_MaterialTo _MaterialTo
_PlantFrom _PlantFrom
_PlantTo _PlantTo
_UnitOfMeasure _UnitOfMeasure
_CompanyCodeCurrency _CompanyCodeCurrency
_ExchangeDocumentStatusVH _ExchangeDocumentStatusVH

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_OIL_ExchangeStatementHeader.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW I_OIL_ExchangeStatementHeader AS
SELECT
  preqno AS ExchangeStatementDocument,
  netdoc AS ExchStatementIsNettingDocument,
  preqtyp AS ExchangeStatementType,
  exgptr AS ExchangePartner,
  vkorg AS SalesOrganization,
  spart AS Division,
  vtweg AS DistributionChannel,
  waers AS Currency,
  vexgnum AS FromExchangeAgreement,
  bexgnum AS ToExchangeAgreementNumber,
  vexgtyp AS FromExchangeType,
  bexgtyp AS ToExchangeType,
  vmatref AS FromMaterialGroupReference,
  bmatref AS ToMaterialGroupReference,
  vmatnr AS FromMaterialNumber,
  bmatnr AS ToMaterialNumber,
  voibasprod AS FromBaseProductNumber,
  boibasprod AS ToBaseProductNumber,
  vwerks AS FromPlant,
  bwerks AS ToPlant,
  cast (vspmon as oiurep_base_yyyymm) AS FromPeriod,
  cast (bspmon as oiurep_base_yyyymm) AS ToPeriod,
  vsptag AS ExchangeMovementFromDate,
  bsptag AS ExchangeMovementToDate,
  cast (vspwoc as vdm_yearweek_kk) AS FromWeek,
  cast (bspwoc as vdm_yearweek_kk) AS ToWeek,
  cast (vspbup as vdm_yearmonth_kk) AS FromPostingPeriod,
  cast (bspbup as vdm_yearmonth_kk) AS ToPostingPeriod,
  docstat AS ExchangeDocumentStatus,
  njahr AS FinancialYear,
  mappe AS BatchInputSessionName,
  bicnt AS NettingDocumentBatchInputValue,
  netbal AS NetBalance,
  erdat AS CreationDate,
  ertim AS CreationTime,
  ernam AS CreatedByUser,
  aedat AS LastChangeDate,
  aetim AS ChangedTime,
  aenam AS LastChangeByUser,
  oiinvcyc1 AS InvoiceCycle1IsActive,
  oiinvcyc2 AS InvoiceCycle2IsActive,
  oiinvcyc3 AS InvoiceCycle3IsActive,
  oiinvcyc4 AS InvoiceCycle4IsActive,
  oiinvcyc5 AS InvoiceCycle5IsActive,
  oiinvcyc6 AS InvoiceCycle6IsActive,
  oiinvcyc7 AS InvoiceCycle7IsActive,
  oiinvcyc8 AS InvoiceCycle8IsActive,
  oiinvcyc9 AS InvoiceCycle9IsActive,
  oiinclia AS LgclInvtryAdjustmentIsIncluded,
  oiincpfa AS PureFinancialsAreIncluded,
  dispme AS UnitOfMeasure,
  oiamwofi AS MvtWithoutFinancialsIsIncluded,
  oiabalan AS ExchangeBalanceIsIncluded,
  _SalesOrganization._CompanyCode.Currency AS CompanyCodeCurrency
FROM oiaqa
LEFT OUTER JOIN I_Supplier AS _Supplier ON _Supplier.Supplier = ExchangePartner  -- association [1..1]
LEFT OUTER JOIN I_BillingDocumentType AS _BillingDocumentType ON _BillingDocumentType.BillingDocumentType = ExchangeStatementType  -- association [1..1]
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON _SalesOrganization.SalesOrganization = SalesOrganization  -- association [1..1]
LEFT OUTER JOIN I_Division AS _Division ON _Division.Division = Division  -- association [1..1]
LEFT OUTER JOIN I_DistributionChannel AS _DistributionChannel ON _DistributionChannel.DistributionChannel = DistributionChannel  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _Currency ON _Currency.Currency = Currency  -- association [1..1]
LEFT OUTER JOIN I_Currency AS _CompanyCodeCurrency ON _CompanyCodeCurrency.Currency = CompanyCodeCurrency  -- association [1..1]
LEFT OUTER JOIN I_OIL_ExchangeAgreement AS _ExchangeHeaderFrom ON _ExchangeHeaderFrom.ExchangeAgreement = FromExchangeAgreement  -- association [1..1]
LEFT OUTER JOIN I_OIL_ExchangeAgreement AS _ExchangeHeaderTo ON _ExchangeHeaderTo.ExchangeAgreement = ToExchangeAgreementNumber  -- association [1..1]
LEFT OUTER JOIN I_ExchangeAgreementType AS _ExchangeAgreementTypeFrom ON _ExchangeAgreementTypeFrom.ExchangeAgreementType = FromExchangeType  -- association [1..1]
LEFT OUTER JOIN I_ExchangeAgreementType AS _ExchangeAgreementTypeTo ON _ExchangeAgreementTypeTo.ExchangeAgreementType = ToExchangeType  -- association [1..1]
LEFT OUTER JOIN I_Material AS _MaterialFrom ON _MaterialFrom.Material = FromMaterialNumber  -- association [1..1]
LEFT OUTER JOIN I_Material AS _MaterialTo ON _MaterialTo.Material = ToMaterialNumber  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _PlantFrom ON _PlantFrom.Plant = FromPlant  -- association [1..1]
LEFT OUTER JOIN I_Plant AS _PlantTo ON _PlantTo.Plant = ToPlant  -- association [1..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON _UnitOfMeasure.UnitOfMeasure = UnitOfMeasure  -- association [1..1]
LEFT OUTER JOIN I_OIL_ExchangeDocumentStatusVH AS _ExchangeDocumentStatusVH ON _ExchangeDocumentStatusVH.ExchangeDocumentStatus = ExchangeDocumentStatus  -- association [1..1]
;