I_ARUNSUPPLYPROTECTION
Supply Protection relevant for Supply Assignment
I_ARUNSUPPLYPROTECTION is a CDS View in S/4HANA. Supply Protection relevant for Supply Assignment. It contains 20 fields. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_SupDmndAllDocDemand | view | union_all | COMPOSITE | View for Demand of All Documents |
| I_SupDmndAllDocSupProt | view | from | COMPOSITE | Supply Protection relevant for Supply Assignment |
| I_SupDmndAllDocSupProtC | view | from | COMPOSITE | Supply Protection relevant for Supply Assignment |
Fields (20)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | SupProtTimeBucketUUID | SupProtTimeBucketUUID | 2 |
| BaseUnit | BaseUnit | 1 | |
| CrossPlantConfigurableProduct | CrossPlantConfigurableProduct | 2 | |
| Division | Division | 1 | |
| EndDate | EndDate | 2 | |
| IsInternalBatchManaged | IsInternalBatchManaged | 1 | |
| Material | Material | 2 | |
| MaterialGroup | MaterialGroup | 2 | |
| MaterialType | MaterialType | 1 | |
| Plant | Plant | 2 | |
| ProductAvailabilityDate | ProductAvailabilityDate | 2 | |
| RequestedDeliveryDate | RequestedDeliveryDate | 2 | |
| RequirementSegment | RequirementSegment | 2 | |
| RequirementType | RequirementType | 2 | |
| SegmentationStrategy | SegmentationStrategy | 1 | |
| SegmentationStrategyScope | SegmentationStrategyScope | 1 | |
| StartDate | RequestedDate,StartDate | 2 | |
| SupplyProtectionName | SupplyProtectionName | 1 | |
| SupProtGroupPriorityValue | SupProtGroupPriorityValue | 1 | |
| SupProtLifecycleStatus | SupProtLifecycleStatus | 1 |
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
viewType: #BASIC
}
@AccessControl: {
authorizationCheck: #NOT_REQUIRED,
personalData.blocking: #NOT_REQUIRED
}
@AbapCatalog: {
sqlViewName: 'IARUNSUPPROT',
compiler.compareFilter: true,
preserveKey: true
}
@ObjectModel: {
usageType: {
dataClass: #MASTER,
serviceQuality: #C,
sizeCategory: #L
}
}
@EndUserText.label: 'Supply Protection relevant for Supply Assignment'
define view I_ARunSupplyProtection
as select from sup_object as SupProt
inner join I_SupDmndMaterialPlant as MaterialPlant on SupProt.material = MaterialPlant.Material
and SupProt.plant = MaterialPlant.Plant
left outer to many join sup_cvc as SupProtGroup on SupProt.uuid = SupProtGroup.supobjectuuid
left outer to many join I_SupplyProtectionTimeBucket as SupProtTimeBucket on SupProtGroup.uuid = SupProtTimeBucket.SupplyProtectionGroupUUID
association [0..1] to I_SupProtTimeBucketSum as _SupProtTimeBucketSum on $projection.SupProtTimeBucketUUID = _SupProtTimeBucketSum.SupProtTimeBucketUUID
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc01 on $projection.SupProtCharc01CtlgPathUUID = _SupProtCharc01.ProdAllocCharcCtlgPathUUID
and ( _SupProtCharc01.ABAPDataElement = 'SGT_RCAT' or //Requirment Segment
_SupProtCharc01.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc01.ProdAllocCharcCatalogUseType = '05' //Supply Protection
and MaterialPlant.SegmentationStrategy is not initial //Relevant for Segmentation
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc02 on $projection.SupProtCharc02CtlgPathUUID = _SupProtCharc02.ProdAllocCharcCtlgPathUUID
and ( _SupProtCharc02.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc02.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc02.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc03 on $projection.SupProtCharc03CtlgPathUUID = _SupProtCharc03.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc03.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc03.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT')
and _SupProtCharc03.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc04 on $projection.SupProtCharc04CtlgPathUUID = _SupProtCharc04.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc04.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc04.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc04.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc05 on $projection.SupProtCharc05CtlgPathUUID = _SupProtCharc05.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc05.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc05.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc05.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc06 on $projection.SupProtCharc06CtlgPathUUID = _SupProtCharc06.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc06.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc06.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc06.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc07 on $projection.SupProtCharc07CtlgPathUUID = _SupProtCharc07.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc07.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc07.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc07.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc08 on $projection.SupProtCharc08CtlgPathUUID = _SupProtCharc08.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc08.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc08.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc08.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc09 on $projection.SupProtCharc09CtlgPathUUID = _SupProtCharc09.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc09.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc09.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc09.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
association [0..1] to I_ProdAllocCharcCatalogPath as _SupProtCharc10 on $projection.SupProtCharc10CtlgPathUUID = _SupProtCharc10.ProdAllocCharcCtlgPathUUID
and (_SupProtCharc10.ABAPDataElement = 'SGT_RCAT' or
_SupProtCharc10.CharcCatalogCharacteristicName = 'SDSTO_M.SUP_I-REQUIREMENTSEGMENT' )
and _SupProtCharc10.ProdAllocCharcCatalogUseType = '05'
and MaterialPlant.SegmentationStrategy is not initial
{
key SupProtTimeBucket.SupProtTimeBucketUUID,
SupProt.name as SupplyProtectionName,
SupProt.material as Material,
SupProt.plant as Plant,
SupProt.status as SupProtLifecycleStatus,
// RequestedDeliveryDate ==> Start Date will be considered
cast(tstmp_to_dats( SupProtTimeBucket.SupProtPeriodStartUTCDateTime, 'UTC', $session.client, 'NULL' )
as vdm_v_start_date) as ProductAvailabilityDate,
cast(tstmp_to_dats( SupProtTimeBucket.SupProtPeriodStartUTCDateTime, 'UTC', $session.client, 'NULL' )
as vdm_v_start_date) as RequestedDeliveryDate,
cast(tstmp_to_dats( SupProtTimeBucket.SupProtPeriodStartUTCDateTime, 'UTC', $session.client, 'NULL' )
as vdm_v_start_date) as StartDate,
cast(tstmp_to_dats( SupProtTimeBucket.SupProtPeriodEndUTCDateTime,'UTC', $session.client, 'NULL' )
as vdm_v_end_date) as EndDate,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
SupProtTimeBucket.SupProtProtectedQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
_SupProtTimeBucketSum.SupProtConsumedQuantity,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
case
when _SupProtTimeBucketSum.SupProtConsumedQuantity > 0
then
case
when SupProtTimeBucket.SupProtProtectedQuantity > _SupProtTimeBucketSum.SupProtConsumedQuantity
then ( SupProtTimeBucket.SupProtProtectedQuantity - _SupProtTimeBucketSum.SupProtConsumedQuantity )
else 0
end
else SupProtTimeBucket.SupProtProtectedQuantity
end as ARunSupProtUnconsumedQty,
@Semantics.unitOfMeasure: true
SupProtTimeBucket.UnitOfMeasure as BaseUnit,
'SP' as RequirementType,
MaterialPlant.MaterialGroup,
MaterialPlant.MaterialType,
MaterialPlant.CrossPlantConfigurableProduct,
MaterialPlant.SegmentationStrategy,
MaterialPlant.SegmentationStrategyScope,
case
when _SupProtCharc01.ProdAllocCharcCatalogType <> ''
then cast( characteristic01 as sgt_rcat )
when _SupProtCharc02.ProdAllocCharcCatalogType <> ''
then cast( characteristic02 as sgt_rcat )
when _SupProtCharc03.ProdAllocCharcCatalogType <> ''
then cast( characteristic03 as sgt_rcat )
when _SupProtCharc04.ProdAllocCharcCatalogType <> ''
then cast( characteristic04 as sgt_rcat )
when _SupProtCharc05.ProdAllocCharcCatalogType <> ''
then cast( characteristic05 as sgt_rcat )
when _SupProtCharc06.ProdAllocCharcCatalogType <> ''
then cast( characteristic06 as sgt_rcat )
when _SupProtCharc07.ProdAllocCharcCatalogType <> ''
then cast( characteristic07 as sgt_rcat )
when _SupProtCharc08.ProdAllocCharcCatalogType <> ''
then cast( characteristic08 as sgt_rcat )
when _SupProtCharc09.ProdAllocCharcCatalogType <> ''
then cast( characteristic09 as sgt_rcat )
when _SupProtCharc10.ProdAllocCharcCatalogType <> ''
then cast( characteristic10 as sgt_rcat )
else cast ( '' as sgt_rcat )
end as RequirementSegment,
SupProt.uuid as SupplyProtectionUUID,
SupProtGroup.uuid as SupplyProtectionGroupUUID,
SupProtGroup.cvcpriority as SupProtGroupPriorityValue,
charc01catalogpathuuid as SupProtCharc01CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc01CtlgPathIntID,
characteristic01 as SupProtCharc01ValueID,
charc02catalogpathuuid as SupProtCharc02CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc02CtlgPathIntID,
characteristic02 as SupProtCharc02ValueID,
charc03catalogpathuuid as SupProtCharc03CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc03CtlgPathIntID,
characteristic03 as SupProtCharc03ValueID,
charc04catalogpathuuid as SupProtCharc04CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc04CtlgPathIntID,
characteristic04 as SupProtCharc04ValueID,
charc05catalogpathuuid as SupProtCharc05CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc05CtlgPathIntID,
characteristic05 as SupProtCharc05ValueID,
charc06catalogpathuuid as SupProtCharc06CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc06CtlgPathIntID,
characteristic06 as SupProtCharc06ValueID,
charc07catalogpathuuid as SupProtCharc07CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc07CtlgPathIntID,
characteristic07 as SupProtCharc07ValueID,
charc08catalogpathuuid as SupProtCharc08CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc08CtlgPathIntID,
characteristic08 as SupProtCharc08ValueID,
charc09catalogpathuuid as SupProtCharc09CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc09CtlgPathIntID,
characteristic09 as SupProtCharc09ValueID,
charc10catalogpathuuid as SupProtCharc10CtlgPathUUID,
SupProtGroup.charc01catalogpathid as SupProtCharc10CtlgPathIntID,
characteristic10 as SupProtCharc10ValueID,
MaterialPlant.Division as Division,
MaterialPlant.IsInternalBatchManaged
}
where
SupProt.status <> '03' -- Deactivated
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PRODALLOCCHARCCATALOGPATH",
"I_SUPDMNDMATERIALPLANT",
"I_SUPPLYPROTECTIONTIMEBUCKET",
"I_SUPPROTTIMEBUCKETSUM",
"SUP_CVC",
"SUP_OBJECT"
],
"ASSOCIATED":
[
"I_PRODALLOCCHARCCATALOGPATH",
"I_SUPPROTTIMEBUCKETSUM"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/