I_SDDocStandardPartner is a Composite CDS View that provides data about "SD Document Standard Partner" in SAP S/4HANA. It reads from 1 data source (P_SDDocStandardPartner1) and exposes 15 fields with key field SDDocument. It has 6 associations to related views.
@ClientHandling.algorithm: #SESSION_VARIABLE@ObjectModel.usageType.dataClass: #MIXED@ObjectModel.usageType.serviceQuality: #D@ObjectModel.usageType.sizeCategory: #XL@EndUserText.label: 'SD Document Standard Partner'
@VDM.viewType: #COMPOSITE@AccessControl.authorizationCheck: #PRIVILEGED_ONLY@AccessControl.personalData.blocking: #NOT_REQUIRED@AbapCatalog.sqlViewName: 'ISDDOCSTDPART'
@AbapCatalog.preserveKey: true@AbapCatalog.compiler.compareFilter: truedefineview I_SDDocStandardPartner
// P_SDDocStandardPartner1: Get alldistinct sd document to get rid of duplicated items
asselectfrom P_SDDocStandardPartner1 as AllSDDocs
leftouter to one join I_SDDocumentPartner as SoldToParty on AllSDDocs.SDDocument = SoldToParty.SDDocument
and SoldToParty.PartnerFunction = 'AG'
leftouter to one join I_SDDocumentPartner as ShipToParty on AllSDDocs.SDDocument = ShipToParty.SDDocument
and ShipToParty.PartnerFunction = 'WE'
leftouter to one join I_SDDocumentPartner as BillToParty on AllSDDocs.SDDocument = BillToParty.SDDocument
and BillToParty.PartnerFunction = 'RE'
leftouter to one join I_SDDocumentPartner as PayerParty on AllSDDocs.SDDocument = PayerParty.SDDocument
and PayerParty.PartnerFunction = 'RG'
leftouter to one join I_SDDocumentPartner as SalesEmployee on AllSDDocs.SDDocument = SalesEmployee.SDDocument
and SalesEmployee.PartnerFunction = 'VE'
leftouter to one join I_SDDocumentPartner as ResponsibleEmployee on AllSDDocs.SDDocument = ResponsibleEmployee.SDDocument
and ResponsibleEmployee.PartnerFunction = 'ZM'
// leftouter to one join I_Employment as SalesEmployee2 on SalesEmployee1.Personnel = SalesEmployee2.EmploymentInternalID
// leftouter to one join I_Employment as ResponsibleEmployee2 on ResponsibleEmployee1.Personnel = ResponsibleEmployee2.EmploymentInternalID
association [0..1] to I_Customer as _SoldToParty on $projection.SoldToParty = _SoldToParty.Customer
association [0..1] to I_Customer as _BillToParty on $projection.BillToParty = _BillToParty.Customer
association [0..1] to I_Customer as _ShipToParty on $projection.ShipToParty = _ShipToParty.Customer
association [0..1] to I_Customer as _PayerParty on $projection.PayerParty = _PayerParty.Customer
// association [0..1] to I_Employee as _SalesEmployee on $projection.SalesEmployee = _SalesEmployee.PersonnelNumber
// association [0..1] to I_Employee as _ResponsibleEmployee on $projection.ResponsibleEmployee = _ResponsibleEmployee.PersonnelNumber
association [0..1] to I_PersonWorkAgreement_1 as _SalesEmployee on $projection.SalesEmployee = _SalesEmployee.PersonWorkAgreement
association [0..1] to I_PersonWorkAgreement_1 as _ResponsibleEmployee on $projection.ResponsibleEmployee = _ResponsibleEmployee.PersonWorkAgreement
{
key AllSDDocs.SDDocument,
@ObjectModel.foreignKey.association: '_SoldToParty'
cast(SoldToParty.Customer as kunag preserving type) as SoldToParty,
@ObjectModel.foreignKey.association: '_ShipToParty'
cast(ShipToParty.Customer as kunwe preserving type) as ShipToParty,
@ObjectModel.foreignKey.association: '_BillToParty'
cast(BillToParty.Customer as kunre preserving type) as BillToParty,
@ObjectModel.foreignKey.association: '_PayerParty'
cast(PayerParty.Customer as kunrg preserving type) as PayerParty,
@ObjectModel.foreignKey.association: '_SalesEmployee'
cast(SalesEmployee.Personnel as sales_empl preserving type) as SalesEmployee,
@ObjectModel.foreignKey.association: '_ResponsibleEmployee'
cast(ResponsibleEmployee.Personnel as resp_empl preserving type) as ResponsibleEmployee,
//Sales Employee ID & Responsible Employee ID
cast(SalesEmployee.Personnel as sales_empl preserving type) as SalesEmployeeWorkAgreement,
cast(ResponsibleEmployee.Personnel as resp_empl preserving type) as ResponsibleEmployeeWorkAgrmt,
_SoldToParty,
_BillToParty,
_ShipToParty,
_PayerParty,
_SalesEmployee,
_ResponsibleEmployee
};
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SDDOCUMENTPARTNER",
"P_SDDOCSTANDARDPARTNER1"
],
"ASSOCIATED":
[
"I_CUSTOMER",
"I_PERSONWORKAGREEMENT_1"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/