I_SalesDocumentPartner
Sales Document Partner
I_SalesDocumentPartner (Composite)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.
Sales
I_SalesDocumentPartner is a Composite CDS View that provides data about "Sales Document Partner" in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentPartner, I_SalesDocumentBasic) and exposes 32 fields with key fields SalesDocument, PartnerFunction. It has 12 associations to related views. Part of development package VDM_SD_SLS.
SAP API Hub
| Category | Composite |
|---|---|
| State | C1 |
| Line of Business | Sales |
| Application Component | SD-SLS-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 provides the prerequisites for answering questions about sales document partners at header level. Example business questions could include:</p> <ul> <li> <p>What are the partner functions specified in a given sales document?</p> </li> <li> <p>Who is the customer, supplier, personnel, or contact person of a given sales document?</p> </li> <li> <p>What is the address of a partner in a given sales document?</p> </li> </ul> |
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 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 (2)
| Source | Alias | Join Type |
|---|---|---|
| I_SDDocumentPartner | Partner | from |
| I_SalesDocumentBasic | SalesDocument | inner |
Associations (12)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_SalesDocument | _SalesDocument | $projection.SalesDocument = _SalesDocument.SalesDocument |
| [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_PersonWorkplaceAddress | _PersonWorkplaceAddress | $projection.AddressID = _PersonWorkplaceAddress.AddressID and $projection.AddressPersonID = _PersonWorkplaceAddress.AddressPersonID and $projection.AddressObjectType = '3' and _PersonWorkplaceAddress.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 |
| [1] | I_WorkplaceAddress | _WorkPlaceAddress | $projection.ReferenceBusinessPartner = _WorkPlaceAddress.BusinessPartner |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Sales Document Partner | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AbapCatalog.sqlViewName | ISDSLSDOCPT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.representativeKey | PartnerFunction | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (32)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesDocument | Sales Document | ||
| KEY | PartnerFunction | I_SDDocumentPartner | PartnerFunction | Partner Function |
| Customer | I_SDDocumentPartner | Customer | Customer Number | |
| Supplier | I_SDDocumentPartner | Supplier | Account Number of Supplier | |
| Personnel | I_SDDocumentPartner | Personnel | Personnel Number | |
| AddressID | I_SDDocumentPartner | AddressID | Ship-to address | |
| AddressPersonID | I_SDDocumentPartner | AddressPersonID | Person Number | |
| AddressObjectType | I_SDDocumentPartner | AddressObjectType | Address type (1=Organization, 2=Person, 3=Contact person) | |
| SDDocPartnerAddrIsDocSpecific | I_SDDocumentPartner | SDDocPartnerAddrIsDocSpecific | Document-Specific Address | |
| SDDocPartnerAddressRefType | I_SDDocumentPartner | SDDocPartnerAddressRefType | Address indicator | |
| BPAddrDeterminationTransaction | I_SDDocumentPartner | BPAddrDeterminationTransaction | Address Determination in Document | |
| BPRefAddressIDForDocSpcfcAddr | I_SDDocumentPartner | BPRefAddressIDForDocSpcfcAddr | BP Reference Address Number | |
| PartnerIsOneTimeAccount | I_SDDocumentPartner | PartnerIsOneTimeAccount | One-Time Customer | |
| ContactPerson | I_SDDocumentPartner | ContactPerson | Number of Contact Person | |
| ReferenceBusinessPartner | I_SDDocumentPartner | ReferenceBusinessPartner | Reference Business Partner | |
| VATRegistration | I_SDDocumentPartner | VATRegistration | VAT Registration Number | |
| UnloadingPointName | I_SDDocumentPartner | UnloadingPointName | Unloading Point Name | |
| SDDocumentCategory | I_SalesDocumentBasic | SDDocumentCategory | SD Document Category | |
| ContactPersonaskunnrelseendasPartner | ||||
| _SalesDocument | _SalesDocument | |||
| _PartnerFunction | I_SDDocumentPartner | _PartnerFunction | ||
| _Address | I_SDDocumentPartner | _Address | ||
| _DfltAddrRprstn | I_SDDocumentPartner | _DfltAddrRprstn | ||
| _BusinessPartnerAddress | I_SDDocumentPartner | _BusinessPartnerAddress | ||
| _BPRefAddressForDocSpcfcAddr | I_SDDocumentPartner | _BPRefAddressForDocSpcfcAddr | ||
| _ContactPerson | I_SDDocumentPartner | _ContactPerson | ||
| _WorkforcePersonMappings | I_SDDocumentPartner | _WorkforcePersonMappings | ||
| _SDDocumentCategory | I_SalesDocumentBasic | _SDDocumentCategory | ||
| _PersonAddress | _PersonAddress | |||
| _PersonName | _PersonName | |||
| _OrganizationAddress | _OrganizationAddress | |||
| _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_SalesDocumentPartner.
-- 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_SalesDocumentPartner AS
SELECT
cast(Partner.SDDocument as vbeln_va preserving type) AS SalesDocument,
Partner.PartnerFunction AS PartnerFunction,
Partner.Customer AS Customer,
Partner.Supplier AS Supplier,
Partner.Personnel AS Personnel,
Partner.AddressID AS AddressID,
Partner.AddressPersonID AS AddressPersonID,
Partner.AddressObjectType AS AddressObjectType,
Partner.SDDocPartnerAddrIsDocSpecific AS SDDocPartnerAddrIsDocSpecific,
Partner.SDDocPartnerAddressRefType AS SDDocPartnerAddressRefType,
Partner.BPAddrDeterminationTransaction AS BPAddrDeterminationTransaction,
Partner.BPRefAddressIDForDocSpcfcAddr AS BPRefAddressIDForDocSpcfcAddr,
Partner.PartnerIsOneTimeAccount AS PartnerIsOneTimeAccount,
Partner.ContactPerson AS ContactPerson,
Partner.ReferenceBusinessPartner AS ReferenceBusinessPartner,
Partner.VATRegistration AS VATRegistration,
Partner.UnloadingPointName AS UnloadingPointName,
SalesDocument.SDDocumentCategory AS SDDocumentCategory,
case when Partner.Customer != '' then Partner.Customer when Partner.Supplier != '' then Partner.Supplier when Partner.Personnel != '00000000' then cast(Partner.Personnel as kunnr) when Partner.ContactPerson != '0000000000' then cast(Partner.ContactPerson as kunnr) else '' end as Partner AS ContactPersonaskunnrelseendasPartner,
Partner._PartnerFunction AS _PartnerFunction,
Partner._Address AS _Address,
Partner._DfltAddrRprstn AS _DfltAddrRprstn,
Partner._BusinessPartnerAddress AS _BusinessPartnerAddress,
Partner._BPRefAddressForDocSpcfcAddr AS _BPRefAddressForDocSpcfcAddr,
Partner._ContactPerson AS _ContactPerson,
Partner._WorkforcePersonMappings AS _WorkforcePersonMappings,
SalesDocument._SDDocumentCategory AS _SDDocumentCategory
FROM I_SDDocumentPartner AS Partner
INNER JOIN I_SalesDocumentBasic AS SalesDocument ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SalesDocument AS _SalesDocument ON SalesDocument = _SalesDocument.SalesDocument -- association [1..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_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_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]
LEFT OUTER JOIN I_WorkplaceAddress AS _WorkPlaceAddress ON ReferenceBusinessPartner = _WorkPlaceAddress.BusinessPartner -- association [1]
;
Learn More
- 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
- 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