R_DebitMemoRequestTP

DDL: R_DEBITMEMOREQUESTTP Type: view_entity TRANSACTIONAL

Debit Memo Request - TP

R_DebitMemoRequestTP is a Transactional CDS View that provides data about "Debit Memo Request - TP" in SAP S/4HANA. It reads from 1 data source (I_DebitMemoRequest) and exposes 80 fields with key field DebitMemoRequest. It has 6 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_DebitMemoRequest DebitMemoRequest from

Associations (6)

CardinalityTargetAliasCondition
[0..1] I_SlsOrganizationDistrChnl _SlsOrganizationDistrChnl $projection.SalesOrganization = _SlsOrganizationDistrChnl.SalesOrganization and $projection.DistributionChannel = _SlsOrganizationDistrChnl.DistributionChannel
[0..1] I_DebitMemoReqPartner _SoldToParty $projection.DebitMemoRequest = _SoldToParty.DebitMemoRequest and _SoldToParty.PartnerFunction = 'AG'
[0..*] R_DebitMemoRequestItemTP _Item
[0..*] R_DebitMemoRequestPartnerTP _Partner
[0..*] R_DebitMemoRequestPrcgElmntTP _PricingElement
[0..*] R_DebitMemoRequestTextTP _Text

Annotations (9)

NameValueLevelField
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.viewType #TRANSACTIONAL view
AccessControl.authorizationCheck #CHECK view
ObjectModel.sapObjectNodeType.name DebitMemoRequest view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Debit Memo Request - TP view

Fields (80)

KeyFieldSource TableSource FieldDescription
KEY DebitMemoRequest I_DebitMemoRequest DebitMemoRequest
DebitMemoRequestType DebitMemoRequestType
DebitMemoRequestDate DebitMemoRequestDate
ControllingArea ControllingArea
SoldToParty SoldToParty
CustomerName
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
ReferenceDistributionChannel _SlsOrganizationDistrChnl ReferenceDistributionChannel
SalesOffice SalesOffice
SalesGroup SalesGroup
SalesDistrict SalesDistrict
PurchaseOrderByCustomer PurchaseOrderByCustomer
CustomerPurchaseOrderType CustomerPurchaseOrderType
CustomerPurchaseOrderDate CustomerPurchaseOrderDate
CustomerGroup CustomerGroup
SDDocumentReason SDDocumentReason
PricingDate PricingDate
TotalNetAmount TotalNetAmount
TransactionCurrency TransactionCurrency
HeaderBillingBlockReason HeaderBillingBlockReason
SDPricingProcedure SDPricingProcedure
IncotermsClassification I_DebitMemoRequest IncotermsClassification
IncotermsVersion IncotermsVersion
IncotermsLocation1 IncotermsLocation1
IncotermsLocation2 IncotermsLocation2
CustomerPaymentTerms CustomerPaymentTerms
BillingCompanyCode BillingCompanyCode
PaymentMethod PaymentMethod
BillingDocumentDate BillingDocumentDate
ServicesRenderedDate ServicesRenderedDate
ReferenceSDDocument ReferenceSDDocument
ReferenceSDDocumentCategory ReferenceSDDocumentCategory
CreatedByUser CreatedByUser
CreationDate CreationDate
CreationTime CreationTime
LastChangedByUser LastChangedByUser
DebitMemoReqApprovalReason DebitMemoReqApprovalReason
SalesDocApprovalStatus SalesDocApprovalStatus
OverallBillingBlockStatus OverallBillingBlockStatus
OverallSDProcessStatus OverallSDProcessStatus
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus
TotalBlockStatus TotalBlockStatus
HdrGeneralIncompletionStatus HdrGeneralIncompletionStatus
OvrlItmGeneralIncompletionSts OvrlItmGeneralIncompletionSts
OverallSDDocReferenceStatus OverallSDDocReferenceStatus
_Item _Item
_Partner _Partner
_PricingElement _PricingElement
_Text _Text
_DebitMemoRequestType _DebitMemoRequestType
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_OrganizationDivision _OrganizationDivision
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_SalesDistrict _SalesDistrict
_CustomerPurchaseOrderType _CustomerPurchaseOrderType
_CustomerGroup _CustomerGroup
_SDDocumentReason _SDDocumentReason
_TransactionCurrency _TransactionCurrency
_IncotermsClassification _IncotermsClassification
_IncotermsVersion _IncotermsVersion
_CustomerPaymentTerms _CustomerPaymentTerms
_BillingCompanyCode _BillingCompanyCode
_HeaderBillingBlockReason _HeaderBillingBlockReason
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory
_DebitMemoReqApprovalReason _DebitMemoReqApprovalReason
_OverallSDProcessStatus _OverallSDProcessStatus
_OverallBillingBlockStatus _OverallBillingBlockStatus
_SalesDocApprovalStatus _SalesDocApprovalStatus
_OverallSDDocumentRejectionSts _OverallSDDocumentRejectionSts
_OverallOrdReltdBillgStatus _OverallOrdReltdBillgStatus
_TotalBlockStatus _TotalBlockStatus
_OverallSDDocReferenceStatus _OverallSDDocReferenceStatus
_HdrGeneralIncompletionStatus _HdrGeneralIncompletionStatus
_OvrlItmGeneralIncompletionSts _OvrlItmGeneralIncompletionSts
_ControllingArea _ControllingArea
@VDM: {
  lifecycle.contract.type: #SAP_INTERNAL_API,
  viewType: #TRANSACTIONAL
}

@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}

@ObjectModel: {
   sapObjectNodeType:{
        name: 'DebitMemoRequest'
   },
    usageType: {
        dataClass: #TRANSACTIONAL,
        serviceQuality: #C,
        sizeCategory: #L
    }
}

@ObjectModel.semanticKey: ['DebitMemoRequest']

@Metadata.ignorePropagatedAnnotations: true

@EndUserText.label: 'Debit Memo Request - TP'

define root view entity R_DebitMemoRequestTP
  as select from I_DebitMemoRequest as DebitMemoRequest
  
  composition [0..*] of R_DebitMemoRequestItemTP       as _Item
  composition [0..*] of R_DebitMemoRequestPartnerTP    as _Partner
  composition [0..*] of R_DebitMemoRequestPrcgElmntTP  as _PricingElement
  composition [0..*] of R_DebitMemoRequestTextTP       as _Text
  association [0..1] to I_SlsOrganizationDistrChnl     as _SlsOrganizationDistrChnl on  $projection.SalesOrganization   = _SlsOrganizationDistrChnl.SalesOrganization
                                                                                    and $projection.DistributionChannel = _SlsOrganizationDistrChnl.DistributionChannel
  association [0..1] to I_DebitMemoReqPartner          as _SoldToParty              on  $projection.DebitMemoRequest = _SoldToParty.DebitMemoRequest
                                                                                    and _SoldToParty.PartnerFunction  = 'AG'
{
  key DebitMemoRequest.DebitMemoRequest,

      @ObjectModel.foreignKey.association: '_DebitMemoRequestType'
      DebitMemoRequestType,

      DebitMemoRequestDate,

      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,

      @ObjectModel.text.element: ['CustomerName']
      SoldToParty,
      @Semantics.text:true
      _SoldToParty._DfltAddrRprstn.AddresseeFullName                               as CustomerName,

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_OrganizationDivision'
      OrganizationDivision,

      _SlsOrganizationDistrChnl.ReferenceDistributionChannel,

      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,

      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,

      @ObjectModel.foreignKey.association: '_SalesDistrict'
      SalesDistrict,

      PurchaseOrderByCustomer,

      @ObjectModel.foreignKey.association: '_CustomerPurchaseOrderType'
      CustomerPurchaseOrderType,

      CustomerPurchaseOrderDate,

      @ObjectModel.foreignKey.association: '_CustomerGroup'
      CustomerGroup,

      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      SDDocumentReason,

      PricingDate,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      TotalNetAmount,

      TransactionCurrency,

      @ObjectModel.foreignKey.association: '_HeaderBillingBlockReason'
      HeaderBillingBlockReason,
      
      SDPricingProcedure,

      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      DebitMemoRequest.IncotermsClassification,

      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      IncotermsVersion,

      IncotermsLocation1,

      IncotermsLocation2,

      @ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
      CustomerPaymentTerms,

      @ObjectModel.foreignKey.association: '_BillingCompanyCode'
      BillingCompanyCode,

      PaymentMethod,

      BillingDocumentDate,

      ServicesRenderedDate,

      ReferenceSDDocument,

      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      ReferenceSDDocumentCategory,

      CreatedByUser,

      @Consumption.hidden: true
      CreationDate,

      @Consumption.hidden: true
      CreationTime,

      cast( dats_tims_to_tstmp( CreationDate, CreationTime, abap_system_timezone( $session.client, 'NULL' ),
        $session.client, 'NULL' ) as creation_date_time ) as SalesDocumentCreationDateTime,

      LastChangedByUser,

      case TSTMP_IS_VALID(cast(LastChangeDateTime as abap.dec(15,0)))
        when 0 then cast( dats_tims_to_tstmp( CreationDate, CreationTime, 'UTC', $session.client, 'NULL' ) as timestampl )
        else LastChangeDateTime
      end                                                 as LastChangeDateTime,

      @ObjectModel.foreignKey.association: '_DebitMemoReqApprovalReason'
      DebitMemoReqApprovalReason,

      @ObjectModel.foreignKey.association: '_SalesDocApprovalStatus'
      SalesDocApprovalStatus,

      @ObjectModel.foreignKey.association: '_OverallBillingBlockStatus'
      OverallBillingBlockStatus,

      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      OverallSDProcessStatus,

      @ObjectModel.foreignKey.association: '_OverallSDDocumentRejectionSts'
      OverallSDDocumentRejectionSts,

      @ObjectModel.foreignKey.association: '_OverallOrdReltdBillgStatus'
      OverallOrdReltdBillgStatus,

      @ObjectModel.foreignKey.association: '_TotalBlockStatus'
      TotalBlockStatus,

      @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus'
      HdrGeneralIncompletionStatus,

      @ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'
      OvrlItmGeneralIncompletionSts,

      @ObjectModel.foreignKey.association: '_OverallSDDocReferenceStatus'
      OverallSDDocReferenceStatus,

      //Compositions

      _Item,
      _Partner,
      _PricingElement,
      _Text,

      //Exposed Associations

      _DebitMemoRequestType,
      _SalesOrganization,
      _DistributionChannel,
      _OrganizationDivision,
      _SalesOffice,
      _SalesGroup,
      _SalesDistrict,
      _CustomerPurchaseOrderType,
      _CustomerGroup,
      _SDDocumentReason,
      _TransactionCurrency,
      _IncotermsClassification,
      _IncotermsVersion,
      _CustomerPaymentTerms,
      _BillingCompanyCode,
      _HeaderBillingBlockReason,
      _ReferenceSDDocumentCategory,
      _DebitMemoReqApprovalReason,
      _OverallSDProcessStatus,
      _OverallBillingBlockStatus,
      _SalesDocApprovalStatus,
      _OverallSDDocumentRejectionSts,
      _OverallOrdReltdBillgStatus,
      _TotalBlockStatus,
      _OverallSDDocReferenceStatus,
      _HdrGeneralIncompletionStatus,
      _OvrlItmGeneralIncompletionSts,
      _ControllingArea
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS_2",
"I_DEBITMEMOREQPARTNER",
"I_DEBITMEMOREQUEST",
"I_SLSORGANIZATIONDISTRCHNL"
],
"ASSOCIATED":
[
"I_BILLINGBLOCKREASON",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_CURRENCY",
"I_CUSTOMERGROUP",
"I_CUSTOMERPAYMENTTERMS",
"I_CUSTOMERPURCHASEORDERTYPE",
"I_DEBITMEMOREQAPPROVALREASON",
"I_DEBITMEMOREQUESTTYPE",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_HDRGENINCOMPLETIONSTATUS",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_OVERALLBILLINGBLOCKSTATUS",
"I_OVERALLORDRELTDBILLGSTATUS",
"I_OVERALLSDDOCREFERENCESTATUS",
"I_OVERALLSDDOCUMENTRJCNSTATUS",
"I_OVERALLSDPROCESSSTATUS",
"I_OVRLITMGENINCOMPLETIONSTS",
"I_SALESDISTRICT",
"I_SALESDOCAPPROVALSTATUS",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SDDOCUMENTCATEGORY",
"I_SDDOCUMENTREASON",
"I_TOTALBLOCKSTATUS",
"R_DEBITMEMOREQUESTITEMTP",
"R_DEBITMEMOREQUESTPARTNERTP",
"R_DEBITMEMOREQUESTPRCGELMNTTP",
"R_DEBITMEMOREQUESTTEXTTP"
],
"BASE":
[
"I_DEBITMEMOREQUEST"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/