I_ARunAnlytsSlsOrdRejection

DDL: I_ARUNANLYTSSLSORDREJECTION Type: view COMPOSITE

Sales Order Rejection

I_ARunAnlytsSlsOrdRejection is a Composite CDS View (Cube) that provides data about "Sales Order Rejection" in SAP S/4HANA. It reads from 2 data sources (I_SalesDocumentItem, I_SupDmndMaterialPlant) and exposes 78 fields with key fields RequirementDocumentNumber, RequirementDocumentItem. It has 17 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_SalesDocumentItem Demand from
I_SupDmndMaterialPlant SupDmndMaterialPlant inner

Parameters (1)

NameTypeDefault
P_DisplayCurrency vdm_v_display_currency

Associations (17)

CardinalityTargetAliasCondition
[0..1] I_Product _Product $projection.Product = _Product.Product
[0..1] I_ProductGroup _ProductGroup $projection.ProductGroup = _ProductGroup.MaterialGroup
[0..1] I_Producttype _ProductType $projection.ProductType = _ProductType.ProductType
[0..1] I_SalesOrganization _SalesOrg $projection.salesorganization = _SalesOrg.SalesOrganization
[0..1] I_DistributionChannel _DistrChnl $projection.distributionchannel = _DistrChnl.DistributionChannel
[0..1] I_Division _Divn $projection.division = _Divn.Division
[0..1] I_SalesDistrict _SalesDist $projection.SalesDistrict = _SalesDist.SalesDistrict
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_Customer _SoldToParty $projection.SoldToParty = _SoldToParty.Customer
[0..1] I_Customer _ShipToParty $projection.ShipToParty = _ShipToParty.Customer
[0..1] I_Currency _DisplayCurrency $projection.DisplayCurrency = _DisplayCurrency.Currency
[0..1] I_UnitOfMeasure _BaseUnit $projection.BaseUnit = _BaseUnit.UnitOfMeasure
[0..1] I_SupDmndAllDocRqmtType _Rqmt $projection.RequirementType = _Rqmt.RequirementType
[0..1] I_SalesDocument _SalesDocument $projection.RequirementDocumentNumber = _SalesDocument.SalesDocument
[0..1] I_SalesDocumentItem _SalesDocumentItem $projection.RequirementDocumentNumber = _SalesDocumentItem.SalesDocument and $projection.RequirementDocumentItem = _SalesDocumentItem.SalesDocumentItem
[0..1] I_SalesDocumentRjcnReason _SalesDocumentRjcnReason $projection.SalesDocumentRjcnReason = _SalesDocumentRjcnReason.SalesDocumentRjcnReason

Annotations (17)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
Analytics.dataCategory #CUBE view
Analytics.internalName #LOCAL view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
AbapCatalog.sqlViewName IARNALYSSOREJ view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Sales Order Rejection view

Fields (78)

KeyFieldSource TableSource FieldDescription
KEY RequirementDocumentNumber SalesDocument
KEY RequirementDocumentItem SalesDocumentItem
SupProtTimeBucketUUID
RequestedDate
ProductAvailabilityDate
RequirementType
RequirementTypeName
RequestedDeliveryDate
RequestedRqmtQtyInBaseUnit
BaseUnit I_SalesDocumentItem BaseUnit
Product I_SupDmndMaterialPlant Material
ProductGroup I_SupDmndMaterialPlant MaterialGroup
ProductType MaterialType
CrossPlantConfigurableProduct CrossPlantConfigurableProduct
Plant I_SupDmndMaterialPlant Plant
SalesOrganization _SalesDocument SalesOrganization
DistributionChannel _SalesDocument DistributionChannel
Division _Plant Division
SalesDistrict SalesDistrict
SalesOffice
SalesGroup
CompanyCode _SalesDocument BillingCompanyCode
StorageLocation StorageLocation
RequirementSegment RequirementSegment
DisplayCurrency
FashionCancelDate I_SalesDocumentItem FashionCancelDate
ProductSeasonYear I_SalesDocumentItem ProductSeasonYear
ProductSeason I_SalesDocumentItem ProductSeason
ProductCollection I_SalesDocumentItem ProductCollection
ProductTheme I_SalesDocumentItem ProductTheme
ProductCharacteristic1 I_SalesDocumentItem ProductCharacteristic1
ProductCharacteristic2 I_SalesDocumentItem ProductCharacteristic2
ProductCharacteristic3 I_SalesDocumentItem ProductCharacteristic3
SalesDocumentRjcnReason I_SalesDocumentItem SalesDocumentRjcnReason
ConfirmedRqmtQtyInBaseUnit
DeliveredQuantityInBaseUnit
OpenDemandQuantity
AssignedQuantityInBaseUnit
NormalAssignedQuantityInBsUnt
PreviewAssignedQuantityInBsUnt
ARunTmpAssignedQuantityInBsUnt
CalendarYear
CalendarMonth
CalendarMonthName
CalendarWeek
CalendarDay
PlantCountry
PlantRegion
Country
Region
SoldToParty
ShipToParty
SoldToPartyCountry
SoldToPartyRegion
ShipToCountry
CustomerRegion
SupplyProtectionName
SupAssgmtAggrgQtyUnit
NmbrOfItemsInOrder
NetPriceAmount I_SalesDocumentItem NetPriceAmount
DocumentCurrency
_Product _Product
_ProductGroup _ProductGroup
_ProductType _ProductType
_SalesOrg _SalesOrg
_DistrChnl _DistrChnl
_Divn _Divn
_SalesDist _SalesDist
_Plant _Plant
_CompanyCode _CompanyCode
_SoldToParty _SoldToParty
_ShipToParty _ShipToParty
_DisplayCurrency _DisplayCurrency
_BaseUnit _BaseUnit
_Rqmt _Rqmt
_SalesDocument _SalesDocument
_SalesDocumentItem _SalesDocumentItem
_SalesDocumentRjcnReason _SalesDocumentRjcnReason
@ClientHandling.algorithm: #SESSION_VARIABLE
@Analytics: {
  dataCategory: #CUBE,
  internalName:#LOCAL
}
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #REQUIRED
}
@AbapCatalog: {
  sqlViewName: 'IARNALYSSOREJ',
  compiler.compareFilter: true,
  preserveKey:true
 }
@ObjectModel: {
   usageType: {
     dataClass:      #MIXED,
     serviceQuality: #D,
     sizeCategory:   #L
   },
   supportedCapabilities: [ #ANALYTICAL_PROVIDER, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE ],
   modelingPattern: #ANALYTICAL_CUBE
}
@Metadata:{
  allowExtensions:              true,
  ignorePropagatedAnnotations:  true
}
@EndUserText.label: 'Sales Order Rejection'
define view I_ARunAnlytsSlsOrdRejection
  with parameters
    @Consumption.defaultValue: 'USD'
    P_DisplayCurrency : vdm_v_display_currency
  as select from I_SalesDocumentItem    as Demand
    inner join   I_SupDmndMaterialPlant as SupDmndMaterialPlant on  Demand.Plant   = SupDmndMaterialPlant.Plant
                                                                and Demand.Product = SupDmndMaterialPlant.Material
  association [0..1] to I_Product                 as _Product                 on  $projection.Product = _Product.Product
  association [0..1] to I_ProductGroup            as _ProductGroup            on  $projection.ProductGroup = _ProductGroup.MaterialGroup
  association [0..1] to I_Producttype             as _ProductType             on  $projection.ProductType = _ProductType.ProductType
  association [0..1] to I_SalesOrganization       as _SalesOrg                on  $projection.salesorganization = _SalesOrg.SalesOrganization
  association [0..1] to I_DistributionChannel     as _DistrChnl               on  $projection.distributionchannel = _DistrChnl.DistributionChannel
  association [0..1] to I_Division                as _Divn                    on  $projection.division = _Divn.Division
  association [0..1] to I_SalesDistrict           as _SalesDist               on  $projection.SalesDistrict = _SalesDist.SalesDistrict
  association [0..1] to I_Plant                   as _Plant                   on  $projection.Plant = _Plant.Plant
  association [0..1] to I_CompanyCode             as _CompanyCode             on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..1] to I_Customer                as _SoldToParty             on  $projection.SoldToParty = _SoldToParty.Customer
  association [0..1] to I_Customer                as _ShipToParty             on  $projection.ShipToParty = _ShipToParty.Customer
  association [0..1] to I_Currency                as _DisplayCurrency         on  $projection.DisplayCurrency = _DisplayCurrency.Currency
  association [0..1] to I_UnitOfMeasure           as _BaseUnit                on  $projection.BaseUnit = _BaseUnit.UnitOfMeasure
  association [0..1] to I_SupDmndAllDocRqmtType   as _Rqmt                    on  $projection.RequirementType = _Rqmt.RequirementType
  association [0..1] to I_SalesDocument           as _SalesDocument           on  $projection.RequirementDocumentNumber = _SalesDocument.SalesDocument
  association [0..1] to I_SalesDocumentItem       as _SalesDocumentItem       on  $projection.RequirementDocumentNumber = _SalesDocumentItem.SalesDocument
                                                                              and $projection.RequirementDocumentItem   = _SalesDocumentItem.SalesDocumentItem
  association [0..1] to I_SalesDocumentRjcnReason as _SalesDocumentRjcnReason on  $projection.SalesDocumentRjcnReason = _SalesDocumentRjcnReason.SalesDocumentRjcnReason

{
  key SalesDocument                                                 as RequirementDocumentNumber,
  key SalesDocumentItem                                             as RequirementDocumentItem,
      hextobin( '00000000000000000000000000000000' )                as SupProtTimeBucketUUID,
      cast( ' ' as mbdat )                                          as RequestedDate,
      cast( ' ' as mbdat )                                          as ProductAvailabilityDate,
      cast( ' ' as abap.char(2) )                                   as RequirementType,
      cast( ' ' as ddtext )                                         as RequirementTypeName,
      cast(
          concat(concat(SalesDocument, '/'), SalesDocumentItem)
          as arun_doc_item_unique_id preserving type
      )                                                             as ARunDocumentItemUniqueID,

      Demand._SalesDocument.RequestedDeliveryDate,
      @DefaultAggregation: #SUM
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast(Demand.RequestedQuantityInBaseUnit  as abap.quan(17, 3)) as RequestedRqmtQtyInBaseUnit,
      Demand.BaseUnit                                               as BaseUnit,
      @ObjectModel.foreignKey.association: '_Product'
      SupDmndMaterialPlant.Material                                 as Product,
      @ObjectModel.foreignKey.association: '_ProductGroup'
      SupDmndMaterialPlant.MaterialGroup                            as ProductGroup,
      @ObjectModel.foreignKey.association: '_ProductType'
      MaterialType                                                  as ProductType,
      CrossPlantConfigurableProduct,
      @ObjectModel.foreignKey.association: '_Plant'
      SupDmndMaterialPlant.Plant                                    as Plant,
      @ObjectModel.foreignKey.association: '_SalesOrg'
      _SalesDocument.SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistrChnl'
      _SalesDocument.DistributionChannel,
      @ObjectModel.foreignKey.association: '_Divn'
      _Plant.Division,
      @ObjectModel.foreignKey.association: '_SalesDist'
      SalesDistrict,
      Demand._SalesDocument.SalesOffice                             as SalesOffice,
      Demand._SalesDocument.SalesGroup                              as SalesGroup,
      //@ObjectModel.foreignKey.association: '_SoldToParty'

      //Demand._SalesDocument.SoldToParty                                                  as  SoldToParty,

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

      //      _SoldToParty.Customer                                            as  SoldToParty,

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

      //      _ShipToParty.Customer                                            as  ShipToParty,

      @ObjectModel.foreignKey.association: '_CompanyCode'
      _SalesDocument.BillingCompanyCode                             as CompanyCode,
      StorageLocation,
      RequirementSegment,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_DisplayCurrency'
      cast(:P_DisplayCurrency as vdm_v_display_currency)            as DisplayCurrency,
      Demand.FashionCancelDate                                      as FashionCancelDate,
      Demand.ProductSeasonYear                                      as ProductSeasonYear,
      Demand.ProductSeason                                          as ProductSeason,
      Demand.ProductCollection                                      as ProductCollection,
      Demand.ProductTheme                                           as ProductTheme,
      Demand.ProductCharacteristic1                                 as ProductCharacteristic1,
      Demand.ProductCharacteristic2                                 as ProductCharacteristic2,
      Demand.ProductCharacteristic3                                 as ProductCharacteristic3,
      @ObjectModel.foreignKey.association: '_SalesDocumentRjcnReason'
      Demand.SalesDocumentRjcnReason                                as SalesDocumentRjcnReason,

      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( '0' as meng15 )                                         as ConfirmedRqmtQtyInBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( '0' as abap.quan(18, 3) )                               as DeliveredQuantityInBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( '0' as abap.quan(21, 3) )                               as OpenDemandQuantity,
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( '0' as meng15 )                                         as AssignedQuantityInBaseUnit,
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( '0' as meng15 )                                         as NormalAssignedQuantityInBsUnt,
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( 0 as abap.dec( 12, 3 ) )                                as PreviewAssignedQuantityInBsUnt,
      @Semantics.quantity.unitOfMeasure: 'SupAssgmtAggrgQtyUnit'
      cast( 0 as abap.dec( 12, 3 ) )                                as ARunTmpAssignedQuantityInBsUnt,
      cast( ' ' as calendaryear )                                   as CalendarYear,
      @ObjectModel.text.element: 'CalendarMonthName'
      cast( ' ' as calendarmonth )                                  as CalendarMonth,
      cast( ' ' as ddtext )                                         as CalendarMonthName,
      cast( ' ' as abap.char(63) )                                  as CalendarWeek,
      cast( ' ' as calendarday )                                    as CalendarDay,
      cast( ' ' as land1 )                                          as PlantCountry,
      cast( ' ' as regio )                                          as PlantRegion,
      cast( ' ' as land1 )                                          as Country,
      cast( ' ' as regio )                                          as Region,
      cast( ' ' as kunag )                                          as SoldToParty,
      cast( ' ' as abap.char(10) )                                  as ShipToParty,
      cast( ' ' as land1 )                                          as SoldToPartyCountry,
      cast( ' ' as regio )                                          as SoldToPartyRegion,
      //cast( ' ' as kunnr ) as ShipToParty,

      cast( ' ' as land1 )                                          as ShipToCountry,
      cast( ' ' as regio )                                          as CustomerRegion,
      cast( ' ' as sup_object_name )                                as SupplyProtectionName,
      @Semantics.unitOfMeasure: true
      cast( ' ' as meins )                                          as SupAssgmtAggrgQtyUnit,
      @DefaultAggregation: #SUM
      cast( 1 as item_issues )                                      as NmbrOfItemsInOrder,
      @Semantics.amount.currencyCode: 'DocumentCurrency'
      Demand.NetPriceAmount                                         as NetPriceAmount,
      @Semantics.currencyCode: true
      cast( Demand.TransactionCurrency as waerk )                   as DocumentCurrency,
      @Semantics.amount.currencyCode: 'DisplayCurrency'
      @DefaultAggregation: #SUM
      cast(currency_conversion(
        amount => Demand.NetAmount,
        source_currency => Demand.TransactionCurrency,
        target_currency => :P_DisplayCurrency,
        exchange_rate_date => cast($session.system_date as abap.dats),
        round => #CDSBoolean.true,
        decimal_shift => #CDSBoolean.true,
        decimal_shift_back => #CDSBoolean.true,
        error_handling => 'SET_TO_NULL'
      )as net_amount_in_dsp_crcy)                                   as TotActualAmtInDisplayCurrency,
      //      cast( '0' as net_amount_in_dsp_crcy ) as TotActualAmtInDisplayCurrency,


      //Associations

      _Product,
      _ProductGroup,
      _ProductType,
      _SalesOrg,
      _DistrChnl,
      _Divn,
      _SalesDist,
      _Plant,
      _CompanyCode,
      _SoldToParty,
      _ShipToParty,
      _DisplayCurrency,
      _BaseUnit,
      _Rqmt,
      _SalesDocument,
      _SalesDocumentItem,
      _SalesDocumentRjcnReason
}
where
  SalesDocumentRjcnReason is not initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PLANT",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"I_SUPDMNDMATERIALPLANT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_CUSTOMER",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTGROUP",
"I_PRODUCTTYPE",
"I_SALESDISTRICT",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"I_SALESDOCUMENTRJCNREASON",
"I_SALESORGANIZATION",
"I_SUPDMNDALLDOCRQMTTYPE",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/