R_SlsQuotationPricingElementTP

DDL: R_SLSQUOTATIONPRICINGELEMENTTP Type: view_entity TRANSACTIONAL

Pricing Element for Sales Quotation - TP

R_SlsQuotationPricingElementTP is a Transactional CDS View that provides data about "Pricing Element for Sales Quotation - TP" in SAP S/4HANA. It reads from 1 data source (I_SalesQuotationPrcgElmnt) and exposes 37 fields with key fields SalesQuotation, PricingProcedureStep, PricingProcedureCounter.

Data Sources (1)

SourceAliasJoin Type
I_SalesQuotationPrcgElmnt SalesQuotationPricingElement from

Annotations (8)

NameValueLevelField
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.viewType #TRANSACTIONAL view
AccessControl.authorizationCheck #CHECK view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Pricing Element for Sales Quotation - TP view

Fields (37)

KeyFieldSource TableSource FieldDescription
KEY SalesQuotation I_SalesQuotationPrcgElmnt SalesQuotation
KEY PricingProcedureStep I_SalesQuotationPrcgElmnt PricingProcedureStep
KEY PricingProcedureCounter I_SalesQuotationPrcgElmnt PricingProcedureCounter
ConditionApplication I_SalesQuotationPrcgElmnt ConditionApplication
ConditionType I_SalesQuotationPrcgElmnt ConditionType
ConditionTypeName
ConditionCalculationType I_SalesQuotationPrcgElmnt ConditionCalculationType
PriceConditionDeterminationDte I_SalesQuotationPrcgElmnt PriceConditionDeterminationDte
ConditionRateAmount I_SalesQuotationPrcgElmnt ConditionRateAmount
ConditionRateRatio I_SalesQuotationPrcgElmnt ConditionRateRatio
ConditionBaseAmount I_SalesQuotationPrcgElmnt ConditionBaseAmount
ConditionBaseQuantity I_SalesQuotationPrcgElmnt ConditionBaseQuantity
ConditionQuantity I_SalesQuotationPrcgElmnt ConditionQuantity
ConditionAmount I_SalesQuotationPrcgElmnt ConditionAmount
ConditionCurrency I_SalesQuotationPrcgElmnt ConditionCurrency
TransactionCurrency I_SalesQuotationPrcgElmnt TransactionCurrency
ConditionQuantityUnit I_SalesQuotationPrcgElmnt ConditionQuantityUnit
ConditionRateRatioUnit I_SalesQuotationPrcgElmnt ConditionRateRatioUnit
ConditionIsForStatistics I_SalesQuotationPrcgElmnt ConditionIsForStatistics
ConditionIsManuallyChanged I_SalesQuotationPrcgElmnt ConditionIsManuallyChanged
ConditionInactiveReason I_SalesQuotationPrcgElmnt ConditionInactiveReason
ConditionClass I_SalesQuotationPrcgElmnt ConditionClass
ConditionOrigin I_SalesQuotationPrcgElmnt ConditionOrigin
SalesQuotationType _SalesQuotation SalesQuotationType
SalesOrganization _SalesQuotation SalesOrganization
DistributionChannel _SalesQuotation DistributionChannel
OrganizationDivision _SalesQuotation OrganizationDivision
_SalesQuotation _SalesQuotation
_ConditionApplication I_SalesQuotationPrcgElmnt _ConditionApplication
_PricingConditionType I_SalesQuotationPrcgElmnt _PricingConditionType
_ConditionCalculationType I_SalesQuotationPrcgElmnt _ConditionCalculationType
_ConditionCurrency I_SalesQuotationPrcgElmnt _ConditionCurrency
_TransactionCurrency I_SalesQuotationPrcgElmnt _Currency
_ConditionQuantityUnit I_SalesQuotationPrcgElmnt _ConditionQuantityUnit
_ConditionInactiveReason I_SalesQuotationPrcgElmnt _ConditionInactiveReason
_ConditionClass I_SalesQuotationPrcgElmnt _ConditionClass
_ConditionOrigin I_SalesQuotationPrcgElmnt _ConditionOrigin
@VDM: {
  lifecycle.contract.type: #SAP_INTERNAL_API,
  viewType: #TRANSACTIONAL
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
  semanticKey: ['SalesQuotation', 'PricingProcedureStep', 'PricingProcedureCounter'],
  usageType: {
    dataClass: #TRANSACTIONAL,
    serviceQuality: #C,
    sizeCategory:   #XL
   }
}
@Metadata.ignorePropagatedAnnotations: true
@EndUserText.label: 'Pricing Element for Sales Quotation - TP'
define view entity R_SlsQuotationPricingElementTP
  as select from I_SalesQuotationPrcgElmnt as SalesQuotationPricingElement

  association to parent R_SalesQuotationTP as _SalesQuotation on $projection.SalesQuotation = _SalesQuotation.SalesQuotation

{
  key SalesQuotationPricingElement.SalesQuotation,

  key SalesQuotationPricingElement.PricingProcedureStep,

  key SalesQuotationPricingElement.PricingProcedureCounter,

      @ObjectModel.foreignKey.association: '_ConditionApplication'
      SalesQuotationPricingElement.ConditionApplication,

      @ObjectModel.foreignKey.association: '_PricingConditionType'
      SalesQuotationPricingElement.ConditionType,

      //    needed as condition type name is filled without any condition type key for subtotal lines

      SalesQuotationPricingElement._PricingConditionType._Text[1: Language=$session.system_language].ConditionTypeName as ConditionTypeName,

      SalesQuotationPricingElement.ConditionCalculationType,
      
      SalesQuotationPricingElement.PriceConditionDeterminationDte,

      @Semantics.amount.currencyCode: 'ConditionCurrency'
      @OData.v2.amount.noDecimalShift:true
      SalesQuotationPricingElement.ConditionRateAmount,

      @Semantics.quantity.unitOfMeasure: 'ConditionRateRatioUnit'
      SalesQuotationPricingElement.ConditionRateRatio,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      @OData.v2.amount.noDecimalShift:true
      SalesQuotationPricingElement.ConditionBaseAmount,

      @Semantics.quantity.unitOfMeasure: 'ConditionQuantityUnit'
      SalesQuotationPricingElement.ConditionBaseQuantity,

      @Semantics.quantity.unitOfMeasure: 'ConditionQuantityUnit'
      SalesQuotationPricingElement.ConditionQuantity,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      SalesQuotationPricingElement.ConditionAmount,

      @ObjectModel.foreignKey.association: '_ConditionCurrency'
      SalesQuotationPricingElement.ConditionCurrency,

      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      SalesQuotationPricingElement.TransactionCurrency,

      @ObjectModel.foreignKey.association: '_ConditionQuantityUnit'
      SalesQuotationPricingElement.ConditionQuantityUnit,

      SalesQuotationPricingElement.ConditionRateRatioUnit,

      SalesQuotationPricingElement.ConditionIsForStatistics,

      SalesQuotationPricingElement.ConditionIsManuallyChanged,

      @ObjectModel.foreignKey.association: '_ConditionInactiveReason'
      SalesQuotationPricingElement.ConditionInactiveReason,

      @ObjectModel.foreignKey.association: '_ConditionClass'
      SalesQuotationPricingElement.ConditionClass,  
      
      @ObjectModel.foreignKey.association: '_ConditionOrigin'
      SalesQuotationPricingElement.ConditionOrigin,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionCalculationType = 'A'
            or ConditionCalculationType = 'B'
            or ConditionCalculationType = 'H'
            or ConditionCalculationType = 'I'
            or ConditionCalculationType = 'J'
            or ConditionCalculationType = 'K'
            or ConditionCalculationType = 'W'
          then 'X'
        else ''
      end as boole_d )                                                                                                 as ConditionBaseValueIsAmount,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionCalculationType = 'A'
            or ConditionCalculationType = 'B'
            or ConditionCalculationType = 'H'
            or ConditionCalculationType = 'I'
            or ConditionCalculationType = 'J'
            or ConditionCalculationType = 'K'
            or ConditionCalculationType = 'W'
          then ''
        else 'X'
      end as boole_d )                                                                                                 as ConditionBaseValueIsQuantity,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionRateRatioUnit = ''
          then 'X'
        else ''
      end as boole_d )                                                                                                 as ConditionRateValueIsAmount,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionRateRatioUnit = ''
          then ''
        else 'X'
      end as boole_d )                                                                                                 as ConditionRateValueIsRatio,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionRateAmount is initial
           and ConditionRateRatio  is initial
           then 'X'
          else ''
       end as boole_d )                                                                                                as ConditionRateValueIsNull,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionQuantity is initial
           then 'X'
          else ''
       end as boole_d )                                                                                                as ConditionQuantityIsNull,

      @Semantics.booleanIndicator: true
      cast(
        case
          when ConditionAmount is initial
           then 'X'
          else ''
       end as boole_d )                                                                                                as ConditionAmountIsNull,

      //for DCL

      @Consumption.hidden: true
      _SalesQuotation.SalesQuotationType,
      @Consumption.hidden: true
      _SalesQuotation.SalesOrganization,
      @Consumption.hidden: true
      _SalesQuotation.DistributionChannel,
      @Consumption.hidden: true
      _SalesQuotation.OrganizationDivision,

      //Associations

      _SalesQuotation,
      SalesQuotationPricingElement._ConditionApplication,
      SalesQuotationPricingElement._PricingConditionType,
      SalesQuotationPricingElement._ConditionCalculationType,
      SalesQuotationPricingElement._ConditionCurrency,
      SalesQuotationPricingElement._Currency                                                                           as _TransactionCurrency,
      SalesQuotationPricingElement._ConditionQuantityUnit,
      SalesQuotationPricingElement._ConditionInactiveReason,
      SalesQuotationPricingElement._ConditionClass,
      SalesQuotationPricingElement._ConditionOrigin
}