C_BOMCreateForUI

DDL: C_BOMCREATEFORUI SQL: CBOMCREATE Type: view CONSUMPTION

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.

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 (11)

NameValueLevelField
AbapCatalog.sqlViewName CBOMCREATE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey 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
ClientHandling.algorithm #SESSION_VARIABLE 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 Selected Alternative
KEY BillOfMaterialVersion P_BillOfMaterialHeader BillOfMaterialVersion Version
KEY EngineeringChangeDocument P_BillOfMaterialHeader EngineeringChangeDocument Change Number
KEY Material P_BillOfMaterialHeader Material Material
KEY Plant P_BillOfMaterialHeader Plant Plant
BillOfMaterialVariantUsage P_BillOfMaterialHeader BillOfMaterialVariantUsage BOM Usage
BillOfMaterialVariantUsageDesc _BillOfMaterialVariantUsage BillOfMaterialVariantUsageDesc
BillOfMaterialVariantForEdit Alternative
EngineeringChangeDocForEdit Change Number
PlantForEdit Plant
HeaderValidityStartDate Valid From
ChangeRecord
BOMComponentCopyIsRequired Copy Items
@AbapCatalog.sqlViewName: 'CBOMCREATE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: 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
@ClientHandling.algorithm : #SESSION_VARIABLE
define view 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
{    
    @UI.hidden: true
    key cast('  ' as agb29 preserving type ) as BOMApplicationArea, 
    
    @UI.hidden: true
    key cast(bomBO.BillOfMaterial as char8 preserving type ) as BillOfMaterial,
    
    @UI.hidden: true
    key bomBO.BillOfMaterialCategory,
    
    @EndUserText.label:'Selected Alternative'
    key bomBO.BillOfMaterialVariant,
    
    @EndUserText.label:'Version'
    key bomBO.BillOfMaterialVersion,
    
    @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_CHANGEMASTERSTDVH',
                     element: 'ChangeNumber' }
    }]    
    @EndUserText.label:'Change Number'
    key bomBO.EngineeringChangeDocument,
    
    @Consumption.valueHelpDefinition: [
         { entity:  { name:    'C_BOMMaterialVH',
                     element: 'Material' }
    }]    
    @EndUserText.label:'Material'
    key bomBO.Material,
    
    @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PlantStdVH',     
                     element: 'Plant' }
    }]
    @EndUserText.label:'Plant'
    key bomBO.Plant,    
        
    @EndUserText.label:'BOM Usage' 
    @Consumption.valueHelpDefinition: [
         { entity:  { name:    'I_BillOfMaterialUsage',
                     element: 'BillOfMaterialVariantUsage' }
    }]
    @ObjectModel.text.element: [ 'BillOfMaterialVariantUsageDesc' ]
    @UI.textArrangement: #TEXT_LAST
    bomBO.BillOfMaterialVariantUsage,
    @Semantics.text: true
    _BillOfMaterialVariantUsage.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
    
}    

    


/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLOFMATERIALUSAGE",
"I_BOMMODIFICATIONPARAMETERS",
"P_BILLOFMATERIALHEADER"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/