R_SLSQUOTATIONPRICINGELEMENTTP

CDS View

Pricing Element for Sales Quotation - TP

R_SLSQUOTATIONPRICINGELEMENTTP is a CDS View in S/4HANA. Pricing Element for Sales Quotation - TP. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
C_SlsQtanPrcgElementManageTP view_entity projection CONSUMPTION Sales Quotation Pricing Element
I_SlsQuotationPricingElementTP view_entity projection TRANSACTIONAL Sales Quotation Pricing Element - TP
@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
}