@AbapCatalog: {
sqlViewName: 'PSDOCITMCMPLPT',
compiler.compareFilter: true,
preserveKey: true
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
representativeKey: 'PartnerFunction',
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #B,
sizeCategory: #XL
}
}
@VDM: {
private: true,
viewType: #COMPOSITE
}
@AccessControl: {
authorizationCheck: #PRIVILEGED_ONLY,
personalData.blocking: #('TRANSACTIONAL_DATA'),
privilegedAssociations: [ '_DfltAddrRprstn' ]
}
@Metadata.ignorePropagatedAnnotations:true
define view P_SalesDocItemCompletePartner
as select from I_SalesDocumentItemPartner as ItemPartner
association [0..1] to I_ContactPerson as _ContactPerson on $projection.ContactPerson = _ContactPerson.ContactPerson
{
@ObjectModel.foreignKey.association: '_SalesDocument'
key ItemPartner.SalesDocument,
@ObjectModel.foreignKey.association: '_SalesDocumentItem'
key ItemPartner.SalesDocumentItem,
@ObjectModel.foreignKey.association: '_PartnerFunction'
key ItemPartner.PartnerFunction,
ItemPartner.Customer,
ItemPartner.Supplier,
ItemPartner.ContactPerson,
ItemPartner.ReferenceBusinessPartner,
ItemPartner.Personnel,
ItemPartner.AddressID,
ItemPartner.AddressPersonID,
ItemPartner.AddressObjectType,
ItemPartner.SDDocPartnerAddressRefType,
ItemPartner.BPAddrDeterminationTransaction,
ItemPartner.BPRefAddressIDForDocSpcfcAddr,
ItemPartner.VATRegistration,
@Semantics.text: true
ItemPartner.UnloadingPointName,
cast ( 'X' as sd_partner_item_ind) as PartnerIsSpecificForSDDocItem,
/* Associations */
ItemPartner._Address,
ItemPartner._DfltAddrRprstn,
ItemPartner._BusinessPartnerAddress,
ItemPartner._BPRefAddressForDocSpcfcAddr,
ItemPartner._SalesDocument,
ItemPartner._SalesDocumentItem,
ItemPartner._PartnerFunction,
_ContactPerson
}
union all
select from P_SalesDocItemInheritedPartner as InheritedPartner
association[1..1] to I_SalesDocumentItem as _SalesDocumentItem on $projection.SalesDocument = _SalesDocumentItem.SalesDocument
and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
{
@ObjectModel.foreignKey.association: '_SalesDocument'
key InheritedPartner.SalesDocument,
@ObjectModel.foreignKey.association: '_SalesDocumentItem'
key InheritedPartner.SalesDocumentItem,
@ObjectModel.foreignKey.association: '_PartnerFunction'
key InheritedPartner.PartnerFunction,
InheritedPartner.Customer,
InheritedPartner.Supplier,
InheritedPartner.ContactPerson,
InheritedPartner.ReferenceBusinessPartner,
InheritedPartner.Personnel,
InheritedPartner.AddressID,
InheritedPartner.AddressPersonID,
InheritedPartner.AddressObjectType,
InheritedPartner.SDDocPartnerAddressRefType,
InheritedPartner.BPAddrDeterminationTransaction,
InheritedPartner.BPRefAddressIDForDocSpcfcAddr,
InheritedPartner.VATRegistration,
@Semantics.text: true
InheritedPartner.UnloadingPointName,
cast ( ' ' as sd_partner_item_ind) as PartnerIsSpecificForSDDocItem,
/* Associations */
InheritedPartner._Address,
InheritedPartner._DfltAddrRprstn,
InheritedPartner._BusinessPartnerAddress,
InheritedPartner._BPRefAddressForDocSpcfcAddr,
InheritedPartner._SalesDocument,
_SalesDocumentItem,
InheritedPartner._PartnerFunction,
InheritedPartner._ContactPerson
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SALESDOCUMENTITEMPARTNER",
"P_SALESDOCITEMINHERITEDPARTNER"
],
"ASSOCIATED":
[
"I_ADDRESS",
"I_ADDRESS_2",
"I_BUSPARTADDRESS",
"I_CONTACTPERSON",
"I_PARTNERFUNCTION",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM"
],
"BASE":
[
"I_SALESDOCUMENTITEMPARTNER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/