I_RSHOrderMaterialStatus

DDL: I_RSHORDERMATERIALSTATUS SQL: IRSHORDMATSTAT Type: view COMPOSITE

Order Material Status

I_RSHOrderMaterialStatus is a Composite CDS View that provides data about "Order Material Status" in SAP S/4HANA. It reads from 1 data source (I_StatusObjectStatusBasic) and exposes 1 field with key field StatusObject.

Data Sources (1)

SourceAliasJoin Type
I_StatusObjectStatusBasic _MaterialStatusObj from

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName IRSHORDMATSTAT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Order Material Status view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view

Fields (1)

KeyFieldSource TableSource FieldDescription
KEY StatusObject I_StatusObjectStatusBasic StatusObject
@AbapCatalog.sqlViewName: 'IRSHORDMATSTAT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Order Material Status'

@VDM.viewType: #COMPOSITE
//@VDM.private: true

@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL

/*
CONTRACT*************************************************************************************************************************
Name:                       Material Status Determination
Specification:              This view will calculate the Material Status
Requires:                   NA
Ensures:                    Material Status per Status Object is returned. Inactive Statuses are ignored.
Owners:                     CK
Contributors:
Unit Test required Y/N:     Y
Additional comments         Intended only for use in I_RSHOrder

END OF CONTRACT******************************************************************************************************************
*/

define view I_RSHOrderMaterialStatus
  as select from I_StatusObjectStatusBasic as _MaterialStatusObj

{

  key _MaterialStatusObj.StatusObject,

      // case and max in one step

      max ( case _MaterialStatusObj.StatusCode
              when 'I0340'  then 40 //Material committed

              when 'I0420'  then 20 //Mat.availability not checked

              when 'I0004'  then 10 //Material shortage

            end )                                                                   as MaterialStatus

}

where
  StatusIsInactive = '' and
  ( StatusCode = 'I0340' or StatusCode = 'I0420' or StatusCode = 'I0004' )
group by
  _MaterialStatusObj.StatusObject
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STATUSOBJECTSTATUSBASIC"
],
"ASSOCIATED":
[],
"BASE":
[],
"VERSION":0
}
}*/