ESH_S_PURCHASECONTRACT
Search view -PURCHASECONTRACT
ESH_S_PURCHASECONTRACT is a CDS View that provides data about "Search view -PURCHASECONTRACT" in SAP S/4HANA. It reads from 1 data source (ESH_N_PURCHASECONTRACT) and exposes 45 fields with key field PURCHASECONTRACT. It has 1 association to related views. Part of development package BSESH_MM_PUR_HANA_CONTENT.
SAP Help Documentation
| Category | CDS Views for Purchase Contracts |
|---|---|
| Status | Released |
Purpose
This CDS view is an enterprise search model generated out of other purchase contracts based CDS views. It helps you get a holistic view of your purchase contract statistics, and also helps you analyse your business data on various parameters, by providing answers to business questions such as: This CDS view provides the prerequisites for answering the following business questions: Which purchase contracts are valid for a particular period? Which supplier holds the most number of purchase contracts? When was the purchase contract created? How many purchase contracts are there per document type?
Prerequisites
You must have a role based on the SAP_BR_PURCHASER business role template.
Structure
Object types This view relates to the following SAP object types: PurchaseContract PurchaseContracttem Main CDS parameters and filters The main CDS parameters are: Purchase Contract Purchase Contract Item Material Name Supplier Name Payment Terms Name Purchasing Group Name Plant Name Purchasing Organization Name Company Code Name The main filters are: Purchase Contract Purchasing Document Type Purchasing Group Name Purchasing Organization Name Validity Start Date Supplier Name Plant Name Material Group Name Measures and attributes Some important measures and attributes are: Purchase Contract Supplier Name Payment Terms Name Purchasing Group Name Purchase Contract Target Amount Validity Start Date Incoterms Classification Name Plant Name Target Quantity
This CDS view is an enterprise search model generated out of other purchase contracts based CDS views. It helps you get a holistic view of your purchase contract statistics, and also helps you analyse your business data on various parameters, by providing answers to business questions such as: This CDS view provides the prerequisites for answering the following business questions: Which purchase contracts are valid for a particular period? Which supplier holds the most number of purchase contracts? When was the purchase contract created? How many purchase contracts are there per document type?
Prerequisites
You must have a role based on the SAP_BR_PURCHASER business role template.
Structure
Object types This view relates to the following SAP object types: PurchaseContract PurchaseContracttem Main CDS parameters and filters The main CDS parameters are: Purchase Contract Purchase Contract Item Material Name Supplier Name Payment Terms Name Purchasing Group Name Plant Name Purchasing Organization Name Company Code Name The main filters are: Purchase Contract Purchasing Document Type Purchasing Group Name Purchasing Organization Name Validity Start Date Supplier Name Plant Name Material Group Name Measures and attributes Some important measures and attributes are: Purchase Contract Supplier Name Payment Terms Name Purchasing Group Name Purchase Contract Target Amount Validity Start Date Incoterms Classification Name Plant Name Target Quantity
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| ESH_N_PURCHASECONTRACT | ESH_N_PURCHASECONTRACT | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Language | abap.lang |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | E_PURCHASINGDOCUMENT | _PURCHASINGDOCUMENT | ( $projection.PURCHASECONTRACT = _PURCHASINGDOCUMENT.PURCHASINGDOCUMENT ) |
Annotations (19)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.serviceQuality | #P | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ObjectModel.modelingPattern | #ENTERPRISE_SEARCH_PROVIDER | view | |
| Metadata.allowExtensions | true | view | |
| Search.searchable | true | view | |
| EnterpriseSearch.enabled | true | view | |
| ObjectModel.sapObjectNodeType.name | PurchaseContract | view | |
| UI.headerInfo.typeName | Purchase Contract | view | |
| UI.headerInfo.typeNamePlural | Purchase Contracts | view | |
| EnterpriseSearch.dclInterpretationMode | #RESPECT_CARDINALITY | view | |
| Consumption.semanticObject | PurchaseContract | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| UI.headerInfo.title.value | PURCHASINGDOCUMENTTYPENAME | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.sqlViewName | ESH_U_PURCTR | view |
Fields (45)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PURCHASECONTRACT | PURCHASECONTRACT | Purchasing Doc. | |
| VENDAUTHGRP | VENDAUTHGRP | |||
| MATLTYPAUTHGRP | MATLTYPAUTHGRP | |||
| MATAUTHGRP | MATAUTHGRP | |||
| COMPANYCODE | COMPANYCODE | Receiver Company Code | ||
| COMPANYCODENAME | COMPANYCODENAME | Company | ||
| CONTRACTNETPRICEAMOUNT | CONTRACTNETPRICEAMOUNT | Net Price | ||
| CREATEDBYUSER | CREATEDBYUSER | User Name | ||
| CREATIONDATE | CREATIONDATE | Time Stamp | ||
| CURRENCY | CURRENCY | Valuation Crcy | ||
| DOCUMENTCURRENCY | DOCUMENTCURRENCY | Document Currency | ||
| INCOTERMSCLASSIFICATIONNAME | INCOTERMSCLASSIFICATIONNAME | Incoterms | ||
| INCOTERMSTRANSFERLOCATION | INCOTERMSTRANSFERLOCATION | Incoterms 2 | ||
| MATERIAL | MATERIAL | Vehicle Model | ||
| MATGRPAUTHGRP | MATGRPAUTHGRP | |||
| MATERIALGROUP | MATERIALGROUP | Product Group | ||
| MATERIALGROUPNAME | MATERIALGROUPNAME | Material Group | ||
| MATERIALNAME | MATERIALNAME | Material Description | ||
| NETPRICEQUANTITY | NETPRICEQUANTITY | Price Unit | ||
| ORDERPRICEUNIT | ORDERPRICEUNIT | Order Price Un. | ||
| ORDERQUANTITYUNIT | ORDERQUANTITYUNIT | Sales Unit | ||
| SUPPLIERNAME | SUPPLIERNAME | Supplier | ||
| PAYMENTTERMS | PAYMENTTERMS | Pyt Terms | ||
| PAYMENTTERMSNAME | PAYMENTTERMSNAME | Terms of Payment | ||
| PLANT | PLANT | Plant Code | ||
| PLANTNAME | PLANTNAME | Plant | ||
| PURCHASECONTRACTITEM | PURCHASECONTRACTITEM | Item | ||
| PURCHASECONTRACTITEMTEXT | PURCHASECONTRACTITEMTEXT | Short Text | ||
| PURCHASECONTRACTTARGETAMOUNT | PURCHASECONTRACTTARGETAMOUNT | Header Target Value | ||
| PURCHASECONTRACTTYPE | PURCHASECONTRACTTYPE | Order Type | ||
| DELETIONCODEHDR | DELETIONCODEHDR | Del. Indicator | ||
| PURCHASINGDOCUMENTDELETIONCODE | PURCHASINGDOCUMENTDELETIONCODE | Deleted Purchase Contract | ||
| PURCHASINGDOCUMENTTYPENAME | PURCHASINGDOCUMENTTYPENAME | Supplier Quotation Type | ||
| PURCHASINGGROUP | PURCHASINGGROUP | Purchasing Group | ||
| PURCHASINGGROUPNAME | PURCHASINGGROUPNAME | Purchasing Group | ||
| PURCHASINGORGANIZATION | PURCHASINGORGANIZATION | Purchasing Organization | ||
| PURCHASINGORGANIZATIONNAME | PURCHASINGORGANIZATIONNAME | Purchasing Organization | ||
| SUPPLIER | SUPPLIER | Supplier | ||
| VENDACCTGRP | VENDACCTGRP | |||
| SUPPLIERPHONENUMBER | SUPPLIERPHONENUMBER | Telephone | ||
| TARGETAMOUNT | TARGETAMOUNT | Target Value | ||
| TARGETQUANTITY | TARGETQUANTITY | Target Quantity | ||
| USERNAME | USERNAME | Created By | ||
| VALIDITYENDDATE | VALIDITYENDDATE | ValidTo | ||
| VALIDITYSTARTDATE | VALIDITYSTARTDATE | Validity Period |
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 ESH_S_PURCHASECONTRACT.
-- 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: ESH_U_PURCTR
-- Parameters: P_Language : abap.lang
CREATE VIEW ESH_S_PURCHASECONTRACT AS
SELECT
PURCHASECONTRACT,
VENDAUTHGRP,
MATLTYPAUTHGRP,
MATAUTHGRP,
COMPANYCODE,
COMPANYCODENAME,
CONTRACTNETPRICEAMOUNT,
CREATEDBYUSER,
CREATIONDATE,
CURRENCY,
DOCUMENTCURRENCY,
INCOTERMSCLASSIFICATIONNAME,
INCOTERMSTRANSFERLOCATION,
MATERIAL,
MATGRPAUTHGRP,
MATERIALGROUP,
MATERIALGROUPNAME,
MATERIALNAME,
NETPRICEQUANTITY,
ORDERPRICEUNIT,
ORDERQUANTITYUNIT,
SUPPLIERNAME,
PAYMENTTERMS,
PAYMENTTERMSNAME,
PLANT,
PLANTNAME,
PURCHASECONTRACTITEM,
PURCHASECONTRACTITEMTEXT,
PURCHASECONTRACTTARGETAMOUNT,
PURCHASECONTRACTTYPE,
DELETIONCODEHDR,
PURCHASINGDOCUMENTDELETIONCODE,
PURCHASINGDOCUMENTTYPENAME,
PURCHASINGGROUP,
PURCHASINGGROUPNAME,
PURCHASINGORGANIZATION,
PURCHASINGORGANIZATIONNAME,
SUPPLIER,
VENDACCTGRP,
SUPPLIERPHONENUMBER,
TARGETAMOUNT,
TARGETQUANTITY,
USERNAME,
VALIDITYENDDATE,
VALIDITYSTARTDATE
FROM ESH_N_PURCHASECONTRACT
LEFT OUTER JOIN E_PURCHASINGDOCUMENT AS _PURCHASINGDOCUMENT ON ( PURCHASECONTRACT = _PURCHASINGDOCUMENT.PURCHASINGDOCUMENT ) -- association [0..1]
;
Learn More
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- 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
- S/4HANA CDS View Deprecation: What You Need to Know
- 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