C_Cust360SalesSchedgAgrmt

DDL: C_CUST360SALESSCHEDGAGRMT Type: view_entity CONSUMPTION Package: ODATA_SD_ADVNCD_CUSTOMER360

Customer 360 Scheduling Agreements

C_Cust360SalesSchedgAgrmt is a Consumption CDS View that provides data about "Customer 360 Scheduling Agreements" in SAP S/4HANA. It reads from 2 data sources (I_Customer360BusDocSetting, I_SalesSchedgAgrmt) and exposes 72 fields with key field SalesSchedulingAgreement. It has 13 associations to related views. It is exposed through 1 OData service (SD_ADVNCD_CUSTOMER360). Part of development package ODATA_SD_ADVNCD_CUSTOMER360.

Data Sources (2)

SourceAliasJoin Type
I_Customer360BusDocSetting Customer360BusDocSetting inner
I_SalesSchedgAgrmt SalesSchedulingAgreement from

Associations (13)

CardinalityTargetAliasCondition
[0..1] C_SoldToValueHelp _SoldToParty $projection.SoldToParty = _SoldToParty.Customer
[0..1] C_SoldToValueHelp _ShipToParty $projection.ShipToParty = _ShipToParty.Customer
[0..1] C_SalesSchedgAgrmtTypeVH _SalesSchedgAgrmtType $projection.SalesSchedgAgrmtType = _SalesSchedgAgrmtType.SalesSchedgAgrmtType
[0..1] I_OverallSDProcessStatus _OverallSDProcessStatus $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus
[0..1] I_OverallSDDocumentRjcnStatus _OverallSDDocumentRejectionSts $projection.OverallSDDocumentRejectionSts = _OverallSDDocumentRejectionSts.OverallSDDocumentRejectionSts
[0..1] I_SalesOrganization _SalesOrg $projection.SalesOrganization = _SalesOrg.SalesOrganization
[0..1] I_DistributionChannel _DistributionChannel $projection.DistributionChannel = _DistributionChannel.DistributionChannel
[0..1] I_Division _Division $projection.OrganizationDivision = _Division.Division
[0..1] I_SalesOffice _SalesOffice $projection.SalesOffice = _SalesOffice.SalesOffice
[0..1] I_SalesGroup _SalesGroup $projection.SalesGroup = _SalesGroup.SalesGroup
[0..1] C_SalesDocumentUserVH _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] C_SalesDocumentUserVH _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[1] E_SalesDocumentBasic _Extension $projection.SalesSchedulingAgreement = _Extension.SalesDocument

Annotations (10)

NameValueLevelField
EndUserText.label Customer 360 Scheduling Agreements view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
Search.searchable true view

OData Services (1)

ServiceBindingVersionContractRelease
SD_ADVNCD_CUSTOMER360 SD_ADVNCD_CUSTOMER360 V4 C1 NOT_RELEASED

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY SalesSchedulingAgreement I_SalesSchedgAgrmt SalesSchedulingAgreement
SoldToParty I_SalesSchedgAgrmt SoldToParty
SalesOrganization I_SalesSchedgAgrmt SalesOrganization
SalesOrganizationName
PurchaseOrderByCustomer I_SalesSchedgAgrmt PurchaseOrderByCustomer
OverallSDProcessStatus I_SalesSchedgAgrmt OverallSDProcessStatus
OverallSDProcessStatusDesc
SalesSchedgAgrmtDate I_SalesSchedgAgrmt SalesSchedgAgrmtDate
CreationDate I_SalesSchedgAgrmt CreationDate
CreatedByUser I_SalesSchedgAgrmt CreatedByUser
CreatedByUserDescription
LastChangedByUser I_SalesSchedgAgrmt LastChangedByUser
LastChangedByUserDescription
DistributionChannel I_SalesSchedgAgrmt DistributionChannel
DistributionChannelName
OrganizationDivision I_SalesSchedgAgrmt OrganizationDivision
DivisionName
SalesOffice I_SalesSchedgAgrmt SalesOffice
SalesOfficeName
SalesGroup I_SalesSchedgAgrmt SalesGroup
SalesGroupName
TotalNetAmount I_SalesSchedgAgrmt TotalNetAmount
TransactionCurrency I_SalesSchedgAgrmt TransactionCurrency
CurrencyName
SalesSchedgAgrmtType I_SalesSchedgAgrmt SalesSchedgAgrmtType
SalesDocumentTypeName
PricingDate I_SalesSchedgAgrmt PricingDate
OverallBillingBlockStatus I_SalesSchedgAgrmt OverallBillingBlockStatus
OverallBillingBlockStatusDesc
OverallDeliveryStatus I_SalesSchedgAgrmt OverallDeliveryStatus
OverallDeliveryStatusDesc
OverallSDDocumentRejectionSts I_SalesSchedgAgrmt OverallSDDocumentRejectionSts
OvrlSDDocumentRejectionStsDesc
OrganizationBPName1 _SoldToParty OrganizationBPName1
OrganizationBPName2 _SoldToParty OrganizationBPName2
OverallTrdCmplncEmbargoSts
OverallTrdCmplncEmbargoStsDesc
OvrlTrdCmplncSnctndListChkSts
OvrlTrdCmplncSnctndListStsDesc
OvrlTrdCmplncLegalCtrlChkSts
OvrlTrdCmplncLglCtrlChkStsDesc
ShipToParty Ship-to Party
ShipToPartyName
OverallChmlCmplncStatus
OverallChmlCmplncStatusDesc
OverallDangerousGoodsStatus
OverallDangerousGoodsStsDesc
OverallSafetyDataSheetStatus
OverallSafetyDataSheetStsDesc
MaterialByCustomer
Plant
_SoldToParty _SoldToParty
_OverallSDProcessStatus _OverallSDProcessStatus
_OverallBillingBlockStatus I_SalesSchedgAgrmt _OverallBillingBlockStatus
_OverallDeliveryStatus I_SalesSchedgAgrmt _OverallDeliveryStatus
_OverallSDDocumentRejectionSts _OverallSDDocumentRejectionSts
_OverallChmlCmplncStatus I_SalesSchedgAgrmt _OverallChmlCmplncStatus
_OverallDangerousGoodsStatus I_SalesSchedgAgrmt _OverallDangerousGoodsStatus
_OvrlSftyDataSheetSts I_SalesSchedgAgrmt _OvrlSftyDataSheetSts
_SalesSchedgAgrmtType _SalesSchedgAgrmtType
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_SalesOrg _SalesOrg
_DistributionChannel _DistributionChannel
_Division _Division
_CreatedByUser _CreatedByUser
_LastChangedByUser _LastChangedByUser
_TransactionCurrency I_SalesSchedgAgrmt _TransactionCurrency
_ShipToParty _ShipToParty
_OvrlTradeCmplncEmbargoStatus I_SalesSchedgAgrmt _OvrlTradeCmplncEmbargoStatus
_OvTrdCmplncSnctndListChkSts I_SalesSchedgAgrmt _OvTrdCmplncSnctndListChkSts
_OvrlTrdCmplncLegalCtrlChkSts I_SalesSchedgAgrmt _OvrlTrdCmplncLegalCtrlChkSts
@EndUserText.label: 'Customer 360 Scheduling Agreements'
@Metadata.ignorePropagatedAnnotations: true
@Metadata.allowExtensions: true
@VDM: {
  viewType:#CONSUMPTION
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking:#REQUIRED
}
@ObjectModel: {
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #C,
     sizeCategory:   #L
   }
}
@Search.searchable: true
define view entity C_Cust360SalesSchedgAgrmt 
  as select from I_SalesSchedgAgrmt as SalesSchedulingAgreement
  inner join I_Customer360BusDocSetting as Customer360BusDocSetting on Customer360BusDocSetting.Cust360BusDocCategory = 'E' 
                                                                    and Customer360BusDocSetting.BusinessDocumentIsEnabled = 'X'
  association [0..1] to C_SoldToValueHelp             as _SoldToParty                   on $projection.SoldToParty = _SoldToParty.Customer
  association [0..1] to C_SoldToValueHelp             as _ShipToParty                   on $projection.ShipToParty = _ShipToParty.Customer
  association [0..1] to C_SalesSchedgAgrmtTypeVH      as _SalesSchedgAgrmtType          on $projection.SalesSchedgAgrmtType = _SalesSchedgAgrmtType.SalesSchedgAgrmtType
  association [0..1] to I_OverallSDProcessStatus      as _OverallSDProcessStatus        on $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus
  association [0..1] to I_OverallSDDocumentRjcnStatus as _OverallSDDocumentRejectionSts on $projection.OverallSDDocumentRejectionSts = _OverallSDDocumentRejectionSts.OverallSDDocumentRejectionSts
  association [0..1] to I_SalesOrganization           as _SalesOrg                      on $projection.SalesOrganization = _SalesOrg.SalesOrganization
  association [0..1] to I_DistributionChannel         as _DistributionChannel           on $projection.DistributionChannel = _DistributionChannel.DistributionChannel
  association [0..1] to I_Division                    as _Division                      on $projection.OrganizationDivision = _Division.Division
  association [0..1] to I_SalesOffice                 as _SalesOffice                   on $projection.SalesOffice = _SalesOffice.SalesOffice
  association [0..1] to I_SalesGroup                  as _SalesGroup                    on $projection.SalesGroup = _SalesGroup.SalesGroup
  association [0..1] to C_SalesDocumentUserVH         as _CreatedByUser                 on $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to C_SalesDocumentUserVH         as _LastChangedByUser             on $projection.LastChangedByUser = _LastChangedByUser.UserID
 // association [0..*] to C_SalesDocumentItemWl         as _SalesDocumentItemWl           on $projection.SalesSchedulingAgreement = _SalesDocumentItemWl.SalesDocument


  //Extension Association

  association [1]    to E_SalesDocumentBasic          as _Extension                     on $projection.SalesSchedulingAgreement = _Extension.SalesDocument
  
  {
        @Search.defaultSearchElement: true
        @Search.fuzzinessThreshold: 0.8
        @Search.ranking: #HIGH
        key SalesSchedulingAgreement.SalesSchedulingAgreement,

      
      @ObjectModel: {
        readOnly: true,
        foreignKey.association: '_SoldToParty'
      }
      SalesSchedulingAgreement.SoldToParty,


      //Organization


      @ObjectModel.readOnly: true
      @ObjectModel.foreignKey.association: '_SalesOrg'
      @ObjectModel.text.element: ['SalesOrganizationName']
      SalesSchedulingAgreement.SalesOrganization,
      
      SalesSchedulingAgreement._SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName as SalesOrganizationName,


      SalesSchedulingAgreement.PurchaseOrderByCustomer,

//      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'

      @ObjectModel.text.element: ['OverallSDProcessStatusDesc']
      SalesSchedulingAgreement.OverallSDProcessStatus,
      
      SalesSchedulingAgreement._OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc,

      //Administrator

      SalesSchedulingAgreement.SalesSchedgAgrmtDate,
      
      SalesSchedulingAgreement.CreationDate,
      
      @ObjectModel.foreignKey.association: '_CreatedByUser'
      @ObjectModel.text.element: ['CreatedByUserDescription']
      SalesSchedulingAgreement.CreatedByUser,
      SalesSchedulingAgreement._CreatedByUser.UserDescription as CreatedByUserDescription,
      
      @ObjectModel.foreignKey.association: '_LastChangedByUser'
      @ObjectModel.text.element: ['LastChangedByUserDescription']
      SalesSchedulingAgreement.LastChangedByUser,
      SalesSchedulingAgreement._LastChangedByUser.UserDescription as LastChangedByUserDescription,
      
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      @ObjectModel.text.element: ['DistributionChannelName']
      SalesSchedulingAgreement.DistributionChannel,
      
      _DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName,
      
      @ObjectModel.foreignKey.association: '_Division'
      @ObjectModel.text.element: ['DivisionName']
      SalesSchedulingAgreement.OrganizationDivision,
      
      _Division._Text[1:Language = $session.system_language].DivisionName,

      @ObjectModel.foreignKey.association: '_SalesOffice'
      @ObjectModel.text.element: ['SalesOfficeName']
      SalesSchedulingAgreement.SalesOffice,
      
     _SalesOffice._Text[1:Language = $session.system_language].SalesOfficeName,
      
      @ObjectModel.foreignKey.association: '_SalesGroup'
      @ObjectModel.text.element: ['SalesGroupName']
      SalesSchedulingAgreement.SalesGroup,
      
      _SalesGroup._Text[1:Language = $session.system_language].SalesGroupName,

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      SalesSchedulingAgreement.TotalNetAmount,
      
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      @ObjectModel.text.element: ['CurrencyName']
      SalesSchedulingAgreement.TransactionCurrency,
      SalesSchedulingAgreement._TransactionCurrency._Text[1:Language = $session.system_language].CurrencyName as CurrencyName,
     
      @ObjectModel.foreignKey.association: '_SalesSchedgAgrmtType'
      @ObjectModel.text.element: ['SalesDocumentTypeName']
      SalesSchedulingAgreement.SalesSchedgAgrmtType,
      
      SalesSchedulingAgreement._SalesSchedgAgrmtType._Text[1:Language = $session.system_language].SalesDocumentTypeName,

      SalesSchedulingAgreement.PricingDate,

      //Status

      @ObjectModel.foreignKey.association: '_OverallBillingBlockStatus'
      @ObjectModel.text.element: ['OverallBillingBlockStatusDesc']
      SalesSchedulingAgreement.OverallBillingBlockStatus,
      
      SalesSchedulingAgreement._OverallBillingBlockStatus._Text[1:Language = $session.system_language].OverallBillingBlockStatusDesc as OverallBillingBlockStatusDesc,

      @ObjectModel.foreignKey.association: '_OverallDeliveryStatus'
      @ObjectModel.text.element: ['OverallDeliveryStatusDesc']
      SalesSchedulingAgreement.OverallDeliveryStatus,
      
      SalesSchedulingAgreement._OverallDeliveryStatus._Text[1:Language = $session.system_language].OverallDeliveryStatusDesc as OverallDeliveryStatusDesc,

      @ObjectModel.foreignKey.association: '_OverallSDDocumentRejectionSts'
      @ObjectModel.text.element: ['OvrlSDDocumentRejectionStsDesc']
      SalesSchedulingAgreement.OverallSDDocumentRejectionSts,
      
      _OverallSDDocumentRejectionSts._Text[1: Language=$session.system_language].OvrlSDDocumentRejectionStsDesc as OvrlSDDocumentRejectionStsDesc,

      _SoldToParty.OrganizationBPName1,
      _SoldToParty.OrganizationBPName2,

      @ObjectModel.foreignKey.association: '_OvrlTradeCmplncEmbargoStatus'
      @ObjectModel.text.element: ['OverallTrdCmplncEmbargoStsDesc']
      cast(SalesSchedulingAgreement.OverallTrdCmplncEmbargoSts as totembargochksts preserving type) as OverallTrdCmplncEmbargoSts,
      
      SalesSchedulingAgreement._OvrlTradeCmplncEmbargoStatus._Text[1: Language=$session.system_language].OverallTrdCmplncEmbargoStsDesc,
          
      @ObjectModel.foreignKey.association: '_OvTrdCmplncSnctndListChkSts'
      @ObjectModel.text.element: ['OvrlTrdCmplncSnctndListStsDesc'] 
      cast(SalesSchedulingAgreement.OvrlTrdCmplncSnctndListChkSts as totwatchlistscrngchksts preserving type) as OvrlTrdCmplncSnctndListChkSts,
      
      SalesSchedulingAgreement._OvTrdCmplncSnctndListChkSts._Text[1: Language=$session.system_language].OvrlTrdCmplncSnctndListStsDesc,

      @ObjectModel.foreignKey.association: '_OvrlTrdCmplncLegalCtrlChkSts'
      @ObjectModel.text.element: ['OvrlTrdCmplncLglCtrlChkStsDesc']
      cast(SalesSchedulingAgreement.OvrlTrdCmplncLegalCtrlChkSts as totlglctrlchksts preserving type) as OvrlTrdCmplncLegalCtrlChkSts,
      
      SalesSchedulingAgreement._OvrlTrdCmplncLegalCtrlChkSts._Text[1: Language=$session.system_language].OvrlTrdCmplncLglCtrlChkStsDesc,
      
      @ObjectModel.foreignKey.association: '_ShipToParty'
      @ObjectModel.text.element: ['ShipToPartyName']
      @EndUserText.label: 'Ship-to Party'
      SalesSchedulingAgreement._Partner [ 1:PartnerFunction = 'WE'].Customer as ShipToParty,
      
      @Semantics.text:true
      @ObjectModel.virtualElement: true
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_SD_SLSSA_UI_PARTNER_UTIL'
      cast('' as ad_namtext )                                                    as ShipToPartyName,


      @ObjectModel.foreignKey.association: '_OverallChmlCmplncStatus'
      @ObjectModel.text.element: ['OverallChmlCmplncStatusDesc']
      cast(SalesSchedulingAgreement.OverallChmlCmplncStatus as mon_tdd_total_pcsta preserving type)       as OverallChmlCmplncStatus,
      
      SalesSchedulingAgreement._OverallChmlCmplncStatus._Text[1: Language=$session.system_language].OverallChmlCmplncStatusDesc,
      

      @ObjectModel.foreignKey.association: '_OverallDangerousGoodsStatus'
      @ObjectModel.text.element: ['OverallDangerousGoodsStsDesc']
      cast(SalesSchedulingAgreement.OverallDangerousGoodsStatus as mon_tdd_total_dgsta preserving type)   as OverallDangerousGoodsStatus,
      
      SalesSchedulingAgreement._OverallDangerousGoodsStatus._Text[1: Language=$session.system_language].OverallDangerousGoodsStsDesc,
      

      @ObjectModel.foreignKey.association: '_OvrlSftyDataSheetSts'
      @ObjectModel.text.element: ['OverallSafetyDataSheetStsDesc']
      cast(SalesSchedulingAgreement.OverallSafetyDataSheetStatus as mon_tdd_total_sdssta preserving type) as OverallSafetyDataSheetStatus,
      
       SalesSchedulingAgreement._OvrlSftyDataSheetSts._Text[1: Language=$session.system_language].OverallSafetyDataSheetStsDesc,
      
      cast ('' as matnr_ku)                                                      as MaterialByCustomer,
      cast ('' as werks_ext)                                                     as Plant,
      //Association

      @Consumption.filter.hidden: true
      _SoldToParty,
      @Consumption.filter.hidden: true
      _OverallSDProcessStatus,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OverallBillingBlockStatus,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OverallDeliveryStatus,
      @Consumption.filter.hidden: true
      _OverallSDDocumentRejectionSts,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OverallChmlCmplncStatus,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OverallDangerousGoodsStatus,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OvrlSftyDataSheetSts,
      @Consumption.filter.hidden: true
      _SalesSchedgAgrmtType,
      @Consumption.filter.hidden: true
      _SalesOffice,
      @Consumption.filter.hidden: true
      _SalesGroup,
      @Consumption.filter.hidden: true
      _SalesOrg,
      @Consumption.filter.hidden: true
      _DistributionChannel,
      @Consumption.filter.hidden: true
      _Division,
      @Consumption.filter.hidden: true
      _CreatedByUser,
      @Consumption.filter.hidden: true
      _LastChangedByUser,
//      @Search.defaultSearchElement: true

//      _SalesDocumentItemWl,

      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._TransactionCurrency,
      @Consumption.filter.hidden: true
      _ShipToParty,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OvrlTradeCmplncEmbargoStatus,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OvTrdCmplncSnctndListChkSts,
      @Consumption.filter.hidden: true
      SalesSchedulingAgreement._OvrlTrdCmplncLegalCtrlChkSts
}
where SalesSchedulingAgreement.CreationDate > dats_add_days( tstmp_to_dats(tstmp_current_utctimestamp(), abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL'), -Customer360BusDocSetting.BusDocumentDurationInDays, 'INITIAL')
and SalesSchedulingAgreement.CreationDate <= $session.system_date