I_SalesDocumentPartner

DDL: I_SALESDOCUMENTPARTNER Type: view COMPOSITE Package: VDM_SD_SLS

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

CategoryComposite
StateC1
Line of BusinessSales
Application ComponentSD-SLS-2CL
CapabilitiesData 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
PackageSales 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

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentPartner Partner from
I_SalesDocumentBasic SalesDocument inner

Associations (12)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;