R_SalesQuotationTP

DDL: R_SALESQUOTATIONTP Type: view_entity TRANSACTIONAL

Sales Quotation - TP

R_SalesQuotationTP is a Transactional CDS View that provides data about "Sales Quotation - TP" in SAP S/4HANA. It reads from 1 data source (I_SalesQuotation) and exposes 96 fields with key field SalesQuotation. It has 9 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_SalesQuotation SalesQuotation from

Associations (9)

CardinalityTargetAliasCondition
[0..1] R_OutputRequestTP _OutputRequest $projection.OutputRequestUUID = _OutputRequest.OutputRequestUUID
[0..1] I_SalesQuotationPartner _SoldToParty $projection.SalesQuotation = _SoldToParty.SalesQuotation and _SoldToParty.PartnerFunction = 'AG'
[0..1] I_SlsOrganizationDistrChnl _SlsOrganizationDistrChnl $projection.SalesOrganization = _SlsOrganizationDistrChnl.SalesOrganization and $projection.DistributionChannel = _SlsOrganizationDistrChnl.DistributionChannel
[1] E_SalesDocumentBasic _Extension $projection.SalesQuotation = _Extension.SalesDocument
[0..*] R_SalesQuotationItemTP _Item
[0..*] R_SalesQuotationPartnerTP _Partner
[0..*] R_SalesQuotationTextTP _Text
[0..*] R_SlsQuotationPricingElementTP _PricingElement
[0..1] R_SalesQuotationShipToPartyTP _ShipToParty

Annotations (9)

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

Fields (96)

KeyFieldSource TableSource FieldDescription
KEY SalesQuotation I_SalesQuotation SalesQuotation
SalesQuotationType I_SalesQuotation SalesQuotationType
CustomerName _SoldToParty FullName
SoldToPartyAddressID _SoldToParty AddressID
SalesOrganization I_SalesQuotation SalesOrganization
DistributionChannel I_SalesQuotation DistributionChannel
ReferenceDistributionChannel _SlsOrganizationDistrChnl ReferenceDistributionChannel
OrganizationDivision I_SalesQuotation OrganizationDivision
SalesOffice I_SalesQuotation SalesOffice
SalesGroup I_SalesQuotation SalesGroup
SoldToParty I_SalesQuotation SoldToParty
SalesDistrict I_SalesQuotation SalesDistrict
PurchaseOrderByCustomer I_SalesQuotation PurchaseOrderByCustomer
SalesQuotationDate I_SalesQuotation SalesQuotationDate
CustomerPurchaseOrderDate I_SalesQuotation CustomerPurchaseOrderDate
CustomerGroup I_SalesQuotation CustomerGroup
BindingPeriodValidityStartDate I_SalesQuotation BindingPeriodValidityStartDate
BindingPeriodValidityEndDate I_SalesQuotation BindingPeriodValidityEndDate
HdrOrderProbabilityInPercent I_SalesQuotation HdrOrderProbabilityInPercent
TotalNetAmount I_SalesQuotation TotalNetAmount
TransactionCurrency I_SalesQuotation TransactionCurrency
PricingDate I_SalesQuotation PricingDate
CustomerPriceGroup I_SalesQuotation CustomerPriceGroup
SDPricingProcedure I_SalesQuotation SDPricingProcedure
CreationDate I_SalesQuotation CreationDate
CreatedByUser I_SalesQuotation CreatedByUser
LastChangedByUser I_SalesQuotation LastChangedByUser
CreationTime I_SalesQuotation CreationTime
RequestedDeliveryDate I_SalesQuotation RequestedDeliveryDate
IncotermsVersion I_SalesQuotation IncotermsVersion
IncotermsClassification I_SalesQuotation IncotermsClassification
IncotermsLocation1 I_SalesQuotation IncotermsLocation1
IncotermsLocation2 I_SalesQuotation IncotermsLocation2
ShippingCondition I_SalesQuotation ShippingCondition
ShippingType I_SalesQuotation ShippingType
BillingDocumentDate I_SalesQuotation BillingDocumentDate
ReferenceSDDocument I_SalesQuotation ReferenceSDDocument
ReferenceSDDocumentCategory I_SalesQuotation ReferenceSDDocumentCategory
CustomerCreditAccount I_SalesQuotation CustomerCreditAccount
SDDocumentReason I_SalesQuotation SDDocumentReason
SalesQuotationApprovalReason I_SalesQuotation SalesQuotationApprovalReason
SalesDocApprovalStatus I_SalesQuotation SalesDocApprovalStatus
OverallSDProcessStatus I_SalesQuotation OverallSDProcessStatus
HdrGeneralIncompletionStatus
OvrlItmGeneralIncompletionSts
OverallSDDocReferenceStatus I_SalesQuotation OverallSDDocReferenceStatus
OverallSDDocumentRejectionSts I_SalesQuotation OverallSDDocumentRejectionSts
TotalCreditCheckStatus I_SalesQuotation TotalCreditCheckStatus
OverallChmlCmplncStatus I_SalesQuotation OverallChmlCmplncStatus
OverallDangerousGoodsStatus I_SalesQuotation OverallDangerousGoodsStatus
OverallSafetyDataSheetStatus I_SalesQuotation OverallSafetyDataSheetStatus
OverallTrdCmplncEmbargoSts I_SalesQuotation OverallTrdCmplncEmbargoSts
PaymentMethod I_SalesQuotation PaymentMethod
CustomerPaymentTerms I_SalesQuotation CustomerPaymentTerms
BillingCompanyCode I_SalesQuotation BillingCompanyCode
LastChangeDate I_SalesQuotation LastChangeDate
OutputRequestUUID OutputRequest OutputRequestUUID
_Item _Item
_Partner _Partner
_Text _Text
_PricingElement _PricingElement
_ShipToParty _ShipToParty
_OutputRequest _OutputRequest
_SalesQuotationType I_SalesQuotation _SalesQuotationType
_SalesOrganization I_SalesQuotation _SalesOrganization
_DistributionChannel I_SalesQuotation _DistributionChannel
_OrganizationDivision I_SalesQuotation _OrganizationDivision
_SalesOffice I_SalesQuotation _SalesOffice
_SalesGroup I_SalesQuotation _SalesGroup
_SalesDistrict I_SalesQuotation _SalesDistrict
_ShippingCondition I_SalesQuotation _ShippingCondition
_ShippingType I_SalesQuotation _ShippingType
_IncotermsVersion I_SalesQuotation _IncotermsVersion
_IncotermsClassification I_SalesQuotation _IncotermsClassification
_SDDocumentReason I_SalesQuotation _SDDocumentReason
_ReferenceSDDocumentCategory I_SalesQuotation _ReferenceSDDocumentCategory
_TransactionCurrency I_SalesQuotation _TransactionCurrency
_CustomerPaymentTerms I_SalesQuotation _CustomerPaymentTerms
_CustomerGroup I_SalesQuotation _CustomerGroup
_CustomerPriceGroup I_SalesQuotation _CustomerPriceGroup
_SDPricingProcedure I_SalesQuotation _SDPricingProcedure
_LastChangedByUser I_SalesQuotation _LastChangedByUser
_CreatedByUser I_SalesQuotation _CreatedByUser
_CustomerCreditAccount I_SalesQuotation _CustomerCreditAccount
_SalesQuotationApprovalReason I_SalesQuotation _SalesQuotationApprovalReason
_SalesDocApprovalStatus I_SalesQuotation _SalesDocApprovalStatus
_OverallSDProcessStatus I_SalesQuotation _OverallSDProcessStatus
_HdrGeneralIncompletionStatus I_SalesQuotation _HdrGeneralIncompletionStatus
_OvrlItmGeneralIncompletionSts I_SalesQuotation _OvrlItmGeneralIncompletionSts
_OverallSDDocReferenceStatus I_SalesQuotation _OverallSDDocReferenceStatus
_OverallSDDocumentRejectionSts I_SalesQuotation _OverallSDDocumentRejectionSts
_TotalCreditCheckStatus I_SalesQuotation _TotalCreditCheckStatus
_OverallChmlCmplncStatus I_SalesQuotation _OverallChmlCmplncStatus
_OverallDangerousGoodsStatus I_SalesQuotation _OverallDangerousGoodsStatus
_OvrlSftyDataSheetSts I_SalesQuotation _OvrlSftyDataSheetSts
_OvrlTradeCmplncEmbargoStatus I_SalesQuotation _OvrlTradeCmplncEmbargoStatus
@VDM: {
  lifecycle.contract.type: #SAP_INTERNAL_API,
  viewType: #TRANSACTIONAL
}
@ObjectModel: {
    sapObjectNodeType:{
        name: 'SalesQuotation'
    },
    semanticKey: ['SalesQuotation'],
    usageType: {
        dataClass: #TRANSACTIONAL,
        serviceQuality: #C,
        sizeCategory: #L
    }
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA'),
  privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser', '_OutputRequest']
}

@Metadata.ignorePropagatedAnnotations: true

@EndUserText.label: 'Sales Quotation - TP'
define root view entity R_SalesQuotationTP
  as select from I_SalesQuotation as SalesQuotation
    left outer to one join I_OutputRequest as OutputRequest on  OutputRequest.OutputControlApplicationObject = SalesQuotation.SalesQuotation
                                                            and OutputRequest.OutputControlApplObjectType    = 'SALES_DOCUMENT'
  composition [0..*] of R_SalesQuotationItemTP         as _Item
  composition [0..*] of R_SalesQuotationPartnerTP      as _Partner
  composition [0..*] of R_SalesQuotationTextTP         as _Text
  composition [0..*] of R_SlsQuotationPricingElementTP as _PricingElement
  composition [0..1] of R_SalesQuotationShipToPartyTP  as _ShipToParty
  association [0..1] to R_OutputRequestTP              as _OutputRequest            on  $projection.OutputRequestUUID = _OutputRequest.OutputRequestUUID
  association [0..1] to I_SalesQuotationPartner        as _SoldToParty              on  $projection.SalesQuotation   = _SoldToParty.SalesQuotation
                                                                                    and _SoldToParty.PartnerFunction = 'AG'

  association [0..1] to I_SlsOrganizationDistrChnl     as _SlsOrganizationDistrChnl on  $projection.SalesOrganization   = _SlsOrganizationDistrChnl.SalesOrganization
                                                                                    and $projection.DistributionChannel = _SlsOrganizationDistrChnl.DistributionChannel
  //Extension Association

  association [1]    to E_SalesDocumentBasic           as _Extension                on  $projection.SalesQuotation = _Extension.SalesDocument

{
  key SalesQuotation.SalesQuotation,

      //Category

      @ObjectModel.foreignKey.association: '_SalesQuotationType'
      SalesQuotation.SalesQuotationType,

      @Semantics.text:true
      _SoldToParty.FullName                                                                 as CustomerName,

      _SoldToParty.AddressID as SoldToPartyAddressID,
      
      //Organization

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

      _SlsOrganizationDistrChnl.ReferenceDistributionChannel,

      @ObjectModel.foreignKey.association: '_OrganizationDivision'
      SalesQuotation.OrganizationDivision,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesQuotation.SalesOffice,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesQuotation.SalesGroup,

      //Sales

      @ObjectModel.text.element: ['CustomerName']
      SalesQuotation.SoldToParty,
      @ObjectModel.foreignKey.association: '_SalesDistrict'
      SalesQuotation.SalesDistrict,
      SalesQuotation.PurchaseOrderByCustomer,
      SalesQuotation.SalesQuotationDate,
      SalesQuotation.CustomerPurchaseOrderDate,
      @ObjectModel.foreignKey.association: '_CustomerGroup'
      SalesQuotation.CustomerGroup,

      //Quotation

      SalesQuotation.BindingPeriodValidityStartDate,
      SalesQuotation.BindingPeriodValidityEndDate,
      SalesQuotation.HdrOrderProbabilityInPercent,

      //Pricing

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      SalesQuotation.TotalNetAmount,
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      SalesQuotation.TransactionCurrency,
      SalesQuotation.PricingDate,
      @ObjectModel.foreignKey.association: '_CustomerPriceGroup'
      SalesQuotation.CustomerPriceGroup,
      @ObjectModel.foreignKey.association: '_SDPricingProcedure'
      SalesQuotation.SDPricingProcedure,

      //Admin

      @Consumption.hidden: true
      SalesQuotation.CreationDate,
      @ObjectModel.foreignKey.association: '_CreatedByUser'
      SalesQuotation.CreatedByUser,
      @ObjectModel.foreignKey.association: '_LastChangedByUser'
      SalesQuotation.LastChangedByUser,

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

      //      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,


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

      //Shipping

      SalesQuotation.RequestedDeliveryDate,
      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      SalesQuotation.IncotermsVersion,
      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      SalesQuotation.IncotermsClassification,
      SalesQuotation.IncotermsLocation1,
      SalesQuotation.IncotermsLocation2,
      @ObjectModel.foreignKey.association: '_ShippingCondition'
      SalesQuotation.ShippingCondition,
      @ObjectModel.foreignKey.association: '_ShippingType'
      SalesQuotation.ShippingType,

      //Billing

      SalesQuotation.BillingDocumentDate,

      //Reference

      SalesQuotation.ReferenceSDDocument,
      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      SalesQuotation.ReferenceSDDocumentCategory,
      
      //Exposed for KPI fields

      @ObjectModel.foreignKey.association: '_CustomerCreditAccount'
      SalesQuotation.CustomerCreditAccount,

      //Status

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

      @ObjectModel.foreignKey.association: '_SalesQuotationApprovalReason'
      SalesQuotation.SalesQuotationApprovalReason,

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

      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      SalesQuotation.OverallSDProcessStatus,
      @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus'
      cast(SalesQuotation.HdrGeneralIncompletionStatus as hdr_general_incompltn_status preserving type )   as HdrGeneralIncompletionStatus,
      @ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'
      cast(SalesQuotation.OvrlItmGeneralIncompletionSts as itms_ovrl_incompletion_status preserving type ) as OvrlItmGeneralIncompletionSts,
      @ObjectModel.foreignKey.association: '_OverallSDDocReferenceStatus'
      SalesQuotation.OverallSDDocReferenceStatus,
      @ObjectModel.foreignKey.association: '_OverallSDDocumentRejectionSts'
      SalesQuotation.OverallSDDocumentRejectionSts,
      @ObjectModel.foreignKey.association: '_TotalCreditCheckStatus'
      SalesQuotation.TotalCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_OverallChmlCmplncStatus'
      SalesQuotation.OverallChmlCmplncStatus,
      @ObjectModel.foreignKey.association: '_OverallDangerousGoodsStatus'
      SalesQuotation.OverallDangerousGoodsStatus,
      @ObjectModel.foreignKey.association: '_OvrlSftyDataSheetSts'
      SalesQuotation.OverallSafetyDataSheetStatus,
      @ObjectModel.foreignKey.association: '_OvrlTradeCmplncEmbargoStatus'
      SalesQuotation.OverallTrdCmplncEmbargoSts,
      
      //Payment

      SalesQuotation.PaymentMethod,
      @ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
      SalesQuotation.CustomerPaymentTerms,
      SalesQuotation.BillingCompanyCode,
      
      SalesQuotation.LastChangeDate,

      OutputRequest.OutputRequestUUID,
      
      _Item,
      _Partner,
      _Text,
      _PricingElement,
      _ShipToParty,
      
      _OutputRequest,

      //Exposed Associations

      SalesQuotation._SalesQuotationType,
      SalesQuotation._SalesOrganization,
      SalesQuotation._DistributionChannel,
      SalesQuotation._OrganizationDivision,
      SalesQuotation._SalesOffice,
      SalesQuotation._SalesGroup,

      SalesQuotation._SalesDistrict,

      SalesQuotation._ShippingCondition,
      SalesQuotation._ShippingType,
      
      SalesQuotation._IncotermsVersion,
      SalesQuotation._IncotermsClassification,
      SalesQuotation._SDDocumentReason,
      SalesQuotation._ReferenceSDDocumentCategory,

      SalesQuotation._TransactionCurrency,
      SalesQuotation._CustomerPaymentTerms,
      SalesQuotation._CustomerGroup,
      SalesQuotation._CustomerPriceGroup,
      SalesQuotation._SDPricingProcedure,
      
      SalesQuotation._LastChangedByUser,
      SalesQuotation._CreatedByUser,

      SalesQuotation._CustomerCreditAccount,

      SalesQuotation._SalesQuotationApprovalReason,
      SalesQuotation._SalesDocApprovalStatus,
      SalesQuotation._OverallSDProcessStatus,
      SalesQuotation._HdrGeneralIncompletionStatus,
      SalesQuotation._OvrlItmGeneralIncompletionSts,
      SalesQuotation._OverallSDDocReferenceStatus,
      SalesQuotation._OverallSDDocumentRejectionSts,
      SalesQuotation._TotalCreditCheckStatus,
      SalesQuotation._OverallChmlCmplncStatus,
      SalesQuotation._OverallDangerousGoodsStatus,
      SalesQuotation._OvrlSftyDataSheetSts,
      SalesQuotation._OvrlTradeCmplncEmbargoStatus

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OUTPUTREQUEST",
"I_SALESQUOTATION",
"I_SALESQUOTATIONPARTNER",
"I_SLSORGANIZATIONDISTRCHNL"
],
"ASSOCIATED":
[
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERGROUP",
"I_CUSTOMERPAYMENTTERMS",
"I_CUSTOMERPRICEGROUP",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_HDRGENINCOMPLETIONSTATUS",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_OVERALLCHMLCMPLNCSTATUS",
"I_OVERALLDANGEROUSGOODSSTATUS",
"I_OVERALLSDDOCREFERENCESTATUS",
"I_OVERALLSDDOCUMENTRJCNSTATUS",
"I_OVERALLSDPROCESSSTATUS",
"I_OVRLITMGENINCOMPLETIONSTS",
"I_OVRLSFTYDATASHEETSTS",
"I_OVRLTRADECMPLNCEMBARGOSTATUS",
"I_SALESDISTRICT",
"I_SALESDOCAPPROVALSTATUS",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SALESQUOTATIONTYPE",
"I_SDDOCUMENTCATEGORY",
"I_SDDOCUMENTREASON",
"I_SHIPPINGCONDITION",
"I_SHIPPINGTYPE",
"I_SLSPRICINGPROCEDURE",
"I_SLSQTANAPPROVALREASON",
"I_TOTALCREDITCHECKSTATUS",
"I_USER",
"R_OUTPUTREQUESTTP",
"R_SALESQUOTATIONITEMTP",
"R_SALESQUOTATIONPARTNERTP",
"R_SALESQUOTATIONSHIPTOPARTYTP",
"R_SALESQUOTATIONTEXTTP",
"R_SLSQUOTATIONPRICINGELEMENTTP"
],
"BASE":
[
"I_SALESQUOTATION"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/