P_CABusinessLock
P_CABusinessLock is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_CABusinessLock) and exposes 17 fields with key fields CABusinessLockObject, CABusinessLockObjectCategory, CABusinessProcess, CABusinessLockReason, CABusinessLockValidFrom. It has 3 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CABusinessLock | I_CABusinessLock | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Date | dats |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_ContractAccountHeader | _CAHeader | $projection.ContractAccount = _CAHeader.ContractAccount |
| [1..1] | I_ContractAccountPartner | _CAPartner | $projection.ContractAccount = _CAPartner.ContractAccount and $projection.BusinessPartner = _CAPartner.BusinessPartner |
| [1..*] | I_CABusinessLockHistory | _BusLockHistory | $projection.CABusinessLockObject = _BusLockHistory.CABusinessLockObject and $projection.CABusinessLockObjectCategory = _BusLockHistory.CABusinessLockObjectCategory and $projection.CABusinessProcess = _BusLockHistory.CABusinessProcess and $projection.CABusinessLockReason = _BusLockHistory.CABusinessLockReason and $projection.CABusinessLockValidFrom <= _BusLockHistory.CABusinessLockValidTo and $projection.CABusinessLockValidTo > _BusLockHistory.CABusinessLockValidTo |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | PCABUSLOCK | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CABusinessLockObject | CABusinessLockObject | Lock object | |
| KEY | CABusinessLockObjectCategory | CABusinessLockObjectCategory | Lock Category | |
| KEY | CABusinessProcess | CABusinessProcess | Process | |
| KEY | CABusinessLockReason | CABusinessLockReason | Lock Reason | |
| KEY | CABusinessLockValidFrom | CABusinessLockValidFrom | From | |
| KEY | CABusinessLockValidTo | CABusinessLockValidTo | To | |
| KEY | ContractAccount | ContractAccount | Contract Acct | |
| KEY | BusinessPartner | BusinessPartner | Issuing Authority | |
| KEY | CADocumentNumber | |||
| KEY | CARepetitionItemNumber | |||
| KEY | CABPItemNumber | |||
| KEY | CASubItemNumber | |||
| LastChangeDate | LastChangeDate | Time Stamp | ||
| CABusinessLockDuration | ||||
| _CAHeader | _CAHeader | |||
| _CAPartner | _CAPartner | |||
| _BusLockHistory | _BusLockHistory |
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_CABusinessLock.
-- 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: PCABUSLOCK
-- Parameters: P_Date : dats
CREATE VIEW P_CABusinessLock AS
SELECT
CABusinessLockObject,
CABusinessLockObjectCategory,
CABusinessProcess,
CABusinessLockReason,
CABusinessLockValidFrom,
CABusinessLockValidTo,
ContractAccount,
BusinessPartner,
substring( CABusinessLockObject, 1, 12) AS CADocumentNumber,
substring( CABusinessLockObject, 13, 3) AS CARepetitionItemNumber,
substring( CABusinessLockObject, 16, 4) AS CABPItemNumber,
substring( CABusinessLockObject, 20, 3) AS CASubItemNumber,
LastChangeDate,
dats_days_between(CABusinessLockValidFrom,CABusinessLockValidTo) + 1 AS CABusinessLockDuration
FROM I_CABusinessLock
LEFT OUTER JOIN I_ContractAccountHeader AS _CAHeader ON ContractAccount = _CAHeader.ContractAccount -- association [1..1]
LEFT OUTER JOIN I_ContractAccountPartner AS _CAPartner ON ContractAccount = _CAPartner.ContractAccount AND BusinessPartner = _CAPartner.BusinessPartner -- association [1..1]
LEFT OUTER JOIN I_CABusinessLockHistory AS _BusLockHistory ON CABusinessLockObject = _BusLockHistory.CABusinessLockObject AND CABusinessLockObjectCategory = _BusLockHistory.CABusinessLockObjectCategory AND CABusinessProcess = _BusLockHistory.CABusinessProcess AND CABusinessLockReason = _BusLockHistory.CABusinessLockReason AND CABusinessLockValidFrom <= _BusLockHistory.CABusinessLockValidTo AND CABusinessLockValidTo > _BusLockHistory.CABusinessLockValidTo -- association [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