ATPC_CDS_PREDECESSOR

DDL: ATPC_CDS_PREDECESSOR SQL: ATPC_PREDECESSOR Type: view

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)

SourceAliasJoin Type
eban eban inner
eket eket union
ekpo ekpo inner
I_ATPRlvtSDDocumentCategory I_ATPRlvtSDDocumentCategory inner
vbfa vbfa from

Annotations (8)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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
;