I_BATCHCROSSPLANT

CDS View

Batch in table MCH1 without WERKS key

I_BATCHCROSSPLANT is a CDS View in S/4HANA. Batch in table MCH1 without WERKS key. It contains 28 fields. 7 CDS views read from this table.

CDS Views using this table (7)

ViewTypeJoinVDMDescription
ESH_N_BATCH view from
I_Batch view inner COMPOSITE Batch information
I_BatchDistinct view from COMPOSITE Batch information by batch key
I_BatchVH view from COMPOSITE Batch
I_BatchVH view left_outer COMPOSITE Batch
MMIMBatchesVH view from Value Help for Batches
P_MfgProcgExecBatch view from COMPOSITE

Fields (28)

KeyField CDS FieldsUsed in Views
KEY Batch Batch 2
KEY Material Material 2
_CountryOfOrigin _CountryOfOrigin 3
_RegionOfOrigin _RegionOfOrigin 3
_Supplier _Supplier 3
BatchBySupplier BatchBySupplier 3
BatchCertificationDate BatchCertificationDate 1
BatchIsMarkedForDeletion BatchIsMarkedForDeletion 3
ClfnObjectInternalID ClfnObjectInternalID 3
CountryOfOrigin CountryOfOrigin 3
CreationDateTime CreationDateTime 1
ExportAndImportProductGroup ExportAndImportProductGroup 1
FreeDefinedDate1 FreeDefinedDate1 3
FreeDefinedDate2 FreeDefinedDate2 3
FreeDefinedDate3 FreeDefinedDate3 3
FreeDefinedDate4 FreeDefinedDate4 3
FreeDefinedDate5 FreeDefinedDate5 3
FreeDefinedDate6 FreeDefinedDate6 3
LastChangeDateTime LastChangeDateTime 1
LastGoodsReceiptDate LastGoodsReceiptDate 1
ManufactureDate ManufactureDate 4
MatlBatchAvailabilityDate MatlBatchAvailabilityDate 3
MatlBatchIsInRstrcdUseStock MatlBatchIsInRstrcdUseStock 3
NextInspectionDate NextInspectionDate 1
RegionOfOrigin RegionOfOrigin 3
ShelfLifeExpirationDate ShelfLifeExpirationDate 4
StockSegment StockSegment 1
Supplier Supplier 3
@AbapCatalog.sqlViewName: 'IBATCHCROSSPLANT'
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Batch in table MCH1 without WERKS key'

@AccessControl.authorizationCheck: #CHECK

@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.dataClass:#MASTER
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.private: false
@VDM.viewType: #BASIC
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
define view I_BatchCrossPlant
  as select from mch1
  association [1..1] to I_Material                as _Material                on  $projection.Material = _Material.Material
  association [1..1] to I_Product                 as _Product                 on  $projection.Material = _Product.Product
  association [0..*] to I_BusinessPartnerSupplier as _BusinessPartnerSupplier on  $projection.Supplier = _BusinessPartnerSupplier.Supplier
  association [0..1] to I_Country                 as _CountryOfOrigin         on  $projection.CountryOfOrigin = _CountryOfOrigin.Country
  association [0..1] to I_Region                  as _RegionOfOrigin          on  $projection.RegionOfOrigin  = _RegionOfOrigin.Region
                                                                              and $projection.CountryOfOrigin = _RegionOfOrigin.Country
  association [0..1] to I_Supplier                as _Supplier                on  $projection.Supplier = _Supplier.Supplier
  association [0..1] to I_BatchRestrictionStatus  as _BatchRestrictionStatus  on  (
       $projection.MatlBatchIsInRstrcdUseStock                                                                                       = 'X'
       and _BatchRestrictionStatus.BatchRestrictionStatus                                                                            = 'R'
     )
                                                                              or  (
                                                                                  $projection.MatlBatchIsInRstrcdUseStock            = ' '
                                                                                  and _BatchRestrictionStatus.BatchRestrictionStatus = 'U'
                                                                                )
  association [0..*] to I_BatchPlant              as _BatchPlant              on  $projection.Material = _BatchPlant.Material
                                                                              and $projection.Batch    = _BatchPlant.Batch
{
      @ObjectModel.foreignKey.association: '_Material'
      @Consumption.valueHelpDefinition: [
          { entity:  { name:    'I_MaterialStdVH',
                       element: 'Material' }
          }]
  key matnr                                                    as Material,
  key charg                                                    as Batch,

      lvorm                                                    as BatchIsMarkedForDeletion,

      zustd                                                    as MatlBatchIsInRstrcdUseStock,
      @ObjectModel.foreignKey.association: '_Supplier'
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Supplier_VH',
                     element: 'Supplier' }
        }]
      lifnr                                                    as Supplier,
      licha                                                    as BatchBySupplier,
      @ObjectModel.foreignKey.association: '_CountryOfOrigin'
      herkl                                                    as CountryOfOrigin,
      @ObjectModel.foreignKey.association: '_RegionOfOrigin'
      herkr                                                    as RegionOfOrigin,

      verab                                                    as MatlBatchAvailabilityDate,
      vfdat                                                    as ShelfLifeExpirationDate,
      hsdat                                                    as ManufactureDate,
      qndat                                                    as NextInspectionDate,
      lwedt                                                    as LastGoodsReceiptDate,
      cast(fvdt1 as batch_date_for_free_use_1 preserving type) as FreeDefinedDate1,
      cast(fvdt2 as batch_date_for_free_use_2 preserving type) as FreeDefinedDate2,
      cast(fvdt3 as batch_date_for_free_use_3 preserving type) as FreeDefinedDate3,
      cast(fvdt4 as batch_date_for_free_use_4 preserving type) as FreeDefinedDate4,
      cast(fvdt5 as batch_date_for_free_use_5 preserving type) as FreeDefinedDate5,
      cast(fvdt6 as batch_date_for_free_use_6 preserving type) as FreeDefinedDate6,
      zfdat                                                    as BatchCertificationDate,

      @Semantics.systemDateTime.createdAt: true
      case when creation_datetime = 0 or creation_datetime is null then cast(dats_tims_to_tstmp(ersda, cast('000000' as tims), 'UTC', $session.client, 'NULL') as lobm_created_on)
      else  creation_datetime end                              as CreationDateTime,
      @Semantics.systemDateTime.lastChangedAt: true
      case when lastchange_datetime = 0 or creation_datetime is null then cast(dats_tims_to_tstmp(laeda, cast('000000' as tims), 'UTC', $session.client, 'NULL') as lobm_last_changed)
      else  lastchange_datetime end                            as LastChangeDateTime,

      cuobj_bm                                                 as ClfnObjectInternalID,
      batch_id                                                 as BatchExtWhseMgmtInternalId,
      sgt_scat                                                 as StockSegment,
      mtver                                                    as ExportAndImportProductGroup,

      _Material,
      _Supplier,
      _BusinessPartnerSupplier,
      _CountryOfOrigin,
      _RegionOfOrigin,
      _Product,
      _BatchRestrictionStatus,
      _BatchPlant
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"MCH1"
],
"ASSOCIATED":
[
"I_BATCHPLANT",
"I_BATCHRESTRICTIONSTATUS",
"I_BUSINESSPARTNERSUPPLIER",
"I_COUNTRY",
"I_MATERIAL",
"I_PRODUCT",
"I_REGION",
"I_SUPPLIER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/