P_LegalTrMainEntityAggr

DDL: P_LEGALTRMAINENTITYAGGR SQL: PLEGALTRMENTAGGR Type: view COMPOSITE Package: VDM_LCM_LT

Aggreagation View For Legal Transaction main Entity

P_LegalTrMainEntityAggr is a Composite CDS View that provides data about "Aggreagation View For Legal Transaction main Entity" in SAP S/4HANA. It reads from 3 data sources (I_LegalTransactionEntity, I_PurchasingOrganization, I_CompanyCode) and exposes 10 fields with key field LegalTransactionEntityUUID. It has 6 associations to related views. Part of development package VDM_LCM_LT.

Data Sources (3)

SourceAliasJoin Type
I_LegalTransactionEntity _LglTrEnt from
I_PurchasingOrganization _PurchasingOrganization left_outer
I_CompanyCode _PurOrgCompanyCode left_outer

Associations (6)

CardinalityTargetAliasCondition
[0..1] I_Supplier _Supplier _Supplier.Supplier = $projection.LglCntntMEntity
[0..1] I_SalesOrganization _SalesOrganization _SalesOrganization.SalesOrganization = $projection.LglCntntMEntity
[0..1] I_Customer _Customer _Customer.Customer = $projection.LglCntntMEntity
[0..1] I_CompanyCode _CompanyCode _CompanyCode.CompanyCode = $projection.LglCntntMEntity
[0..1] I_BusinessPartner _BusinessPartner _BusinessPartner.BusinessPartner = $projection.LglCntntMEntity
[0..1] I_LCMEntityType _LCMEntityType _LCMEntityType.LglCntntMEntityType = $projection.LglCntntMEntityType

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PLEGALTRMENTAGGR view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
Metadata.ignorePropagatedAnnotations true view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.representativeKey LegalTransactionEntityUUID view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MASTER view
VDM.private true view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY LegalTransactionEntityUUID LegalTransactionEntityUUID Universal Unique ID
LglCntntMEntity LglCntntMEntity Entity ID
LglCntntMEntityType LglCntntMEntityType Entity Type
LglCntntMTechEntityType _LCMEntityType LglCntntMTechEntityType Entity Techn. Type
CountryelseendasLglCntntMEntityCountry
_Supplier _Supplier
_Customer _Customer
_BusinessPartner _BusinessPartner
LegalTransactionUUID I_LegalTransactionEntity LegalTransactionUUID Universal Unique ID
_LegalTransaction I_LegalTransactionEntity _LegalTransaction

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 P_LegalTrMainEntityAggr.
-- 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: PLEGALTRMENTAGGR

CREATE VIEW P_LegalTrMainEntityAggr AS
SELECT
  LegalTransactionEntityUUID,
  LglCntntMEntity,
  LglCntntMEntityType,
  _LCMEntityType.LglCntntMTechEntityType AS LglCntntMTechEntityType,
  case _LCMEntityType.LglCntntMTechEntityType when '01' then _Supplier.Country when '02' then _Customer.Country when '03' then _CompanyCode.Country when '04' then _SalesOrganization._CompanyCode.Country when '05' then _PurOrgCompanyCode.Country when '06' then _BusinessPartner._CurrentDefaultAddress._AddressDefaultRepresentation.Country else '' end as LglCntntMEntityCountry AS CountryelseendasLglCntntMEntityCountry,
  _LglTrEnt.LegalTransactionUUID AS LegalTransactionUUID,
  _LglTrEnt._LegalTransaction AS _LegalTransaction
FROM I_LegalTransactionEntity AS _LglTrEnt
LEFT OUTER JOIN I_PurchasingOrganization AS _PurchasingOrganization ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CompanyCode AS _PurOrgCompanyCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Supplier AS _Supplier ON _Supplier.Supplier = LglCntntMEntity  -- association [0..1]
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON _SalesOrganization.SalesOrganization = LglCntntMEntity  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON _Customer.Customer = LglCntntMEntity  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON _CompanyCode.CompanyCode = LglCntntMEntity  -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON _BusinessPartner.BusinessPartner = LglCntntMEntity  -- association [0..1]
LEFT OUTER JOIN I_LCMEntityType AS _LCMEntityType ON _LCMEntityType.LglCntntMEntityType = LglCntntMEntityType  -- association [0..1]
;