A_SalesInquiryPartner

DDL: A_SALESINQUIRYPARTNER Type: view COMPOSITE Package: ODATA_SD_INQUIRY

Header Partner

A_SalesInquiryPartner is a Composite CDS View that provides data about "Header Partner" in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentPartner, I_SalesDocumentBasic) and exposes 12 fields with key fields SalesInquiry, PartnerFunction. It has 2 associations to related views. Part of development package ODATA_SD_INQUIRY.

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentPartner Partner from
I_SalesDocumentBasic SalesInquiry inner

Associations (2)

CardinalityTargetAliasCondition
[1..1] A_SalesInquiry _SalesInquiry _SalesInquiry.SalesInquiry = $projection.SalesInquiry
[0..1] I_BusPartAddress _BusinessPartnerAddressCP Partner.AddressID = _BusinessPartnerAddressCP.AddressID and $projection.ContactPerson is not initial and Partner.SDDocPartnerAddressRefType = 'I'

Annotations (11)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Header Partner view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
AbapCatalog.sqlViewName ASIPARTNER view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY SalesInquiry SDDocument
KEY PartnerFunction PartnerFunction
Customer Customer
Supplier Supplier
Personnel Personnel
ContactPerson ContactPerson
BPRefAddrForDocSpcfcAddrUUID
SalesInquiryType I_SalesDocumentBasic SalesDocumentType
OrganizationDivision I_SalesDocumentBasic OrganizationDivision
SalesOrganization I_SalesDocumentBasic SalesOrganization
DistributionChannel I_SalesDocumentBasic DistributionChannel
_SalesInquiry _SalesInquiry
@ClientHandling.algorithm:#SESSION_VARIABLE
@EndUserText.label: 'Header Partner'
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_REMOTE_API
}
@AbapCatalog: {
  sqlViewName: 'ASIPARTNER',
  compiler.compareFilter: true
}
@AccessControl: { 
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #C,
     sizeCategory:   #XL
   }
}
@Metadata.ignorePropagatedAnnotations: true

define view A_SalesInquiryPartner
  as select from I_SDDocumentPartner as Partner
    inner join I_SalesDocumentBasic as SalesInquiry on SalesInquiry.SalesDocument = Partner.SDDocument // needed for DCL

                                                  and SalesInquiry.SDDocumentCategory     = 'A'
    
   association [1..1] to A_SalesInquiry              as _SalesInquiry     on  _SalesInquiry.SalesInquiry = $projection.SalesInquiry
   association [0..1] to I_BusPartAddress as _BusinessPartnerAddressCP on Partner.AddressID                  = _BusinessPartnerAddressCP.AddressID
                                                                      and $projection.ContactPerson is not initial
                                                                      and Partner.SDDocPartnerAddressRefType =  'I'
                                                   
{
      @ObjectModel.readOnly: true
  key SDDocument as SalesInquiry,
      @ObjectModel.sapObjectNodeTypeReference: 'PartnerFunction'
  key PartnerFunction,

      Customer,
      
      Supplier,

      Personnel,

      ContactPerson,
      
      @Feature: 'SW:Q2C_MULTIPLE_BP_ADDRESSES3, SW:Q2C_MULTIPLE_BP_ADDRESSES2'
      case ContactPerson
        when '0000000000' then
         _BusinessPartnerAddress.AddressUUID
       else
         _BusinessPartnerAddressCP.AddressUUID
                                                    end as BusinessPartnerAddressUUID,
      @Feature: 'SW:Q2C_MULTIPLE_BP_ADDRESSES3, SW:Q2C_MULTIPLE_BP_ADDRESSES2'
      @ObjectModel.readOnly: true  
      Partner._BPRefAddressForDocSpcfcAddr.AddressUUID  as BPRefAddrForDocSpcfcAddrUUID,
        
      // For Access control

      @Consumption.hidden: true
      SalesInquiry.SalesDocumentType as SalesInquiryType,
      @Consumption.hidden: true
      SalesInquiry.OrganizationDivision,
      @Consumption.hidden: true
      SalesInquiry.SalesOrganization,
      @Consumption.hidden: true
      SalesInquiry.DistributionChannel,
      
      //Expose associations

      _SalesInquiry 
}