C_BOMCreateForUI

DDL: C_BOMCREATEFORUI Type: view_entity CONSUMPTION Package: CS_MODEL

Consumption view for Create BOM scenario

C_BOMCreateForUI is a Consumption CDS View that provides data about "Consumption view for Create BOM scenario" in SAP S/4HANA. It reads from 2 data sources (P_BillOfMaterialHeader, I_BOMModificationParameters) and exposes 30 fields with key fields BOMApplicationArea, BillOfMaterial, BillOfMaterialCategory, BillOfMaterialVariant, BillOfMaterialVersion. It has 1 association to related views. Part of development package CS_MODEL.

Data Sources (2)

SourceAliasJoin Type
P_BillOfMaterialHeader bomBO union_all
I_BOMModificationParameters I_BOMModificationParameters from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_BillOfMaterialUsage _BillOfMaterialVariantUsage $projection.BillOfMaterialVariantUsage = _BillOfMaterialVariantUsage.BillOfMaterialVariantUsage and _BillOfMaterialVariantUsage.Language = $session.system_language

Annotations (8)

NameValueLevelField
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Consumption view for Create BOM scenario view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.updateEnabled true view

Fields (30)

KeyFieldSource TableSource FieldDescription
KEY BOMApplicationArea BOMApplicationArea
KEY BillOfMaterial
KEY BillOfMaterialCategory
KEY BillOfMaterialVariant Selected Alternative
KEY BillOfMaterialVersion Version
KEY EngineeringChangeDocument Change Number
KEY Material Material
KEY Plant Plant
BillOfMaterialVariantUsage BOM Usage
BillOfMaterialVariantUsageDesc
BillOfMaterialVariantForEdit Alternative
EngineeringChangeDocForEdit Change Number
PlantForEdit Plant
HeaderValidityStartDate Valid From
ChangeRecord
KEY BillOfMaterial
KEY BillOfMaterialCategory P_BillOfMaterialHeader BillOfMaterialCategory
KEY BillOfMaterialVariant P_BillOfMaterialHeader BillOfMaterialVariant
KEY BillOfMaterialVersion P_BillOfMaterialHeader BillOfMaterialVersion
KEY EngineeringChangeDocument P_BillOfMaterialHeader EngineeringChangeDocument
KEY Material P_BillOfMaterialHeader Material
KEY Plant P_BillOfMaterialHeader Plant
BillOfMaterialVariantUsage P_BillOfMaterialHeader BillOfMaterialVariantUsage
BillOfMaterialVariantUsageDesc _BillOfMaterialVariantUsage BillOfMaterialVariantUsageDesc
BillOfMaterialVariantForEdit
EngineeringChangeDocForEdit
PlantForEdit
HeaderValidityStartDate
ChangeRecord
BOMComponentCopyIsRequired
@Metadata.ignorePropagatedAnnotations: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Consumption view for Create BOM scenario'
@ObjectModel.usageType: {serviceQuality: #X, sizeCategory: #XL,dataClass:#MIXED}
@ObjectModel.action: [{enabled: true}]
//@Search.searchable: true

@ObjectModel.updateEnabled: true
define view entity C_BOMCreateForUI as select from I_BOMModificationParameters

{    
    @UI.hidden: true
    key BOMApplicationArea, 
    
    @UI.hidden: true
    key cast('        ' as char8 preserving type ) as BillOfMaterial,
    
    @UI.hidden: true
    key cast(' ' as stlty preserving type ) as BillOfMaterialCategory,
    
    @EndUserText.label:'Selected Alternative'
    key cast('  ' as stlal preserving type ) as BillOfMaterialVariant,
    
    @EndUserText.label:'Version'
    key cast('    ' as cs_versn preserving type ) as BillOfMaterialVersion, 
    
    @Consumption.valueHelpDefinition: [
    { entity:  { name:    'I_CHANGEMASTERSTDVH',
                     element: 'ChangeNumber' }
    }]
    @EndUserText.label:'Change Number'
    key cast('            ' as aennr preserving type )  as EngineeringChangeDocument,  
  
    @Consumption.valueHelpDefinition: [
         { entity:  { name:    'C_BOMMaterialVH',
                     element: 'Material' }
    }]    
    @EndUserText.label:'Material'
    key cast('                                        ' as matnr preserving type) as Material,
    
    @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PlantStdVH',     
                     element: 'Plant' }
    }]
    @EndUserText.label:'Plant'
    key cast('    ' as werks_d preserving type ) as Plant,
    
    @EndUserText.label:'BOM Usage' 
    @Consumption.valueHelpDefinition: [
         { entity:  { name:    'I_BillOfMaterialUsage',
                     element: 'BillOfMaterialVariantUsage' }
    }]
    @UI.textArrangement: #TEXT_LAST
    @ObjectModel.text.element: [ 'BillOfMaterialVariantUsageDesc' ]
    cast(' ' as stlan preserving type ) as BillOfMaterialVariantUsage,
    @Semantics.text: true
    cast(' ' as antxt ) as BillOfMaterialVariantUsageDesc,
    
    @EndUserText.label:'Alternative'
    cast('  ' as stlal preserving type ) as BillOfMaterialVariantForEdit,

    @Consumption.valueHelpDefinition: [
    { entity:  { name:    'I_CHANGEMASTERSTDVH',
                     element: 'ChangeNumber' }
    }]
    @EndUserText.label:'Change Number'    
    cast('            ' as aennr preserving type )  as EngineeringChangeDocForEdit,
    
    @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PlantStdVH',     
                     element: 'Plant' }
    }]
    @EndUserText.label:'Plant'
    cast('    ' as werks_d preserving type ) as PlantForEdit,
    
        
    @EndUserText.label:'Valid From'
    $session.system_date as HeaderValidityStartDate,

    @Consumption.valueHelpDefinition: [
      { distinctValues: true,
        entity:  { name:    'C_MngUnassgdEngBOMChgRecd',
                   element: 'ChangeRecord' }
      }]
     @UI.hidden: true 
     cast('                    ' as /plmb/cr_id preserving type) as ChangeRecord,
     
      @EndUserText.label:'Copy Items'
      cast('X' as boolean preserving type) as BOMComponentCopyIsRequired
      
}

union all select from P_BillOfMaterialHeader as bomBO 
  association [1..1] to I_BillOfMaterialUsage  as _BillOfMaterialVariantUsage on  $projection.BillOfMaterialVariantUsage = _BillOfMaterialVariantUsage.BillOfMaterialVariantUsage
                                                                              and _BillOfMaterialVariantUsage.Language   = $session.system_language
{    
    key cast('  ' as agb29 preserving type ) as BOMApplicationArea, 
    
    key cast(bomBO.BillOfMaterial as char8 preserving type ) as BillOfMaterial,
    
    key bomBO.BillOfMaterialCategory,
    
    key bomBO.BillOfMaterialVariant,
    
    key bomBO.BillOfMaterialVersion,
    
    key bomBO.EngineeringChangeDocument,
    
    key bomBO.Material,
    
    key bomBO.Plant,    
        
    bomBO.BillOfMaterialVariantUsage,
    _BillOfMaterialVariantUsage.BillOfMaterialVariantUsageDesc,    
    cast('  ' as stlal preserving type ) as BillOfMaterialVariantForEdit,
    
    cast('            ' as aennr preserving type )  as EngineeringChangeDocForEdit,  
    
    cast('    ' as werks_d preserving type ) as PlantForEdit,  
    
    $session.system_date as HeaderValidityStartDate,


    cast('                    ' as /plmb/cr_id preserving type) as ChangeRecord,
     
    cast('X' as boolean preserving type) as BOMComponentCopyIsRequired
    
}