I_ComplaintInspection

DDL: I_COMPLAINTINSPECTION Type: view_entity BASIC

Inspection Detail

I_ComplaintInspection is a Basic CDS View that provides data about "Inspection Detail" in SAP S/4HANA. It reads from 2 data sources (/spe/inspecresp, /spe/inspecresh) and exposes 10 fields with key fields PrecedingDocument, PrecedingDocumentItem, InspectionDocument, ReturnsInspectionItem. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
/spe/inspecresp _Item inner
/spe/inspecresh /spe/inspecresh from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_ReturnsInspectionStatusText _InspectionStatusText $projection.ReturnsInspectionStatus = _InspectionStatusText.ReturnsInspectionStatus and _InspectionStatusText.Language = $session.system_language
[0..1] I_CustomerReturn _CustomerReturn $projection.ReferenceDocument = _CustomerReturn.CustomerReturn

Annotations (7)

NameValueLevelField
VDM.viewType #BASIC view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Inspection Detail view
ObjectModel.compositionRoot true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY PrecedingDocument /spe/inspecresh deliv_numb Delivery
KEY PrecedingDocumentItem /spe/inspecresh deliv_item Item
KEY InspectionDocument
KEY ReturnsInspectionItem /spe/inspecresp item_no Sort No.
SubsequentDocumentCategory
DocumentTypeDescription
_InspectionStatusText _InspectionStatusText
ReferenceDocument
ReferenceDocumentItem
_CustomerReturn _CustomerReturn

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 I_ComplaintInspection.
-- 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.

CREATE VIEW I_ComplaintInspection AS
SELECT
  /spe/inspecresh.deliv_numb AS PrecedingDocument,
  /spe/inspecresh.deliv_item AS PrecedingDocumentItem,
  cast(/spe/inspecresh.inspec_no as /spe/inspec_no_routine) AS InspectionDocument,
  _Item.item_no AS ReturnsInspectionItem,
  'INSP' AS SubsequentDocumentCategory,
  '' AS DocumentTypeDescription,
  cast( ( /spe/inspecresh.ref_doc ) as awref ) AS ReferenceDocument,
  cast (right(/spe/inspecresh.ref_doc_item, 6) as fins_awitem) AS ReferenceDocumentItem
FROM /spe/inspecresh
INNER JOIN /spe/inspecresp AS _Item ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ReturnsInspectionStatusText AS _InspectionStatusText ON ReturnsInspectionStatus = _InspectionStatusText.ReturnsInspectionStatus AND _InspectionStatusText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CustomerReturn AS _CustomerReturn ON ReferenceDocument = _CustomerReturn.CustomerReturn  -- association [0..1]
;