A_LegalDocument

DDL: A_LEGALDOCUMENT SQL: ALEGALDOCUMENT Type: view CONSUMPTION Package: ODATA_LCM_DOC_API

Legal Document

A_LegalDocument is a Consumption CDS View that provides data about "Legal Document" in SAP S/4HANA. It reads from 1 data source (I_LcmDocumentTP) and exposes 41 fields with key field LglCntntMDocumentUUID. It has 5 associations to related views. Part of development package ODATA_LCM_DOC_API.

Data Sources (1)

SourceAliasJoin Type
I_LcmDocumentTP LegalDocument from

Associations (5)

CardinalityTargetAliasCondition
[0..*] A_LglDocStamp _LglCntntMDocumentStampTP $projection.LglCntntMDocumentUUID = _LglCntntMDocumentStampTP.LglCntntMDocumentUUID
[0..*] A_LglCntntMDocParCategory _LglCntntMDocParCategoryTP $projection.LglCntntMDocumentUUID = _LglCntntMDocParCategoryTP.LglCntntMDocumentUUID
[0..*] A_LegalDocAgreement _LglCntntMDocAgreementTP $projection.LglCntntMDocumentUUID = _LglCntntMDocAgreementTP.LglCntntMDocumentUUID
[0..1] I_LegalTransactionDate _LglCntntMDocEffectiveDate $projection.LegalTransactionUUID = _LglCntntMDocEffectiveDate.LegalTransactionUUID and _LglCntntMDocEffectiveDate.LglCntntMDateType = 'SAP2'
[1..1] I_LglCntntMDocLockedReasonText _LglCntntMDocLockedReasonText $projection.LglCntntMDocLockedReasonCode = _LglCntntMDocLockedReasonText.LglCntntMDocLockedReasonCode

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName ALEGALDOCUMENT view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Legal Document view
VDM.viewType #CONSUMPTION view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.representativeKey LglCntntMDocumentUUID view
ObjectModel.compositionRoot true view
ObjectModel.transactionalProcessingDelegated true view
ObjectModel.createEnabled true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view

Fields (41)

KeyFieldSource TableSource FieldDescription
KEY LglCntntMDocumentUUID I_LcmDocumentTP LglCntntMDocumentUUID Universal Unique ID
LglCntntMDocument I_LcmDocumentTP LglCntntMDocument Document ID
LglCntntMDocumentLinkedObject I_LcmDocumentTP LglCntntMDocumentLinkedObject Object
LglCntntMDocumentLinkedObjKey I_LcmDocumentTP LglCntntMDocumentLinkedObjKey UUID Char32
LegalTransaction I_LcmDocumentTP LegalTransaction Legal Transaction ID
LegalTransactionUUID I_LcmDocumentTP LegalTransactionUUID Universal Unique ID
LglCntntMDocContentType I_LcmDocumentTP LglCntntMDocContentType Content Type
LglCntntMLanguage I_LcmDocumentTP LglCntntMLanguage Language
DocumentDescription I_LcmDocumentTP DocumentDescription Doc. Name
LglCntntMDocAccessLvl I_LcmDocumentTP LglCntntMDocAccessLvl Acs. Level
LegalDocumentSource I_LcmDocumentTP LegalDocumentSource Legal Doc Source
LglCntntMDocPaperType I_LcmDocumentTP LglCntntMDocPaperType Paper Type
LglCntntMMainLinkdObjType I_LcmDocumentTP LglCntntMMainLinkdObjType Main Linked Obj Type
LglCntntMChangedUTCDateTime I_LcmDocumentTP LglCntntMChangedUTCDateTime Changed On
LglCntntMChangedByUser I_LcmDocumentTP LglCntntMChangedByUser Changed By
LglCntntMCreatedUTCDateTime I_LcmDocumentTP LglCntntMCreatedUTCDateTime Created On
LglCntntMCreatedByUser I_LcmDocumentTP LglCntntMCreatedByUser Created By
IsEndOfPurposeBlocked I_LcmDocumentTP IsEndOfPurposeBlocked Busin. Purp. Cmpltd.
InternalDocumentStatus I_LcmDocumentTP InternalDocumentStatus Status
LglCntntMProfile I_LcmDocumentTP LglCntntMProfile Profile
LglTransAccessLvl
LglCntntMMainOrgCoCode
LglCntntMMainOrgPurOrg
LglCntntMMainOrgSalesOrg
LglCntntMDocumentIsTopVersion I_LcmDocumentTP LglCntntMDocumentIsTopVersion TRUE
LglCntntMVirtualDocVersKey I_LcmDocumentTP LglCntntMVirtualDocVersKey Virtual Doc Version
LglCntntMDocAssemblyStatus
LglCntntMTmplID I_LcmDocumentTP LglCntntMTmplID Template ID
LglCntntMDocType I_LcmDocumentTP LglCntntMDocType Document Type
LglCntntMDocLowTouchLevel I_LcmDocumentTP LglCntntMDocLowTouchLevel Doc Low touch level
LglCntntMParentDocument I_LcmDocumentTP LglCntntMParentDocument Parent Document ID
LglCntntMDocumentKind I_LcmDocumentTP LglCntntMDocumentKind Document Kind
LglCntntMDocAmendmentType I_LcmDocumentTP LglCntntMDocAmendmentType Amendment Type
LglCntntMDocEffectiveFromDate I_LcmDocumentTP LglCntntMDocEffectiveFromDate Effective From
LglCntntMDocEffectiveToDate _LglCntntMDocEffectiveDate LglCntntMFromDate Valid From
LglCntntMSgntrPreference LglCntntMSgntrPreference Signature Preference
LglCntntMDocLockedReasonCode I_LcmDocumentTP LglCntntMDocLockedReasonCode Locked Reason
LglCntntMDocLockedReasonText _LglCntntMDocLockedReasonText LglCntntMDocLockedReasonText
_LglDocStamp _LglCntntMDocumentStampTP
_LglCntntMDocParCategory _LglCntntMDocParCategoryTP
_LglCntntMDocAgreement _LglCntntMDocAgreementTP

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 A_LegalDocument.
-- 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: ALEGALDOCUMENT

CREATE VIEW A_LegalDocument AS
SELECT
  LegalDocument.LglCntntMDocumentUUID AS LglCntntMDocumentUUID,
  LegalDocument.LglCntntMDocument AS LglCntntMDocument,
  LegalDocument.LglCntntMDocumentLinkedObject AS LglCntntMDocumentLinkedObject,
  LegalDocument.LglCntntMDocumentLinkedObjKey AS LglCntntMDocumentLinkedObjKey,
  LegalDocument.LegalTransaction AS LegalTransaction,
  LegalDocument.LegalTransactionUUID AS LegalTransactionUUID,
  LegalDocument.LglCntntMDocContentType AS LglCntntMDocContentType,
  LegalDocument.LglCntntMLanguage AS LglCntntMLanguage,
  LegalDocument.DocumentDescription AS DocumentDescription,
  LegalDocument.LglCntntMDocAccessLvl AS LglCntntMDocAccessLvl,
  LegalDocument.LegalDocumentSource AS LegalDocumentSource,
  LegalDocument.LglCntntMDocPaperType AS LglCntntMDocPaperType,
  LegalDocument.LglCntntMMainLinkdObjType AS LglCntntMMainLinkdObjType,
  LegalDocument.LglCntntMChangedUTCDateTime AS LglCntntMChangedUTCDateTime,
  LegalDocument.LglCntntMChangedByUser AS LglCntntMChangedByUser,
  LegalDocument.LglCntntMCreatedUTCDateTime AS LglCntntMCreatedUTCDateTime,
  LegalDocument.LglCntntMCreatedByUser AS LglCntntMCreatedByUser,
  LegalDocument.IsEndOfPurposeBlocked AS IsEndOfPurposeBlocked,
  LegalDocument.InternalDocumentStatus AS InternalDocumentStatus,
  LegalDocument.LglCntntMProfile AS LglCntntMProfile,
  LegalDocument._LegalTransaction.LglTransAccessLvl AS LglTransAccessLvl,
  LegalDocument._LegalTransaction.LglCntntMMainOrgCoCode AS LglCntntMMainOrgCoCode,
  LegalDocument._LegalTransaction.LglCntntMMainOrgPurOrg AS LglCntntMMainOrgPurOrg,
  LegalDocument._LegalTransaction.LglCntntMMainOrgSalesOrg AS LglCntntMMainOrgSalesOrg,
  LegalDocument.LglCntntMDocumentIsTopVersion AS LglCntntMDocumentIsTopVersion,
  LegalDocument.LglCntntMVirtualDocVersKey AS LglCntntMVirtualDocVersKey,
  LegalDocument._LglCntntMDocAssemblyInfo.LglCntntMDocAssemblyStatus AS LglCntntMDocAssemblyStatus,
  LegalDocument.LglCntntMTmplID AS LglCntntMTmplID,
  LegalDocument.LglCntntMDocType AS LglCntntMDocType,
  LegalDocument.LglCntntMDocLowTouchLevel AS LglCntntMDocLowTouchLevel,
  LegalDocument.LglCntntMParentDocument AS LglCntntMParentDocument,
  LegalDocument.LglCntntMDocumentKind AS LglCntntMDocumentKind,
  LegalDocument.LglCntntMDocAmendmentType AS LglCntntMDocAmendmentType,
  LegalDocument.LglCntntMDocEffectiveFromDate AS LglCntntMDocEffectiveFromDate,
  _LglCntntMDocEffectiveDate.LglCntntMFromDate AS LglCntntMDocEffectiveToDate,
  LglCntntMSgntrPreference,
  LegalDocument.LglCntntMDocLockedReasonCode AS LglCntntMDocLockedReasonCode,
  _LglCntntMDocLockedReasonText.LglCntntMDocLockedReasonText AS LglCntntMDocLockedReasonText
FROM I_LcmDocumentTP AS LegalDocument
LEFT OUTER JOIN A_LglDocStamp AS _LglCntntMDocumentStampTP ON LglCntntMDocumentUUID = _LglCntntMDocumentStampTP.LglCntntMDocumentUUID  -- association [0..*]
LEFT OUTER JOIN A_LglCntntMDocParCategory AS _LglCntntMDocParCategoryTP ON LglCntntMDocumentUUID = _LglCntntMDocParCategoryTP.LglCntntMDocumentUUID  -- association [0..*]
LEFT OUTER JOIN A_LegalDocAgreement AS _LglCntntMDocAgreementTP ON LglCntntMDocumentUUID = _LglCntntMDocAgreementTP.LglCntntMDocumentUUID  -- association [0..*]
LEFT OUTER JOIN I_LegalTransactionDate AS _LglCntntMDocEffectiveDate ON LegalTransactionUUID = _LglCntntMDocEffectiveDate.LegalTransactionUUID AND _LglCntntMDocEffectiveDate.LglCntntMDateType = 'SAP2'  -- association [0..1]
LEFT OUTER JOIN I_LglCntntMDocLockedReasonText AS _LglCntntMDocLockedReasonText ON LglCntntMDocLockedReasonCode = _LglCntntMDocLockedReasonText.LglCntntMDocLockedReasonCode  -- association [1..1]
;