A_SalesContractPartner

DDL: A_SALESCONTRACTPARTNER Type: view COMPOSITE

Header Partner

A_SalesContractPartner 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 SalesContract, PartnerFunction. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentPartner Partner from
I_SalesDocumentBasic SalesContract inner

Associations (2)

CardinalityTargetAliasCondition
[1..1] A_SalesContract _SalesContract _SalesContract.SalesContract = $projection.SalesContract
[0..1] I_BusPartAddress _BusinessPartnerAddressCP Partner.AddressID = _BusinessPartnerAddressCP.AddressID and $projection.ContactPerson is not initial and Partner.SDDocPartnerAddressRefType = 'I'

Annotations (14)

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 ASCPARTNER view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled true 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 SalesContract
KEY PartnerFunction PartnerFunction
Customer Customer
Supplier Supplier
Personnel Personnel
ContactPerson ContactPerson
BPRefAddrForDocSpcfcAddrUUID _BPRefAddressForDocSpcfcAddr AddressUUID
SalesContractType
OrganizationDivision I_SalesDocumentBasic OrganizationDivision
SalesOrganization I_SalesDocumentBasic SalesOrganization
DistributionChannel I_SalesDocumentBasic DistributionChannel
_SalesContract _SalesContract
@ClientHandling.algorithm:#SESSION_VARIABLE
@EndUserText.label: 'Header Partner'
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_REMOTE_API
}
@AbapCatalog: {
  sqlViewName: 'ASCPARTNER',
  compiler.compareFilter: true
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
   createEnabled: true,
   updateEnabled: true,
   deleteEnabled: true,
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #C,
     sizeCategory:   #XL
   }
}
@Metadata.ignorePropagatedAnnotations: true

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

                                                       and SalesContract.SDDocumentCategory = 'G'

  association [1..1] to A_SalesContract  as _SalesContract            on  _SalesContract.SalesContract = $projection.SalesContract

  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 cast(SalesDocument as sales_contract preserving type)                           as SalesContract,
      @ObjectModel.sapObjectNodeTypeReference: 'PartnerFunction'
  key PartnerFunction,

      Customer,

      Supplier,

      Personnel,

      ContactPerson,

      @Feature: 'SW:Q2C_MULTIPLE_BP_ADDRESSES, SW:Q2C_MULTIPLE_BP_ADDRESSES2'
      case ContactPerson
              when '0000000000' then
               _BusinessPartnerAddress.AddressUUID
             else
               _BusinessPartnerAddressCP.AddressUUID
                                                          end                         as BusinessPartnerAddressUUID,
      @Feature: 'SW:Q2C_MULTIPLE_BP_ADDRESSES, SW:Q2C_MULTIPLE_BP_ADDRESSES2'
      @ObjectModel.readOnly: true
      _BPRefAddressForDocSpcfcAddr.AddressUUID                                        as BPRefAddrForDocSpcfcAddrUUID,

      // For Access control

      @Consumption.hidden: true
      @ObjectModel.sapObjectNodeTypeReference: 'SalesContractType'
      cast ( SalesContract.SalesDocumentType as sales_contract_type preserving type ) as SalesContractType,
      @Consumption.hidden: true
      SalesContract.OrganizationDivision,
      @Consumption.hidden: true
      SalesContract.SalesOrganization,
      @Consumption.hidden: true
      SalesContract.DistributionChannel,

      //Expose associations

      _SalesContract
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSPARTADDRESS",
"I_SALESDOCUMENTBASIC",
"I_SDDOCUMENTPARTNER"
],
"ASSOCIATED":
[
"A_SALESCONTRACT",
"I_BUSPARTADDRESS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/