I_SalesDocumentPartner

DDL: I_SALESDOCUMENTPARTNER Type: view COMPOSITE

Sales Document Partner

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 30 fields with key fields SalesDocument, PartnerFunction. It has 10 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentPartner Partner from
I_SalesDocumentBasic SalesDocument inner

Associations (10)

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

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 (30)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument
KEY PartnerFunction I_SDDocumentPartner PartnerFunction Partner Functn
Customer I_SDDocumentPartner Customer Sold-to Party
Supplier I_SDDocumentPartner Supplier Supplier
Personnel I_SDDocumentPartner Personnel Personnel No.
AddressID I_SDDocumentPartner AddressID Ship-to address
AddressPersonID I_SDDocumentPartner AddressPersonID Person Number
AddressObjectType I_SDDocumentPartner AddressObjectType Address Type
SDDocPartnerAddrIsDocSpecific I_SDDocumentPartner SDDocPartnerAddrIsDocSpecific
SDDocPartnerAddressRefType I_SDDocumentPartner SDDocPartnerAddressRefType Adress ind.
BPAddrDeterminationTransaction I_SDDocumentPartner BPAddrDeterminationTransaction Address Detn
BPRefAddressIDForDocSpcfcAddr I_SDDocumentPartner BPRefAddressIDForDocSpcfcAddr BP Ref. Address Num.
ContactPerson I_SDDocumentPartner ContactPerson Contact Person Key
ReferenceBusinessPartner I_SDDocumentPartner ReferenceBusinessPartner Busn. Partner
VATRegistration I_SDDocumentPartner VATRegistration VAT Registration No.
UnloadingPointName I_SDDocumentPartner UnloadingPointName Unloading Point Name
SDDocumentCategory I_SalesDocumentBasic SDDocumentCategory Document Cat.
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
_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.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,
  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_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]
;