I_TR_ElectronicDocInvoice

DDL: I_TR_ELECTRONICDOCINVOICE SQL: ITREINVOICE Type: view COMPOSITE Package: GLO-EDO-TR

eDocument Turkey eInvoice

I_TR_ElectronicDocInvoice (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.

Cross Applications

I_TR_ElectronicDocInvoice is a Composite CDS View that provides data about "eDocument Turkey eInvoice" in SAP S/4HANA. It reads from 1 data source (I_ElectronicDoc) and exposes 22 fields with key field ElectronicDocUUID. It has 3 associations to related views. Part of development package GLO-EDO-TR.

SAP API Hub

CategoryComposite
StateC1
Line of BusinessCross Applications
Application ComponentCA-GTF-CSC-EDO-TR
CapabilitiesData Source in SQL Select
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Not Released
PackageCross Applications for SAP S/4HANA Cloud Public Edition

Documentation

Data Sources (1)

SourceAliasJoin Type
I_ElectronicDoc I_ElectronicDoc from

Associations (3)

CardinalityTargetAliasCondition
[1] I_TR_ElectronicDocOutgInvoice _Invoice $projection.ElectronicDocUUID = _Invoice.ElectronicDocUUID
[1] I_TR_ElectronicDocIncgInvoice _Incoming $projection.ElectronicDocUUID = _Incoming.ElectronicDocUUID
[1] I_TR_ElectronicDocExpInvoice _Export $projection.ElectronicDocUUID = _Export.ElectronicDocUUID

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName ITREINVOICE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
EndUserText.label eDocument Turkey eInvoice view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view

Fields (22)

KeyFieldSource TableSource FieldDescription
KEY ElectronicDocUUID ElectronicDocUUID eDocument: GUID
ElectronicDocCompanyCode ElectronicDocCompanyCode Company Code
ElectronicDocSourceType ElectronicDocSourceType eDocument Source Type
ElectronicDocSourceKey ElectronicDocSourceKey eDocument Source Key
ElectronicDocType ElectronicDocType eDocument Type
ElectronicDocProcessStatus ElectronicDocProcessStatus eDocument Process Status
ElectronicDocLastChangeDate ElectronicDocLastChangeDate Changed on (Date)
ElectronicDocLastChangeTime ElectronicDocLastChangeTime Changed On (Time)
ElectronicDocProcess ElectronicDocProcess eDocument Process
ElectronicDocPostingDate ElectronicDocPostingDate Posting Date of the Source Document
SalesCurrencyendasSalesCurrency
TR_ElectronicDocBusPartner _Invoice TR_ElectronicDocBusPartner Business Partner
TR_EDocBusPartnerName _Invoice TR_EDocBusPartnerName Business Partner Name
TR_EDocRejectionReasonText _Incoming TR_EDocRejectionReasonText
TR_ElectronicDocRcvdDateTime _Incoming TR_ElectronicDocRcvdDateTime Time Received
TR_ElectronicDocSupplierID _Incoming TR_ElectronicDocSupplierID Supplier
TR_ElectronicDocSupplierName _Incoming TR_ElectronicDocSupplierName Supplier Name
TR_EDocTradeRefNumber _Export TR_EDocTradeRefNumber Ministry of Customs and Trade Reference Number
TR_EDocCustomRegNumber _Export TR_EDocCustomRegNumber Customs Exit Declaration Registration Number
TR_EDocRealExportDate _Export TR_EDocRealExportDate Realisition Date (Real Export Date)
ShipToParty _Export ShipToParty Ship-To Party (obsolete)
TR_EDocShipToPartyName _Export TR_EDocShipToPartyName Ship-to Party Name

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_TR_ElectronicDocInvoice.
-- 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.
-- SQL view name: ITREINVOICE

CREATE VIEW I_TR_ElectronicDocInvoice AS
SELECT
  ElectronicDocUUID,
  ElectronicDocCompanyCode,
  ElectronicDocSourceType,
  ElectronicDocSourceKey,
  ElectronicDocType,
  ElectronicDocProcessStatus,
  ElectronicDocLastChangeDate,
  ElectronicDocLastChangeTime,
  ElectronicDocProcess,
  ElectronicDocPostingDate,
  case when _Invoice.SalesCurrency is not initial then _Invoice.SalesCurrency when _Export.SalesCurrency is not initial then _Export.SalesCurrency else _Incoming.SalesCurrency end as SalesCurrency AS SalesCurrencyendasSalesCurrency,
  _Invoice.TR_ElectronicDocBusPartner AS TR_ElectronicDocBusPartner,
  _Invoice.TR_EDocBusPartnerName AS TR_EDocBusPartnerName,
  _Incoming.TR_EDocRejectionReasonText AS TR_EDocRejectionReasonText,
  _Incoming.TR_ElectronicDocRcvdDateTime AS TR_ElectronicDocRcvdDateTime,
  _Incoming.TR_ElectronicDocSupplierID AS TR_ElectronicDocSupplierID,
  _Incoming.TR_ElectronicDocSupplierName AS TR_ElectronicDocSupplierName,
  _Export.TR_EDocTradeRefNumber AS TR_EDocTradeRefNumber,
  _Export.TR_EDocCustomRegNumber AS TR_EDocCustomRegNumber,
  _Export.TR_EDocRealExportDate AS TR_EDocRealExportDate,
  _Export.ShipToParty AS ShipToParty,
  _Export.TR_EDocShipToPartyName AS TR_EDocShipToPartyName
FROM I_ElectronicDoc
LEFT OUTER JOIN I_TR_ElectronicDocOutgInvoice AS _Invoice ON ElectronicDocUUID = _Invoice.ElectronicDocUUID  -- association [1]
LEFT OUTER JOIN I_TR_ElectronicDocIncgInvoice AS _Incoming ON ElectronicDocUUID = _Incoming.ElectronicDocUUID  -- association [1]
LEFT OUTER JOIN I_TR_ElectronicDocExpInvoice AS _Export ON ElectronicDocUUID = _Export.ElectronicDocUUID  -- association [1]
;