P_InspectionLot

DDL: P_INSPECTIONLOT SQL: PINSPLOT Type: view CONSUMPTION Package: ODATA_QM_INSPECTION_ANALYTICS

Inspection Lot

P_InspectionLot is a Consumption CDS View that provides data about "Inspection Lot" in SAP S/4HANA. It has 3 associations to related views. Part of development package ODATA_QM_INSPECTION_ANALYTICS.

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_InspectionLotWithStatus _InspLotStatus $projection.InspectionLot = _InspLotStatus.InspectionLot
[1..1] I_InspectionLotAggregate _InspLotAggr $projection.InspectionLot = _InspLotAggr.InspectionLot
[1..1] I_InspLotRsltRecgStatus _InspRsltRecg $projection.InspLotRsltRecgStatus = _InspRsltRecg.InspLotRsltRecgStatus

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PINSPLOT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Inspection Lot view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY InspectionLot I_InspectionLot InspectionLot Inspection Lot
char4endasInspLotRsltRecgStatus
Plant I_InspectionLot Plant Valuation Area
InspectionLotOrigin I_InspectionLot InspectionLotOrigin
InspectionLotType I_InspectionLot InspectionLotType Inspection Type
Material I_InspectionLot Material Vehicle Model
BatchStorageLocation I_InspectionLot BatchStorageLocation
MatlQualityAuthorizationGroup I_InspectionLot MatlQualityAuthorizationGroup QM Matl Auth.
Supplier I_InspectionLot Supplier Supplier
Manufacturer I_InspectionLot Manufacturer Manufacturer
ManufacturerPartNmbr I_InspectionLot ManufacturerPartNmbr Mfr Part Number
PurchasingOrganization I_InspectionLot PurchasingOrganization Purchasing Organization
InspectionLotHasQuantity I_InspectionLot InspectionLotHasQuantity
Customer I_InspectionLot Customer Sold-to Party
SoldToParty I_InspectionLot SoldToParty Sold-to Party
SalesOrganization I_InspectionLot SalesOrganization Sales Organization
InspectionLotHasUsageDecision I_InspectionLot InspectionLotHasUsageDecision
_InspRsltRecg _InspRsltRecg

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_InspectionLot.
-- 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: PINSPLOT

CREATE VIEW P_InspectionLot AS
SELECT
  I_InspectionLot.InspectionLot AS InspectionLot,
  case when _InspLotStatus.InspLotStatusRsltsConfirmed is null then cast( 1 as abap.char(4)) when _InspLotStatus.InspLotStatusRsltsConfirmed is not null and _InspLotStatus.InspLotStsShrtTrmInspCmpltd is null then cast( 2 as abap.char(4)) when _InspLotStatus.InspLotStsShrtTrmInspCmpltd is not null and ( _InspLotStatus.InspLotStsDefectsRecorded is not null or _InspLotAggr.InspCharRejectedCount > 0 ) then cast( 3 as abap.char(4)) when _InspLotStatus.InspLotStsShrtTrmInspCmpltd is not null then cast( 4 as abap.char(4)) else cast( 5 as abap.char(4)) end as InspLotRsltRecgStatus AS char4endasInspLotRsltRecgStatus,
  I_InspectionLot.Plant AS Plant,
  I_InspectionLot.InspectionLotOrigin AS InspectionLotOrigin,
  I_InspectionLot.InspectionLotType AS InspectionLotType,
  I_InspectionLot.Material AS Material,
  I_InspectionLot.BatchStorageLocation AS BatchStorageLocation,
  I_InspectionLot.MatlQualityAuthorizationGroup AS MatlQualityAuthorizationGroup,
  I_InspectionLot.Supplier AS Supplier,
  I_InspectionLot.Manufacturer AS Manufacturer,
  I_InspectionLot.ManufacturerPartNmbr AS ManufacturerPartNmbr,
  I_InspectionLot.PurchasingOrganization AS PurchasingOrganization,
  I_InspectionLot.InspectionLotHasQuantity AS InspectionLotHasQuantity,
  I_InspectionLot.Customer AS Customer,
  I_InspectionLot.SoldToParty AS SoldToParty,
  I_InspectionLot.SalesOrganization AS SalesOrganization,
  I_InspectionLot.InspectionLotHasUsageDecision AS InspectionLotHasUsageDecision
LEFT OUTER JOIN I_InspectionLotWithStatus AS _InspLotStatus ON InspectionLot = _InspLotStatus.InspectionLot  -- association [1..1]
LEFT OUTER JOIN I_InspectionLotAggregate AS _InspLotAggr ON InspectionLot = _InspLotAggr.InspectionLot  -- association [1..1]
LEFT OUTER JOIN I_InspLotRsltRecgStatus AS _InspRsltRecg ON InspLotRsltRecgStatus = _InspRsltRecg.InspLotRsltRecgStatus  -- association [1..1]
;