P_SuplrInvcItmQtyVariancePred
P_SuplrInvcItmQtyVariancePred is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (P_SUPINV_CASH_DISCOUNT_DATE, ekko, ekpo, rseg) and exposes 74 fields with key fields SupplierInvoice, FiscalYear, SupplierInvoiceItem.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| P_SUPINV_CASH_DISCOUNT_DATE | _SI_CASH_DISC_DATE | inner |
| ekko | ekko | inner |
| ekpo | ekpo | inner |
| rseg | rseg | from |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSIQTYVARPRED | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ClientHandling.type | #CLIENT_DEPENDENT | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view | |
| VDM.lifecycle.contract.type | #NONE | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (74)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SupplierInvoice | rseg | belnr | SD Document |
| KEY | FiscalYear | rseg | gjahr | Settlement Year |
| KEY | SupplierInvoiceItem | rseg | buzei | Posting View Item |
| PurchaseOrder | rseg | ebeln | Source PurchDoc | |
| PurchaseOrderItem | rseg | ebelp | Item pur. doc. | |
| Material | rseg | matnr | Vehicle Model | |
| ValuationArea | rseg | bwkey | Valuation Area | |
| InventoryValuationType | rseg | bwtar | Valuation Type | |
| CompanyCode | rseg | bukrs | Value | |
| ReceivingPlant | rseg | werks | Receiving Plant | |
| SupplierInvoiceItemAmount | rseg | wrbtr | Gross Amount | |
| DebitCreditCode | rseg | shkzg | Returns | |
| TaxCode | rseg | mwskz | Tax Code | |
| TaxJurisdiction | rseg | txjcd | Tax Jurisdict. | |
| Quantity | rseg | menge | WarrCountValue | |
| PurchaseOrderQuantityUnit | rseg | bstme | Unit.Order | |
| QtyInPurchaseOrderPriceUnit | rseg | bpmng | Qty. in OPUn | |
| PurchaseOrderPriceUnit | rseg | bprme | PO Price Unit | |
| PurchasingDocumentItemCategory | rseg | pstyp | Item Category | |
| AccountAssignmentCategory | rseg | knttp | AcctAssgnCat:CC | |
| MaterialValuationClass | rseg | bklas | Valuation Class | |
| IsSubsequentDebitCredit | rseg | tbtkz | Subseq. Dr/Cr | |
| SuplrInvcItemHasPriceVariance | rseg | spgrp | Block.Reas.:Prc | |
| SuplrInvcItemHasDateVariance | rseg | spgrt | Bl. Reason Date | |
| SuplrInvcItemHasOrdPrcQtyVarc | rseg | spgrg | Block.Reas: OPQ | |
| SuplrInvcItemHasProjBdgtVarc | rseg | spgrv | Block.Reas:Proj | |
| SuplrInvcItemHasOtherVariance | rseg | spgrq | Man.Block.Reasn | |
| SuplrInvcItemHasAmountOutsdTol | rseg | spgrs | Blkg Reas. Amount | |
| SuplrInvcItmHasQualityVariance | rseg | spgrc | Block: Quality | |
| IsLIFOAndFIFORelevant | rseg | xlifo | LIFO/FIFO-Rel. | |
| StockIdentifyingMaterial | rseg | matbf | Stock Mat. | |
| QuantityAsPerInvoicingParty | rseg | rbmng | Inv. Doc. Qty | |
| AmountAsPerInvoicingParty | rseg | rbwwr | Inv.Amnt DC | |
| SuplrInvcVerificatSuplrErrType | rseg | lfehl | Supplier Error | |
| SupplierPostingLineItemText | rseg | sgtxt | Text | |
| SuplrInvcItemCorrectionInd | rseg | kzmek | Correction ID | |
| SupplierInvoiceComplaintReason | rseg | complaint_reason | Complaints Reason | |
| RetentionAmountInDocCurrency | rseg | retamt_fc | Retent. in Doc. Crcy | |
| RetentionPercentage | rseg | retpc | Retention % | |
| RetentionDueDate | rseg | retduedt | Due Date | |
| ProductType | rseg | producttype | Product Type Group | |
| StockSegment | rseg | sgt_scat | Stock Segment | |
| CreationDate | P_SUPINV_CASH_DISCOUNT_DATE | cpudt | Imported On | |
| CreationTime | P_SUPINV_CASH_DISCOUNT_DATE | cputm | Time | |
| PaymentTerms | P_SUPINV_CASH_DISCOUNT_DATE | zterm | Terms of Payment | |
| DueCalculationBaseDate | P_SUPINV_CASH_DISCOUNT_DATE | zfbdt | Payment date | |
| CashDiscount1Days | P_SUPINV_CASH_DISCOUNT_DATE | zbd1t | Payment in | |
| CashDiscount1Percent | P_SUPINV_CASH_DISCOUNT_DATE | zbd1p | Max. Cash Dis. (%) | |
| CashDiscount2Days | P_SUPINV_CASH_DISCOUNT_DATE | zbd2t | Payment in | |
| CashDiscount2Percent | P_SUPINV_CASH_DISCOUNT_DATE | zbd2p | Nrm. Cash Dis. (%) | |
| NetPaymentDays | P_SUPINV_CASH_DISCOUNT_DATE | zbd3t | Payment in | |
| InvoicingParty | P_SUPINV_CASH_DISCOUNT_DATE | LIFNR_RBKP | Vendor no. | |
| PurchaseOrderCreationDate | ekko | aedat | Obsolete | |
| PurchasingOrganization | ekko | ekorg | Purchasing Org. | |
| PurchasingGroup | ekko | ekgrp | Sub. purchasing grp | |
| PurchaseOrderDate | ekko | bedat | Start date | |
| ValidityStartDate | ekko | kdatb | Validity Start | |
| ValidityEndDate | ekko | kdate | Validity End | |
| SupplyingSupplier | ekko | llief | Goods Supplier | |
| Customer | ekko | kunnr | Stock customer | |
| IncotermsPart1 | ekko | inco1 | Incoterms | |
| IncotermsPart2 | ekko | inco2 | Incoterms 2 | |
| IncotermsLocation1 | ekko | inco2_l | Inco. Location1 | |
| IncotermsLocation2 | ekko | inco3_l | Inco. Location2 | |
| Supplier | ekko | lifre | Location Alias | |
| DownPaymentType | ekko | dptyp | Down Payment | |
| DownPaymentPercentageOfTotAmt | ekko | dppct | Down Payment % | |
| DownPaymentAmount | ekko | dpamt | Down Payment Amt | |
| DownPaymentDueDate | ekko | dpdat | Due Date for DP | |
| ShippingType | ekko | vsart | Shp.type: stage | |
| ShippingCondition | ekko | shipcond | Shipping Conditions | |
| SuplrInvcItemHasQtyVariance | rseg | spgrm | Block.Reas.:Qty | |
| EarliestCashDiscountDate | P_SUPINV_CASH_DISCOUNT_DATE | EarliestCashDiscountDate | ||
| SuplrInvcIsGROnTimeForCashDisc |
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_SuplrInvcItmQtyVariancePred.
-- 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: PSIQTYVARPRED
CREATE VIEW P_SuplrInvcItmQtyVariancePred AS
SELECT
rseg.belnr AS SupplierInvoice,
rseg.gjahr AS FiscalYear,
rseg.buzei AS SupplierInvoiceItem,
rseg.ebeln AS PurchaseOrder,
rseg.ebelp AS PurchaseOrderItem,
rseg.matnr AS Material,
rseg.bwkey AS ValuationArea,
rseg.bwtar AS InventoryValuationType,
rseg.bukrs AS CompanyCode,
rseg.werks AS ReceivingPlant,
rseg.wrbtr AS SupplierInvoiceItemAmount,
rseg.shkzg AS DebitCreditCode,
rseg.mwskz AS TaxCode,
rseg.txjcd AS TaxJurisdiction,
rseg.menge AS Quantity,
rseg.bstme AS PurchaseOrderQuantityUnit,
rseg.bpmng AS QtyInPurchaseOrderPriceUnit,
rseg.bprme AS PurchaseOrderPriceUnit,
rseg.pstyp AS PurchasingDocumentItemCategory,
rseg.knttp AS AccountAssignmentCategory,
rseg.bklas AS MaterialValuationClass,
rseg.tbtkz AS IsSubsequentDebitCredit,
rseg.spgrp AS SuplrInvcItemHasPriceVariance,
rseg.spgrt AS SuplrInvcItemHasDateVariance,
rseg.spgrg AS SuplrInvcItemHasOrdPrcQtyVarc,
rseg.spgrv AS SuplrInvcItemHasProjBdgtVarc,
rseg.spgrq AS SuplrInvcItemHasOtherVariance,
rseg.spgrs AS SuplrInvcItemHasAmountOutsdTol,
rseg.spgrc AS SuplrInvcItmHasQualityVariance,
rseg.xlifo AS IsLIFOAndFIFORelevant,
rseg.matbf AS StockIdentifyingMaterial,
rseg.rbmng AS QuantityAsPerInvoicingParty,
rseg.rbwwr AS AmountAsPerInvoicingParty,
rseg.lfehl AS SuplrInvcVerificatSuplrErrType,
rseg.sgtxt AS SupplierPostingLineItemText,
rseg.kzmek AS SuplrInvcItemCorrectionInd,
rseg.complaint_reason AS SupplierInvoiceComplaintReason,
rseg.retamt_fc AS RetentionAmountInDocCurrency,
rseg.retpc AS RetentionPercentage,
rseg.retduedt AS RetentionDueDate,
rseg.producttype AS ProductType,
rseg.sgt_scat AS StockSegment,
_SI_CASH_DISC_DATE.cpudt AS CreationDate,
_SI_CASH_DISC_DATE.cputm AS CreationTime,
_SI_CASH_DISC_DATE.zterm AS PaymentTerms,
_SI_CASH_DISC_DATE.zfbdt AS DueCalculationBaseDate,
_SI_CASH_DISC_DATE.zbd1t AS CashDiscount1Days,
_SI_CASH_DISC_DATE.zbd1p AS CashDiscount1Percent,
_SI_CASH_DISC_DATE.zbd2t AS CashDiscount2Days,
_SI_CASH_DISC_DATE.zbd2p AS CashDiscount2Percent,
_SI_CASH_DISC_DATE.zbd3t AS NetPaymentDays,
_SI_CASH_DISC_DATE.LIFNR_RBKP AS InvoicingParty,
ekko.aedat AS PurchaseOrderCreationDate,
ekko.ekorg AS PurchasingOrganization,
ekko.ekgrp AS PurchasingGroup,
ekko.bedat AS PurchaseOrderDate,
ekko.kdatb AS ValidityStartDate,
ekko.kdate AS ValidityEndDate,
ekko.llief AS SupplyingSupplier,
ekko.kunnr AS Customer,
ekko.inco1 AS IncotermsPart1,
ekko.inco2 AS IncotermsPart2,
ekko.inco2_l AS IncotermsLocation1,
ekko.inco3_l AS IncotermsLocation2,
ekko.lifre AS Supplier,
ekko.dptyp AS DownPaymentType,
ekko.dppct AS DownPaymentPercentageOfTotAmt,
ekko.dpamt AS DownPaymentAmount,
ekko.dpdat AS DownPaymentDueDate,
ekko.vsart AS ShippingType,
ekko.shipcond AS ShippingCondition,
rseg.spgrm AS SuplrInvcItemHasQtyVariance,
_SI_CASH_DISC_DATE.EarliestCashDiscountDate AS EarliestCashDiscountDate,
cast('' as char1 ) AS SuplrInvcIsGROnTimeForCashDisc
FROM rseg
INNER JOIN P_SUPINV_CASH_DISCOUNT_DATE AS _SI_CASH_DISC_DATE ON /* join condition not captured in parsed metadata */
INNER JOIN ekpo ON /* join condition not captured in parsed metadata */
INNER JOIN ekko ON /* join condition not captured in parsed metadata */
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA