A_BillingDocReqPartner

DDL: A_BILLINGDOCREQPARTNER Type: view COMPOSITE

Header Partner

A_BillingDocReqPartner is a Composite CDS View that provides data about "Header Partner" in SAP S/4HANA. It reads from 1 data source (I_BillingDocReqPartner) and exposes 10 fields with key fields BillingDocumentRequest, PartnerFunction. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_BillingDocReqPartner I_BillingDocReqPartner from

Associations (2)

CardinalityTargetAliasCondition
[1..1] A_BillingDocumentRequest _BillingDocumentRequest $projection.BillingDocumentRequest = _BillingDocumentRequest.BillingDocumentRequest
[0..1] I_BusPartAddress _BusinessPartnerAddressCP I_BillingDocReqPartner.AddressID = _BusinessPartnerAddressCP.AddressID and $projection.ContactPerson is not initial and I_BillingDocReqPartner.SDDocPartnerAddressRefType = 'I'

Annotations (15)

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 ASDBDREQPARTN view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.createEnabled false view
ObjectModel.updateEnabled false view
ObjectModel.deleteEnabled false view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY BillingDocumentRequest BillingDocumentRequest
KEY PartnerFunction
Customer Customer
Supplier Supplier
Personnel Personnel
ContactPerson ContactPerson
BPRefAddrForDocSpcfcAddrUUID _BPRefAddressForDocSpcfcAddr AddressUUID
BillingDocumentRequestType _BillingDocumentRequest BillingDocumentRequestType
SalesOrganization _BillingDocumentRequest SalesOrganization
_BillingDocumentRequest _BillingDocumentRequest
@ClientHandling.algorithm:#SESSION_VARIABLE
@EndUserText.label: 'Header Partner'  
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_REMOTE_API
}
@AbapCatalog: {
  sqlViewName: 'ASDBDREQPARTN',
  compiler.compareFilter: true,
  preserveKey: true
}
@AccessControl: { 
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
  createEnabled: false,
  updateEnabled: false,
  deleteEnabled: false,
  usageType: {
    dataClass: #TRANSACTIONAL,
    serviceQuality: #C,
    sizeCategory: #XL
  }
} 
@Metadata: {
  ignorePropagatedAnnotations: true
}

//HEADER PARTNER

define view A_BillingDocReqPartner as select from I_BillingDocReqPartner
    
   association [1..1] to A_BillingDocumentRequest       as _BillingDocumentRequest  
                                                 on  $projection.BillingDocumentRequest = _BillingDocumentRequest.BillingDocumentRequest 
   association [0..1] to I_BusPartAddress         as _BusinessPartnerAddressCP      on I_BillingDocReqPartner.AddressID                  = _BusinessPartnerAddressCP.AddressID
                                                                                    and $projection.ContactPerson is not initial
                                                                                    and I_BillingDocReqPartner.SDDocPartnerAddressRefType =  'I'

{

  key BillingDocumentRequest,
  
  // To stay compatible: Cast to the original data element which uses a conversion routine (in principle this is bug!) 

      @ObjectModel.sapObjectNodeTypeReference: 'PartnerFunction'        
  key cast(PartnerFunction as parvw preserving type ) as 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
      _BillingDocumentRequest.BillingDocumentRequestType,
      @Consumption.hidden: true
      _BillingDocumentRequest.SalesOrganization,
      
      //Expose associations

      _BillingDocumentRequest
      
   

}
//where I_BillingDocumentPartner._BillingDocument.BillingDocumentIsTemporary = ' ' 

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"A_BILLINGDOCUMENTREQUEST",
"I_BILLINGDOCREQPARTNER",
"I_BUSPARTADDRESS"
],
"ASSOCIATED":
[
"A_BILLINGDOCUMENTREQUEST",
"I_BUSPARTADDRESS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/