ATPC_CDS_PREDECESSOR
Predecessor documents
ATPC_CDS_PREDECESSOR is a CDS View that provides data about "Predecessor documents" in SAP S/4HANA. It reads from 5 data sources (eban, eket, ekpo, I_ATPRlvtSDDocumentCategory, vbfa) and exposes 13 fields with key fields mandt, atpcat, delnr, delps, bstypLthenU4elseU1endasatpcat.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| eban | eban | inner |
| eket | eket | union |
| ekpo | ekpo | inner |
| I_ATPRlvtSDDocumentCategory | I_ATPRlvtSDDocumentCategory | inner |
| vbfa | vbfa | from |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ATPC_PREDECESSOR | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Predecessor documents | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | mandt | mandt | Editing Client | |
| KEY | atpcat | |||
| KEY | delnr | vbeln | Source PurchDoc | |
| KEY | delps | posnn | Subsequent Item | |
| atpcat_pre | ||||
| delnr_pre | vbelv | Requisition | ||
| mandt | Editing Client | |||
| KEY | bstypLthenU4elseU1endasatpcat | |||
| KEY | delnr | eket | ebeln | Source PurchDoc |
| KEY | delps | Subsequent Item | ||
| atpcat_pre | ||||
| delnr_pre | eket | banfn | Requisition | |
| delps_pre |
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 ATPC_CDS_PREDECESSOR.
-- 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: ATPC_PREDECESSOR
CREATE VIEW ATPC_CDS_PREDECESSOR AS
SELECT
mandt,
cast(concat('V',vbtyp_n) as abap.char(2)) AS atpcat,
vbeln AS delnr,
posnn AS delps,
cast(concat('V',vbtyp_v) as abap.char(2)) AS atpcat_pre,
vbelv AS delnr_pre,
case when ekpo.bstyp = 'F' then 'U1' when ekpo.bstyp = 'L' then 'U4' else 'U1' end as atpcat AS bstypLthenU4elseU1endasatpcat,
cast(concat('0', eket.bnfpo) as abap.numc( 6 )) AS delps_pre
FROM vbfa
INNER JOIN I_ATPRlvtSDDocumentCategory ON /* join condition not captured in parsed metadata */
INNER JOIN ekpo ON /* join condition not captured in parsed metadata */
INNER JOIN eban ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): eket
;
Learn More
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- 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