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_DocObjKeyForQltyInProcmt.
-- 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: PDOCQLTYINPROCMT
CREATE VIEW P_DocObjKeyForQltyInProcmt AS
SELECT
P_RevLvlForQltyInProcmt.Material AS Material,
P_RevLvlForQltyInProcmt.QltyInProcmtIntID AS QltyInProcmtIntID,
P_RevLvlForQltyInProcmt.Plant AS Plant,
P_RevLvlForQltyInProcmt.MaterialRevisionLevel AS MaterialRevisionLevel,
case length(P_RevLvlForQltyInProcmt.Material) when 1 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 39) when 2 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 38) when 3 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 37) when 4 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 36) when 5 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 35) when 6 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 34) when 7 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 33) when 8 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 32) when 9 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 31) when 10 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 30) when 11 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 29) when 12 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 28) when 13 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 27) when 14 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 26) when 15 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 25) when 16 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 24) when 17 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 23) when 18 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 22) when 19 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 21) when 20 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 20) when 21 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 19) when 22 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 18) when 23 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 17) when 24 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 16) when 25 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 15) when 26 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 14) when 27 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 13) when 28 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 12) when 29 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 11) when 30 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 10) when 31 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 9) when 32 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 8) when 33 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 7) when 34 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 6) when 35 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 5) when 36 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 4) when 37 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 3) when 38 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 2) when 39 then concat_with_space( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID , 1) when 40 then concat( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID ) else concat( P_RevLvlForQltyInProcmt.Material , P_RevLvlForQltyInProcmt.QltyInProcmtIntID ) end as LinkedSAPObjectKey AS QltyInProcmtIntIDendasLinkedSAPObjectKey
FROM P_RevLvlForQltyInProcmt
;