P_LegalTransactionCube

DDL: P_LEGALTRANSACTIONCUBE SQL: PLCMPLGLTR Type: view CONSUMPTION

Cube - View for Legal Transaction

P_LegalTransactionCube is a Consumption CDS View that provides data about "Cube - View for Legal Transaction" in SAP S/4HANA. It reads from 1 data source (I_LegalTransaction) and exposes 59 fields with key field LegalTransactionUUID. It has 12 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_LegalTransaction I_LegalTransaction from

Associations (12)

CardinalityTargetAliasCondition
[0..1] I_LegalTransactionDateTP _LegalTransactionDateTP $projection.LegalTransactionUUID = _LegalTransactionDateTP.LegalTransactionUUID and _LegalTransactionDateTP.LglCntntMDateType = 'SAP1'
[0..1] I_LegalTransactionDateTP _LegalTransactionEndDateTP $projection.LegalTransactionUUID = _LegalTransactionEndDateTP.LegalTransactionUUID and _LegalTransactionEndDateTP.LglCntntMDateType = 'SAP2'
[0..1] I_LegalTransactionDateTP _LegalTransactionNxtTermnTP $projection.LegalTransactionUUID = _LegalTransactionNxtTermnTP.LegalTransactionUUID and _LegalTransactionNxtTermnTP.LglCntntMDateType = 'SAP3'
[0..1] I_LegalTransactionDateTP _LegalTransactionNxtRnwlTP $projection.LegalTransactionUUID = _LegalTransactionNxtRnwlTP.LegalTransactionUUID and _LegalTransactionNxtRnwlTP.LglCntntMDateType = 'SAP4'
[0..1] I_LegalTransRnwlAndTermnTP _LTRnwlAndTermn $projection.LegalTransactionUUID = _LTRnwlAndTermn.LegalTransactionUUID
[0..1] C_LegalTrLinkedObjectsTP _LegalTrLinkedObjectsTP $projection.LegalTransactionUUID = _LegalTrLinkedObjectsTP.LegalTransactionUUID and _LegalTrLinkedObjectsTP.LegalTransactionIsTriggerObj = 'X'
[0..1] I_LCMEntityTypeText _LCMEntityTypeText $projection.LglCntntMEntityType = _LCMEntityTypeText.LglCntntMEntityType and _LCMEntityTypeText.Language = $session.system_language
[0..1] I_LegalTrEntityAggr _LegalTrEntityAggr $projection.LegalTransactionUUID = _LegalTrEntityAggr.LegalTransactionUUID and $projection.LglCntntMEntity = _LegalTrEntityAggr.LglCntntMEntity
[1..1] I_LCMUserAddressAssignment _CreatedBy $projection.LglCntntMCreatedByUser = _CreatedBy.ContactCardID
[1..1] I_LCMUserAddressAssignment _ChangedBy $projection.LglCntntMChangedByUser = _ChangedBy.ContactCardID
[1..1] I_SalesOrganization _SalesOrganization $projection.LglCntntMMainOrgSalesOrg = _SalesOrganization.SalesOrganization
[1..1] I_CalendarDate _CalendarDate $projection.LglCntntMCreatedDate = _CalendarDate.CalendarDate

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName PLCMPLGLTR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Cube - View for Legal Transaction view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions false view
VDM.private true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.representativeKey LegalTransactionUUID view

Fields (59)

KeyFieldSource TableSource FieldDescription
KEY LegalTransactionUUID LegalTransactionUUID Universal Unique ID
LegalTransaction LegalTransaction Legal Transaction ID
LegalTransactionTitle LegalTransactionTitle Title
LegalTransactionHealth LegalTransactionHealth LT Status
LglCntntMLanguage LglCntntMLanguage Language
LglCntntMCreatedByUser LglCntntMCreatedByUser Created By
CreatedByName _CreatedBy FullName Name
LglCntntMCreatedDate Created On
LglCntntMChangedByUser LglCntntMChangedByUser Changed By
ChangedByName _ChangedBy FullName Name
LglCntntMChangedUTCDateTime LglCntntMChangedUTCDateTime Changed On
LglCntntMProfile LglCntntMProfile Profile
LegalTransactionSource LegalTransactionSource LegalTr Source
LglCntntMRtntnPerdStartDate LglCntntMRtntnPerdStartDate Start of Retention
LglCntntMContext _Context LglCntntMContext Context ID
LglCntntMContextTitle _Context LglCntntMContextTitle Title
LglCntntMFromDate _LegalTransactionDateTP LglCntntMFromDate Valid From
LglCntntMToDate _LegalTransactionEndDateTP LglCntntMFromDate Valid From
LglCntntMGovLaw LglCntntMGovLaw Governing Law
LglCntntMGovLawText
LglTransAccessLvl LglTransAccessLvl Acs. Level
LglCntntMAccessLvlName
LglCntntMMainOrgType LglCntntMMainOrgType Main Organisation Ty
LglCntntMMainOrgCoCode LglCntntMMainOrgCoCode Entity ID
SalesOrganizationName
LglCntntMMainOrgSalesOrg LglCntntMMainOrgSalesOrg Entity ID
LglCntntMMainOrgPurOrg LglCntntMMainOrgPurOrg Entity ID
LglCntntMIntegrationType LglCntntMIntegrationType Integration Variant
LegalTransactionHealthName _LegalTransactionHealthText LegalTransactionHealthName Long Text
LglCntntMMainOrgTypeName _LglCntntMMainOrgTypeText LglCntntMMainOrgTypeName
LglCntntMEntityType _MainLegalTransactionEntity LglCntntMEntityType Entity Type
LglCntntMEntityTypeName _MainLegalTransactionEntity LglCntntMEntityTypeName Long Text
LglCntntMEntity _MainLegalTransactionEntity LglCntntMEntity Entity ID
CompanyCodeNameendasLglCntntMMainOrgName
int410endasLegalTransTotNrOfOpenStatus
int410endasLegalTransTotNmbrOfOnTrackSts
TotalNumberOfLegalTransactions
int410endasLglTransTotNmbrOfAutoRenewed
LglCntntMRnwlTypeName
LglCntntMRnwlType _LTRnwlAndTermn LglCntntMRnwlType Renewal Type
LglCntntMLinkdObjTypeName _LegalTrLinkedObjectsTP LglCntntMLinkdObjTypeName Long Text
_ChangedBy _ChangedBy
_CompanyCode _CompanyCode
_CreatedBy _CreatedBy
_LanguageText _LanguageText
_LegalTransactionHealthText _LegalTransactionHealthText
_LglCntntMGovLawText _LglCntntMGovLawText
_LglCntntMMainOrgTypeText _LglCntntMMainOrgTypeText
_MainLegalTransactionEntity _MainLegalTransactionEntity
_PurchasingOrganization _PurchasingOrganization
_SalesOrganizationText _SalesOrganizationText
_SalesOrganization _SalesOrganization
_LTRnwlAndTermn _LTRnwlAndTermn
_LegalTrEntityAggr _LegalTrEntityAggr
_LCMEntityTypeText _LCMEntityTypeText
_CalendarDate _CalendarDate
_LegalTrLinkedObjectsTP _LegalTrLinkedObjectsTP
_LegalTransactionEndDateTP _LegalTransactionEndDateTP
_LegalTransactionDateTP _LegalTransactionDateTP

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_LegalTransactionCube.
-- 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: PLCMPLGLTR

CREATE VIEW P_LegalTransactionCube AS
SELECT
  LegalTransactionUUID,
  LegalTransaction,
  LegalTransactionTitle,
  LegalTransactionHealth,
  LglCntntMLanguage,
  LglCntntMCreatedByUser,
  _CreatedBy.FullName AS CreatedByName,
  cast(SUBSTRING(cast( LglCntntMCreatedUTCDateTime as abap.char(28)),1,8) as ecm_creationdate) AS LglCntntMCreatedDate,
  LglCntntMChangedByUser,
  _ChangedBy.FullName AS ChangedByName,
  LglCntntMChangedUTCDateTime,
  LglCntntMProfile,
  LegalTransactionSource,
  LglCntntMRtntnPerdStartDate,
  _Context.LglCntntMContext AS LglCntntMContext,
  _Context.LglCntntMContextTitle AS LglCntntMContextTitle,
  _LegalTransactionDateTP.LglCntntMFromDate AS LglCntntMFromDate,
  _LegalTransactionEndDateTP.LglCntntMFromDate AS LglCntntMToDate,
  LglCntntMGovLaw,
  _LglCntntMGovLawText[1: Language = $session.system_language].LglCntntMGovLawText AS LglCntntMGovLawText,
  LglTransAccessLvl,
  _LglCntntMAccessLvlText[1: Language = $session.system_language].LglCntntMAccessLvlName AS LglCntntMAccessLvlName,
  LglCntntMMainOrgType,
  LglCntntMMainOrgCoCode,
  _SalesOrganizationText[1: Language = $session.system_language].SalesOrganizationName AS SalesOrganizationName,
  LglCntntMMainOrgSalesOrg,
  LglCntntMMainOrgPurOrg,
  LglCntntMIntegrationType,
  _LegalTransactionHealthText.LegalTransactionHealthName AS LegalTransactionHealthName,
  _LglCntntMMainOrgTypeText.LglCntntMMainOrgTypeName AS LglCntntMMainOrgTypeName,
  _MainLegalTransactionEntity.LglCntntMEntityType AS LglCntntMEntityType,
  _MainLegalTransactionEntity.LglCntntMEntityTypeName AS LglCntntMEntityTypeName,
  _MainLegalTransactionEntity.LglCntntMEntity AS LglCntntMEntity,
  case when I_LegalTransaction.LglCntntMMainOrgType = '04' then _SalesOrganizationText.SalesOrganizationName when I_LegalTransaction.LglCntntMMainOrgType = '05' then _PurchasingOrganization.PurchasingOrganizationName else _CompanyCode.CompanyCodeName end as LglCntntMMainOrgName AS CompanyCodeNameendasLglCntntMMainOrgName,
  case when LegalTransactionHealth = '0002' or LegalTransactionHealth = '0003' then cast (1 as abap.int4(10) ) else cast (0 as abap.int4(10) ) end as LegalTransTotNrOfOpenStatus AS int410endasLegalTransTotNrOfOpenStatus,
  case when LegalTransactionHealth = '0001' then cast (1 as abap.int4(10) ) else cast (0 as abap.int4(10) ) end as LegalTransTotNmbrOfOnTrackSts AS int410endasLegalTransTotNmbrOfOnTrackSts,
  cast( 1 as lcm_totallt ) AS TotalNumberOfLegalTransactions,
  case when _LTRnwlAndTermn.LglCntntMNmbrOfRenewals > 0 then cast (1 as abap.int4(10) ) else cast (0 as abap.int4(10) ) end as LglTransTotNmbrOfAutoRenewed AS int410endasLglTransTotNmbrOfAutoRenewed,
  _LTRnwlAndTermn._LglCntntMRnwlTypeText[1: Language = $session.system_language].LglCntntMRnwlTypeName AS LglCntntMRnwlTypeName,
  _LTRnwlAndTermn.LglCntntMRnwlType AS LglCntntMRnwlType,
  _LegalTrLinkedObjectsTP.LglCntntMLinkdObjTypeName AS LglCntntMLinkdObjTypeName
FROM I_LegalTransaction
LEFT OUTER JOIN I_LegalTransactionDateTP AS _LegalTransactionDateTP ON LegalTransactionUUID = _LegalTransactionDateTP.LegalTransactionUUID AND _LegalTransactionDateTP.LglCntntMDateType = 'SAP1'  -- association [0..1]
LEFT OUTER JOIN I_LegalTransactionDateTP AS _LegalTransactionEndDateTP ON LegalTransactionUUID = _LegalTransactionEndDateTP.LegalTransactionUUID AND _LegalTransactionEndDateTP.LglCntntMDateType = 'SAP2'  -- association [0..1]
LEFT OUTER JOIN I_LegalTransactionDateTP AS _LegalTransactionNxtTermnTP ON LegalTransactionUUID = _LegalTransactionNxtTermnTP.LegalTransactionUUID AND _LegalTransactionNxtTermnTP.LglCntntMDateType = 'SAP3'  -- association [0..1]
LEFT OUTER JOIN I_LegalTransactionDateTP AS _LegalTransactionNxtRnwlTP ON LegalTransactionUUID = _LegalTransactionNxtRnwlTP.LegalTransactionUUID AND _LegalTransactionNxtRnwlTP.LglCntntMDateType = 'SAP4'  -- association [0..1]
LEFT OUTER JOIN I_LegalTransRnwlAndTermnTP AS _LTRnwlAndTermn ON LegalTransactionUUID = _LTRnwlAndTermn.LegalTransactionUUID  -- association [0..1]
LEFT OUTER JOIN C_LegalTrLinkedObjectsTP AS _LegalTrLinkedObjectsTP ON LegalTransactionUUID = _LegalTrLinkedObjectsTP.LegalTransactionUUID AND _LegalTrLinkedObjectsTP.LegalTransactionIsTriggerObj = 'X'  -- association [0..1]
LEFT OUTER JOIN I_LCMEntityTypeText AS _LCMEntityTypeText ON LglCntntMEntityType = _LCMEntityTypeText.LglCntntMEntityType AND _LCMEntityTypeText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_LegalTrEntityAggr AS _LegalTrEntityAggr ON LegalTransactionUUID = _LegalTrEntityAggr.LegalTransactionUUID AND LglCntntMEntity = _LegalTrEntityAggr.LglCntntMEntity  -- association [0..1]
LEFT OUTER JOIN I_LCMUserAddressAssignment AS _CreatedBy ON LglCntntMCreatedByUser = _CreatedBy.ContactCardID  -- association [1..1]
LEFT OUTER JOIN I_LCMUserAddressAssignment AS _ChangedBy ON LglCntntMChangedByUser = _ChangedBy.ContactCardID  -- association [1..1]
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON LglCntntMMainOrgSalesOrg = _SalesOrganization.SalesOrganization  -- association [1..1]
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON LglCntntMCreatedDate = _CalendarDate.CalendarDate  -- association [1..1]
;