I_SALESDOCUMENTITEMPARTNER
Sales Document Item Partner
I_SALESDOCUMENTITEMPARTNER is a CDS View in S/4HANA. Sales Document Item Partner. It contains 28 fields. 8 CDS views read from this table.
CDS Views using this table (8)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_CreditMemoReqItemPartner | view | from | COMPOSITE | Credit Memo Request Item Partner |
| I_DebitMemoReqItemPartner | view | from | COMPOSITE | Debit Memo Request Item Partner |
| I_SalesOrderItemPartner | view | from | COMPOSITE | Sales Order Item Partner |
| I_SalesQuotationItemPartner | view | from | COMPOSITE | Sales Quotation Item Partner |
| I_SalesSchedgAgrmtItemPartner | view | from | COMPOSITE | Sales Scheduling Agreement Item Partner |
| I_SlsOrdWthoutChrgItmPartner | view | from | COMPOSITE | Item Partner for Sales Order Without Charge |
| P_SalesDocItemCompletePartner | view | from | COMPOSITE | |
| P_SalesDocItemInheritedPartner | view | left_outer | COMPOSITE |
Fields (28)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | PartnerFunction | PartnerFunction | 2 |
| KEY | SalesDocument | SalesDocument | 1 |
| KEY | SalesDocumentItem | SalesDocumentItem | 1 |
| _Address | _Address | 2 | |
| _BPRefAddressForDocSpcfcAddr | _BPRefAddressForDocSpcfcAddr | 2 | |
| _BusinessPartnerAddress | _BusinessPartnerAddress | 2 | |
| _DfltAddrRprstn | _DfltAddrRprstn | 2 | |
| _PartnerFunction | _PartnerFunction | 2 | |
| _SalesDocument | _SalesDocument | 1 | |
| _SalesDocumentItem | _SalesDocumentItem | 1 | |
| AddressID | AddressID | 2 | |
| AddressObjectType | AddressObjectType | 2 | |
| AddressPersonID | AddressPersonID | 2 | |
| BPAddrDeterminationTransaction | BPAddrDeterminationTransaction | 2 | |
| BPRefAddressIDForDocSpcfcAddr | BPRefAddressIDForDocSpcfcAddr | 2 | |
| ContactPerson | ContactPerson | 2 | |
| Customer | Customer | 2 | |
| EmailAddress | EmailAddress | 1 | |
| FullName | FullName | 1 | |
| InternationalMobilePhoneNumber | InternationalMobilePhoneNumber | 1 | |
| InternationalPhoneNumber | InternationalPhoneNumber | 1 | |
| Partner | Partner | 1 | |
| Personnel | Personnel | 2 | |
| ReferenceBusinessPartner | ReferenceBusinessPartner | 2 | |
| SDDocPartnerAddressRefType | SDDocPartnerAddressRefType | 2 | |
| Supplier | Supplier | 2 | |
| UnloadingPointName | UnloadingPointName | 1 | |
| VATRegistration | VATRegistration | 1 |
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Sales Document Item Partner'
@VDM: {
viewType: #COMPOSITE,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA'),
privilegedAssociations: [ '_Address', '_DfltAddrRprstn', '_PersonAddress', '_PersonName', '_OrganizationAddress', '_OrgNamePostalAddress' ]
}
@AbapCatalog: {
sqlViewName: 'ISDSLSDOCITPT',
compiler.compareFilter: true
}
@ObjectModel: {
representativeKey: 'PartnerFunction',
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XL
},
supportedCapabilities: [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]
}
@Metadata.ignorePropagatedAnnotations: true
define view I_SalesDocumentItemPartner
as select from I_SDDocumentItemPartner as Partner
inner join I_SalesDocumentItemBasic as SalesDocumentItem on SalesDocumentItem.SalesDocument = Partner.SDDocument
and SalesDocumentItem.SalesDocumentItem = Partner.SDDocumentItem
inner join I_SalesDocumentBasic as SalesDocument on SalesDocument.SalesDocument = Partner.SDDocument
association [1..1] to I_SalesDocument as _SalesDocument on $projection.SalesDocument = _SalesDocument.SalesDocument
association [1..1] to I_SalesDocumentItem as _SalesDocumentItem on $projection.SalesDocument = _SalesDocumentItem.SalesDocument
and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
association [1] to I_WorkAssignment as _WorkAssignment on $projection.Personnel = _WorkAssignment.WorkAssignment
association [0..1] to I_ContactPerson as _ContactPerson on $projection.ContactPerson = _ContactPerson.ContactPerson
association [0..1] to I_OrganizationAddress as _OrganizationAddress on $projection.AddressID = _OrganizationAddress.AddressID
and $projection.AddressPersonID = _OrganizationAddress.AddressPersonID
and $projection.AddressObjectType = '1'
and _OrganizationAddress.AddressRepresentationCode is initial
association [0..1] to I_PersonAddress as _PersonAddress on $projection.AddressID = _PersonAddress.AddressID
and $projection.AddressPersonID = _PersonAddress.AddressPersonID
and $projection.AddressObjectType = '2'
and _PersonAddress.AddressRepresentationCode is initial
association [0..1] to I_PersonWorkplaceAddress as _PersonWorkplaceAddress on $projection.AddressID = _PersonWorkplaceAddress.AddressID
and $projection.AddressPersonID = _PersonWorkplaceAddress.AddressPersonID
and $projection.AddressObjectType = '3'
and _PersonWorkplaceAddress.AddressRepresentationCode is initial
association [0..1] to I_AddrOrgNamePostalAddress as _OrgNamePostalAddress on $projection.AddressID = _OrgNamePostalAddress.AddressID
and _OrgNamePostalAddress.AddressRepresentationCode is initial
association [0..1] to I_AddressPersonName as _PersonName on $projection.AddressPersonID = _PersonName.AddressPersonID
and _PersonName.AddressRepresentationCode is initial
association [0..1] to I_AddrCurDfltLandlinePhoneNmbr as _CurrentDfltLandlinePhoneNmbr on $projection.AddressID = _CurrentDfltLandlinePhoneNmbr.AddressID
and $projection.AddressPersonID = _CurrentDfltLandlinePhoneNmbr.AddressPersonID
association [0..1] to I_AddrCurDefaultEmailAddress as _CurrentDfltEmailAddress on $projection.AddressID = _CurrentDfltEmailAddress.AddressID
and $projection.AddressPersonID = _CurrentDfltEmailAddress.AddressPersonID
association [0..1] to I_AddrCurDfltMobilePhoneNumber as _CurrentDfltMobilePhoneNumber on $projection.AddressID = _CurrentDfltMobilePhoneNumber.AddressID
and $projection.AddressPersonID = _CurrentDfltMobilePhoneNumber.AddressPersonID
association [0..1] to I_AddrCurDefaultFaxNumber as _CurrentDfltFaxNumber on $projection.AddressID = _CurrentDfltFaxNumber.AddressID
and $projection.AddressPersonID = _CurrentDfltFaxNumber.AddressPersonID
{
@ObjectModel.foreignKey.association: '_SalesDocument'
key cast(Partner.SDDocument as vbeln_va preserving type) as SalesDocument,
@ObjectModel.foreignKey.association: '_SalesDocumentItem'
@ObjectModel.text.element: 'SalesDocumentItemText'
key SalesDocumentItem.SalesDocumentItem,
@ObjectModel.foreignKey.association: '_PartnerFunction'
key Partner.PartnerFunction,
Partner.Customer,
Partner.Supplier,
Partner.Personnel,
Partner.ContactPerson,
Partner.ReferenceBusinessPartner,
Partner.AddressID,
Partner.AddressPersonID,
Partner.AddressObjectType,
Partner.SDDocPartnerAddressRefType,
Partner.BPAddrDeterminationTransaction,
Partner.BPRefAddressIDForDocSpcfcAddr,
Partner.SDDocPartnerAddrIsDocSpecific,
@ObjectModel.foreignKey.association: '_SDDocumentCategory'
SalesDocument.SDDocumentCategory,
Partner.VATRegistration,
@Semantics.text: true
Partner.UnloadingPointName,
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,
cast(
case Partner.AddressID
when ''
then
case
when Partner.Personnel != '00000000'
then coalesce(_WorkAssignment.PersonFullName,
_WorkAssignment._BusinessPartner.LastName)
end
else
case
when Partner.AddressObjectType = '1'
then
case
when Partner.ContactPerson != '0000000000'
then
cast(substring(replace(concat(_ContactPerson.FirstName,
concat(' &@', _ContactPerson.LastName) ), '&@', '') ,1,80) as ad_namtext )
when Partner.Personnel != '00000000'
then _OrganizationAddress.AddresseeName1 //Document specific personnel
else
cast(concat_with_space(_OrganizationAddress.AddresseeName1,
_OrganizationAddress.AddresseeName2, 1) as ad_namtext )
end
when Partner.AddressObjectType = '2'
then _PersonAddress.PersonFullName
when Partner.AddressObjectType = '3'
then _PersonWorkplaceAddress.PersonFullName
end
end as ad_namtext ) as FullName,
_OrgNamePostalAddress.Country,
cast(
coalesce( _PersonName.FormOfAddress,
_OrgNamePostalAddress.FormOfAddress )
as ad_title preserving type ) as FormOfAddress,
coalesce( _PersonName.CorrespondenceLanguage,
_OrgNamePostalAddress.CorrespondenceLanguage ) as CorrespondenceLanguage,
/* Communication Related Data */
cast(
coalesce( _CurrentDfltLandlinePhoneNmbr.InternationalPhoneNumber,
_WorkAssignment._WorkplaceAddress.NormalizedPhoneNumber )
as ad_telnrlg preserving type ) as InternationalPhoneNumber,
cast(
coalesce( _CurrentDfltMobilePhoneNumber.InternationalPhoneNumber,
_WorkAssignment._WorkplaceAddress.MblNormalizedPhoneNumber )
as ad_telnrlg preserving type ) as InternationalMobilePhoneNumber,
cast(
coalesce( _CurrentDfltFaxNumber.InternationalFaxNumber,
_WorkAssignment._WorkplaceAddress.InternationalFaxNumber )
as ad_fxnrlng preserving type ) as InternationalFaxNumber,
cast(
coalesce( _CurrentDfltEmailAddress.EmailAddress,
_WorkAssignment._WorkplaceAddress.DefaultEmailAddress )
as vdm_sd_ad_smtpadr preserving type ) as EmailAddress,
//Association
@ObjectModel.association.type: [#TO_COMPOSITION_ROOT]
_SalesDocument,
@ObjectModel.association.type: [#TO_COMPOSITION_PARENT]
_SalesDocumentItem,
Partner._PartnerFunction,
Partner._Address,
Partner._DfltAddrRprstn,
Partner._BusinessPartnerAddress,
Partner._BPRefAddressForDocSpcfcAddr,
SalesDocument._SDDocumentCategory,
SalesDocumentItemText,
_PersonAddress,
_PersonName,
_OrganizationAddress,
_OrgNamePostalAddress
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRCURDEFAULTEMAILADDRESS",
"I_ADDRCURDEFAULTFAXNUMBER",
"I_ADDRCURDFLTLANDLINEPHONENMBR",
"I_ADDRCURDFLTMOBILEPHONENUMBER",
"I_ADDRESSPERSONNAME",
"I_ADDRORGNAMEPOSTALADDRESS",
"I_BUSINESSPARTNER",
"I_CONTACTPERSON",
"I_ORGANIZATIONADDRESS",
"I_PERSONADDRESS",
"I_PERSONWORKPLACEADDRESS",
"I_SALESDOCUMENTBASIC",
"I_SALESDOCUMENTITEMBASIC",
"I_SDDOCUMENTITEMPARTNER",
"I_WORKASSIGNMENT",
"I_WORKPLACEADDRESS"
],
"ASSOCIATED":
[
"I_ADDRCURDEFAULTEMAILADDRESS",
"I_ADDRCURDEFAULTFAXNUMBER",
"I_ADDRCURDFLTLANDLINEPHONENMBR",
"I_ADDRCURDFLTMOBILEPHONENUMBER",
"I_ADDRESS",
"I_ADDRESSPERSONNAME",
"I_ADDRESS_2",
"I_ADDRORGNAMEPOSTALADDRESS",
"I_BUSPARTADDRESS",
"I_CONTACTPERSON",
"I_ORGANIZATIONADDRESS",
"I_PARTNERFUNCTION",
"I_PERSONADDRESS",
"I_PERSONWORKPLACEADDRESS",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"I_SDDOCUMENTCATEGORY",
"I_WORKASSIGNMENT"
],
"BASE":
[
"I_SALESDOCUMENTBASIC",
"I_SDDOCUMENTITEMPARTNER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/