R_BATCH
Batch information by batch key
R_BATCH is a CDS View in S/4HANA. Batch information by batch key. It contains 4 fields. 5 CDS views read from this table.
CDS Views using this table (5)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_BatchDistinct | view | from | COMPOSITE | Batch information by batch key |
| R_BatchCharacteristicTP | view_entity | inner | TRANSACTIONAL | Batch Characteristic |
| R_BatchCharacteristicValueTP | view_entity | inner | TRANSACTIONAL | Batch Characteristics Valuation |
| R_BatchClassTP | view_entity | inner | TRANSACTIONAL | Batch Class Assignment |
| R_BatchTP | view_entity | from | TRANSACTIONAL | Batch |
Fields (4)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | Batch | Batch | 3 |
| KEY | Material | Material | 3 |
| KEY | Plant | BatchIdentifyingPlant | 3 |
| LastChangeDateTime | LastChangeDateTime | 3 |
@EndUserText.label: 'Batch information by batch key'
@AccessControl.authorizationCheck: #MANDATORY
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.dataClass:#MASTER
@ObjectModel.representativeKey: 'Batch'
@ObjectModel.supportedCapabilities: [
#SQL_DATA_SOURCE,
#CDS_MODELING_DATA_SOURCE,
#CDS_MODELING_ASSOCIATION_TARGET,
#ANALYTICAL_DIMENSION
]
@VDM.viewType: #COMPOSITE
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@Metadata.allowExtensions:true
@Metadata.ignorePropagatedAnnotations:true
// This is a version that does NOT support plant-level batches ('0') => must NOT be ported to onPremise
define view entity R_Batch as
select from I_BatchCrossPlant
// re-enable if client-level to be supported
// inner join I_BatchConfiguration on DefinitionOfBatchLevel <> '0'
association [0..1] to I_Plant as _Plant on $projection.Plant = _Plant.Plant
association [1..1] to I_Product as _Product on $projection.Material = _Product.Product
association [0..1] to I_ClfnObjectClassForKeyDate as _ClfnObjectClassForKeyDate on $projection.ClfnObjectInternalID = _ClfnObjectClassForKeyDate.ClfnObjectInternalID
association [0..*] to I_ClfnObjectCharcValForKeyDate as _ClfnObjectCharcValForKeyDate on $projection.ClfnObjectInternalID = _ClfnObjectCharcValForKeyDate.ClfnObjectInternalID
association [0..*] to I_BatchDistinctText as _BatchDistinctText on $projection.Batch = _BatchDistinctText.Batch
and $projection.Material = _BatchDistinctText.Material
and $projection.Plant = _BatchDistinctText.Plant
{
@ObjectModel.foreignKey.association: '_Plant'
key cast(' ' as werks_d preserving type) as Plant,
@ObjectModel.foreignKey.association: '_Product'
key Material,
@ObjectModel.text.association: '_BatchDistinctText'
key Batch,
BatchIsMarkedForDeletion,
MatlBatchIsInRstrcdUseStock,
@ObjectModel.foreignKey.association: '_Supplier'
Supplier,
BatchBySupplier,
@ObjectModel.foreignKey.association: '_CountryOfOrigin'
CountryOfOrigin,
@ObjectModel.foreignKey.association: '_RegionOfOrigin'
RegionOfOrigin,
MatlBatchAvailabilityDate,
ShelfLifeExpirationDate,
ManufactureDate,
NextInspectionDate,
LastGoodsReceiptDate,
FreeDefinedDate1,
FreeDefinedDate2,
FreeDefinedDate3,
FreeDefinedDate4,
FreeDefinedDate5,
FreeDefinedDate6,
cast('1' as kzdch) as DefinitionOfBatchLevel,
BatchCertificationDate,
@Semantics.systemDateTime.createdAt: true
CreationDateTime,
@Semantics.systemDateTime.lastChangedAt: true
LastChangeDateTime,
ClfnObjectInternalID,
BatchExtWhseMgmtInternalId,
StockSegment,
ExportAndImportProductGroup,
cast( ' ' as bwtar_d preserving type ) as InventoryValuationType,
BatchVersion,
_Plant,
_Material,
_Supplier,
_CountryOfOrigin,
_RegionOfOrigin,
_Product,
_ClfnObjectClassForKeyDate,
_ClfnObjectCharcValForKeyDate,
_BatchDistinctText
}