P_ProjectVersion01

DDL: P_PROJECTVERSION01 SQL: PPROJVERSION01 Type: view BASIC

P_ProjectVersion01 is a Basic CDS View in SAP S/4HANA. It reads from 7 data sources and exposes 8 fields with key fields rsnumelseendasProjectObjectExternalID, rsnumthenOKelseendasObjectType, Version.

Data Sources (7)

SourceAliasJoin Type
vsafvc_cn vsafvc_cn left_outer
vsaufk_cn vsaufk_cn left_outer
vskopf vskopf from
vsproj_cn vsproj_cn left_outer
vsprps_cn vsprps_cn left_outer
vsresb_cn vsresb_cn left_outer
vssteu vssteu left_outer

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PPROJVERSION01 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #BASIC view
VDM.private true view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY rsnumelseendasProjectObjectExternalID
KEY rsnumthenOKelseendasObjectType
KEY Version vssteu vsnmr Vers. key
ProjectVersionGroupName vssteu vsgruppe Version group
MCount vskopf vszhl Version counter
ProjectVersionDescription vskopf vstext Description
BlankCount
DistinctDescCount vskopf vstext Description

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_ProjectVersion01.
-- 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: PPROJVERSION01

CREATE VIEW P_ProjectVersion01 AS
SELECT
  case when vsproj_cn.pspid is not null or vsproj_cn.pspid <> '' then vsproj_cn.pspid when vsprps_cn.posid is not null or vsprps_cn.posid <> '' then vsprps_cn.posid when vsaufk_cn.aufnr is not null or vsaufk_cn.aufnr <> '' then vsaufk_cn.aufnr when vsafvc_cn.vornr is not null or vsafvc_cn.vornr <> '' then vsafvc_cn.vornr when vsresb_cn.rsnum is not null or vsresb_cn.rsnum <> '' then vsresb_cn.rsnum else '' end as ProjectObjectExternalID AS rsnumelseendasProjectObjectExternalID,
  case when vsproj_cn.pspid is not null or vsproj_cn.pspid <> '' then 'PD' when vsprps_cn.posid is not null or vsprps_cn.posid <> '' then 'PR' when vsaufk_cn.aufnr is not null or vsaufk_cn.aufnr <> '' then 'NP' when vsafvc_cn.vornr is not null or vsafvc_cn.vornr <> '' then 'NV' when vsresb_cn.rsnum is not null or vsresb_cn.rsnum <> '' then 'OK' else '' end as ObjectType AS rsnumthenOKelseendasObjectType,
  vssteu.vsnmr AS Version,
  vssteu.vsgruppe AS ProjectVersionGroupName,
  vskopf.vszhl AS MCount,
  vskopf.vstext AS ProjectVersionDescription,
  case length( vskopf.vstext ) when 0 then 1 else 0 end AS BlankCount,
  vskopf.vstext AS DistinctDescCount
FROM vskopf
LEFT OUTER JOIN vssteu ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN vsproj_cn ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN vsprps_cn ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN vsaufk_cn ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN vsafvc_cn ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN vsresb_cn ON /* join condition not captured in parsed metadata */
;