A_LegalDocument
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)
| Source | Alias | Join Type |
|---|---|---|
| I_LcmDocumentTP | LegalDocument | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA