I_SalesContractPartner
Sales Contract Partner
I_SalesContractPartner (Composite)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.
Sales
I_SalesContractPartner is a Composite CDS View that provides data about "Sales Contract Partner" in SAP S/4HANA. It reads from 1 data source (P_SalesContractPartner) and exposes 29 fields with key fields SalesContract, PartnerFunction, SDDocPartnerSequenceNumber. It has 10 associations to related views. It is exposed through 1 OData service (ASQL_F7066). Part of development package VDM_SD_SLS_OA_CCO.
SAP Help Documentation
| Category | Sales Contracts |
|---|
This CDS view retrieves partner information from a sales contract at header level. To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .
Prerequisites
Authorizations Users who want to use this CDS view must have a role with the following restriction types set to read access: Sales Document Type Sales Area These restriction types are edited in the Maintain Business Roles app.
Structure
Important Fields Important fields in this view include the following: Field Name Description SalesContract Sales Contract PartnerFunction Partner Function SDDocPartnerSequenceNumber Counter Partner Customer Supplier Supplier Personnel Personnel ContactPerson Contact Person AddressID Address Number AddressPersonID Person Number ReferenceBusinessPartner Business Partner VATRegistration VAT Registration No.
SAP API Hub
| Category | Composite |
|---|---|
| State | C1 |
| Line of Business | Sales |
| Application Component | SD-SLS-OA-CCO-2CL |
| Capabilities | Data Source in SQL Select,Data Source for Defining CDS Entities,Association Target for Defining CDS Entities |
| Extensible (Key User) | No |
| Extensible (Developer) | No |
| Release State (Key User) | Released |
| Release State (Developer) | Released |
| Package | Sales for SAP S/4HANA Cloud Public Edition |
| Description | <p>This CDS view retrieves partner information from a sales contract at header level.</p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p> |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Public Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Public Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Public Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Custom Communication Scenarios — Create custom communication scenarios to configure custom communication arrangement
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Public Edition — Explore SAP S/4HANA Cloud Public Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Public Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_SalesContractPartner | SDPartner | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PersonWorkplaceAddress | _PersonWorkplaceAddress | $projection.AddressID = _PersonWorkplaceAddress.AddressID and $projection.AddressPersonID = _PersonWorkplaceAddress.AddressPersonID and $projection.AddressObjectType = '3' and _PersonWorkplaceAddress.AddressRepresentationCode is initial |
| [1] | I_WorkAssignment | _WorkAssignment | $projection.Personnel = _WorkAssignment.WorkAssignment |
| [0..1] | I_OrganizationAddress | _OrganizationAddress | $projection.AddressID = _OrganizationAddress.AddressID and $projection.AddressPersonID = _OrganizationAddress.AddressPersonID and $projection.AddressObjectType = '1' and _OrganizationAddress.AddressRepresentationCode is initial |
| [0..1] | I_PersonAddress | _PersonAddress | $projection.AddressID = _PersonAddress.AddressID and $projection.AddressPersonID = _PersonAddress.AddressPersonID and $projection.AddressObjectType = '2' and _PersonAddress.AddressRepresentationCode is initial |
| [0..1] | I_AddrOrgNamePostalAddress | _OrgNamePostalAddress | $projection.AddressID = _OrgNamePostalAddress.AddressID and _OrgNamePostalAddress.AddressRepresentationCode is initial |
| [0..1] | I_AddressPersonName | _PersonName | $projection.AddressPersonID = _PersonName.AddressPersonID and _PersonName.AddressRepresentationCode is initial |
| [0..1] | I_AddrCurDfltLandlinePhoneNmbr | _CurrentDfltLandlinePhoneNmbr | $projection.AddressID = _CurrentDfltLandlinePhoneNmbr.AddressID and $projection.AddressPersonID = _CurrentDfltLandlinePhoneNmbr.AddressPersonID |
| [0..1] | I_AddrCurDefaultEmailAddress | _CurrentDfltEmailAddress | $projection.AddressID = _CurrentDfltEmailAddress.AddressID and $projection.AddressPersonID = _CurrentDfltEmailAddress.AddressPersonID |
| [0..1] | I_AddrCurDfltMobilePhoneNumber | _CurrentDfltMobilePhoneNumber | $projection.AddressID = _CurrentDfltMobilePhoneNumber.AddressID and $projection.AddressPersonID = _CurrentDfltMobilePhoneNumber.AddressPersonID |
| [0..1] | I_AddrCurDefaultFaxNumber | _CurrentDfltFaxNumber | $projection.AddressID = _CurrentDfltFaxNumber.AddressID and $projection.AddressPersonID = _CurrentDfltFaxNumber.AddressPersonID |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Sales Contract Partner | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AbapCatalog.sqlViewName | ISCONTRPART | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
OData Services (1)
| Service | Binding | Version | Contract | Release |
|---|---|---|---|---|
| ASQL_F7066 | ASQL_F7066 | C2 | NOT_RELEASED |
Fields (29)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesContract | P_SalesContractPartner | SalesContract | Sales Document |
| KEY | PartnerFunction | P_SalesContractPartner | PartnerFunction | Partner Function |
| KEY | SDDocPartnerSequenceNumber | P_SalesContractPartner | SDDocPartnerSequenceNumber | Counter for partner functions |
| Partner | P_SalesContractPartner | Partner | Customer Number | |
| Customer | P_SalesContractPartner | Customer | Customer Number | |
| Supplier | P_SalesContractPartner | Supplier | Account Number of Supplier | |
| Personnel | P_SalesContractPartner | Personnel | Personnel Number | |
| ContactPerson | P_SalesContractPartner | ContactPerson | Number of Contact Person | |
| AddressID | P_SalesContractPartner | AddressID | Ship-to address | |
| AddressPersonID | P_SalesContractPartner | AddressPersonID | Person Number | |
| AddressObjectType | P_SalesContractPartner | AddressObjectType | Address type (1=Organization, 2=Person, 3=Contact person) | |
| SDDocPartnerAddressRefType | P_SalesContractPartner | SDDocPartnerAddressRefType | Address indicator | |
| BPAddrDeterminationTransaction | P_SalesContractPartner | BPAddrDeterminationTransaction | Address Determination in Document | |
| BPRefAddressIDForDocSpcfcAddr | P_SalesContractPartner | BPRefAddressIDForDocSpcfcAddr | BP Reference Address Number | |
| SDDocPartnerAddrIsDocSpecific | P_SalesContractPartner | SDDocPartnerAddrIsDocSpecific | Document-Specific Address | |
| ReferenceBusinessPartner | P_SalesContractPartner | ReferenceBusinessPartner | Business Partner Number | |
| VATRegistration | P_SalesContractPartner | VATRegistration | VAT Registration Number | |
| UnloadingPointName | UnloadingPointName | Unloading Point Name | ||
| FormOfAddressasFormOfAddress | ||||
| _PartnerFunction | _PartnerFunction | |||
| _Address | _Address | |||
| _SalesContract | _SalesContract | |||
| _ContactPerson | _ContactPerson | |||
| _DfltAddrRprstn | _DfltAddrRprstn | |||
| _BusinessPartnerAddress | _BusinessPartnerAddress | |||
| _OrganizationAddress | _OrganizationAddress | |||
| _PersonAddress | _PersonAddress | |||
| _PersonWorkplaceAddress | _PersonWorkplaceAddress | |||
| _OrgNamePostalAddress | _OrgNamePostalAddress |
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_SalesContractPartner.
-- 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_SalesContractPartner AS
SELECT
SDPartner.SalesContract AS SalesContract,
SDPartner.PartnerFunction AS PartnerFunction,
SDPartner.SDDocPartnerSequenceNumber AS SDDocPartnerSequenceNumber,
SDPartner.Partner AS Partner,
SDPartner.Customer AS Customer,
SDPartner.Supplier AS Supplier,
SDPartner.Personnel AS Personnel,
SDPartner.ContactPerson AS ContactPerson,
SDPartner.AddressID AS AddressID,
SDPartner.AddressPersonID AS AddressPersonID,
SDPartner.AddressObjectType AS AddressObjectType,
SDPartner.SDDocPartnerAddressRefType AS SDDocPartnerAddressRefType,
SDPartner.BPAddrDeterminationTransaction AS BPAddrDeterminationTransaction,
SDPartner.BPRefAddressIDForDocSpcfcAddr AS BPRefAddressIDForDocSpcfcAddr,
SDPartner.SDDocPartnerAddrIsDocSpecific AS SDDocPartnerAddrIsDocSpecific,
SDPartner.ReferenceBusinessPartner AS ReferenceBusinessPartner,
SDPartner.VATRegistration AS VATRegistration,
UnloadingPointName,
coalesce(_PersonName.FormOfAddress, _OrgNamePostalAddress.FormOfAddress ) as FormOfAddress AS FormOfAddressasFormOfAddress
FROM P_SalesContractPartner AS SDPartner
LEFT OUTER JOIN I_PersonWorkplaceAddress AS _PersonWorkplaceAddress ON AddressID = _PersonWorkplaceAddress.AddressID AND AddressPersonID = _PersonWorkplaceAddress.AddressPersonID AND AddressObjectType = '3' AND _PersonWorkplaceAddress.AddressRepresentationCode is initial -- association [0..1]
LEFT OUTER JOIN I_WorkAssignment AS _WorkAssignment ON Personnel = _WorkAssignment.WorkAssignment -- association [1]
LEFT OUTER JOIN I_OrganizationAddress AS _OrganizationAddress ON AddressID = _OrganizationAddress.AddressID AND AddressPersonID = _OrganizationAddress.AddressPersonID AND AddressObjectType = '1' AND _OrganizationAddress.AddressRepresentationCode is initial -- association [0..1]
LEFT OUTER JOIN I_PersonAddress AS _PersonAddress ON AddressID = _PersonAddress.AddressID AND AddressPersonID = _PersonAddress.AddressPersonID AND AddressObjectType = '2' AND _PersonAddress.AddressRepresentationCode is initial -- association [0..1]
LEFT OUTER JOIN I_AddrOrgNamePostalAddress AS _OrgNamePostalAddress ON AddressID = _OrgNamePostalAddress.AddressID AND _OrgNamePostalAddress.AddressRepresentationCode is initial -- association [0..1]
LEFT OUTER JOIN I_AddressPersonName AS _PersonName ON AddressPersonID = _PersonName.AddressPersonID AND _PersonName.AddressRepresentationCode is initial -- association [0..1]
LEFT OUTER JOIN I_AddrCurDfltLandlinePhoneNmbr AS _CurrentDfltLandlinePhoneNmbr ON AddressID = _CurrentDfltLandlinePhoneNmbr.AddressID AND AddressPersonID = _CurrentDfltLandlinePhoneNmbr.AddressPersonID -- association [0..1]
LEFT OUTER JOIN I_AddrCurDefaultEmailAddress AS _CurrentDfltEmailAddress ON AddressID = _CurrentDfltEmailAddress.AddressID AND AddressPersonID = _CurrentDfltEmailAddress.AddressPersonID -- association [0..1]
LEFT OUTER JOIN I_AddrCurDfltMobilePhoneNumber AS _CurrentDfltMobilePhoneNumber ON AddressID = _CurrentDfltMobilePhoneNumber.AddressID AND AddressPersonID = _CurrentDfltMobilePhoneNumber.AddressPersonID -- association [0..1]
LEFT OUTER JOIN I_AddrCurDefaultFaxNumber AS _CurrentDfltFaxNumber ON AddressID = _CurrentDfltFaxNumber.AddressID AND AddressPersonID = _CurrentDfltFaxNumber.AddressPersonID -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- OData Services in SAP S/4HANA Explained
- Service Bindings and Service Definitions in SAP S/4HANA
- 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
- 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