C_RecipeAnalysis

DDL: C_RECIPEANALYSIS SQL: CRCPANALYSIS Type: view CONSUMPTION

Recipe Analysis - By Source

C_RecipeAnalysis is a Consumption CDS View that provides data about "Recipe Analysis - By Source" in SAP S/4HANA. It reads from 2 data sources (I_RcpWhereUsedAnlysForKeyDate, R_RecipeWithPrimaryOutput) and exposes 54 fields with key fields RecipeFinderCacheUUID, RecipeFinderCacheLineUUID. It has 14 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_RcpWhereUsedAnlysForKeyDate I_RcpWhereUsedAnlysForKeyDate from
R_RecipeWithPrimaryOutput R_RecipeWithPrimaryOutput inner

Parameters (1)

NameTypeDefault
P_KeyDate sydate

Associations (14)

CardinalityTargetAliasCondition
[0..1] C_RecipeFinderPlantValueHelp _PlantVH $projection.Plant = _PlantVH.Plant
[0..1] I_ProductVH _Product $projection.Material = _Product.Product
[0..1] I_SpecIdfrBscForKeyDate _Identifier $projection.SpecificationInternalID = _Identifier.SpecificationInternalID
[0..1] I_SpecIdfrBscForKeyDate _PrimaryOutputIdentifier $projection.RecipePrimaryOutputInternalID = _PrimaryOutputIdentifier.SpecificationInternalID
[0..1] I_CalendarDate _RcpValidityStartDate rcp.RecipeValidityStartDate = _RcpValidityStartDate.CalendarDate
[0..1] I_CalendarDate _RecipeValidityEndDate rcp.RecipeValidityEndDate = _RecipeValidityEndDate.CalendarDate
[0..*] I_RecipeTypeText _RecipeTypeText $projection.RecipeType = _RecipeTypeText.RecipeType
[0..*] I_RecipeStatusText _RecipeStatusText $projection.RecipeStatus = _RecipeStatusText.RecipeStatus
[0..*] I_RecipeAuthorizationGroupText _RecipeAuthorizationGroupText $projection.RecipeAuthorizationGroup = _RecipeAuthorizationGroupText.RecipeAuthorizationGroup
[0..*] I_RecipePurposeText _RecipePurposeText $projection.RecipePurpose = _RecipePurposeText.RecipePurpose
[0..*] I_SpecTypeText _RecipePOSpecTypeText $projection.RecipePrimOutpSpecType = _RecipePOSpecTypeText.SpecificationType
[0..1] C_RecipeIngredientMaterialVH _RecipePOMaterialVH $projection.RecipePrimaryOutputMaterial = _RecipePOMaterialVH.RecipeIngredientMaterial
[0..1] C_RecipePrimOutputSpecTypeVH _RecipePrimOutputSpecTypeVH $projection.RecipePrimOutpSpecType = _RecipePrimOutputSpecTypeVH.SpecificationType
[1..1] E_Recipe _Extension $projection.RecipeUUID = _Extension.RecipeUUID

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CRCPANALYSIS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
Consumption.dbHintsCalculatedBy ABAP:/PLMB/CL_RCA_WU_DB_HINTS view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MASTER view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view
Search.searchable false view
Consumption.filter.businessDate.at true view
EndUserText.label Recipe Analysis - By Source view

Fields (54)

KeyFieldSource TableSource FieldDescription
KEY RecipeFinderCacheUUID finder_cache RecipeFinderCacheUUID
KEY RecipeFinderCacheLineUUID finder_cache RecipeFinderCacheLineUUID
RecipeUUID finder_cache RecipeUUID Recipe GUID
SourceRecipeUUID finder_cache SourceRecipeUUID Recipe GUID
RecipeUniqueID rcp RecipeUniqueID
RecipeDescription
Recipe rcp Recipe
RecipeType rcp RecipeType
RecipeStatus rcp RecipeStatus
RecipeAuthorizationGroup rcp RecipeAuthorizationGroup Authorization Group
Plant
RecipePurpose rcp RecipePurpose
RecipeCreatedByUser rcp RecipeCreatedByUser
CreatedByUserName Created By User Name
RecipeLastChangedByUser rcp RecipeLastChangedByUser
LastChangedByUserName Last Changed By User Name
RecipeValidityStartDate rcp RecipeValidityStartDate
RecipeValidityEndDate rcp RecipeValidityEndDate
RecipePrimaryOutputInternalID rcp RecipePrimaryOutputInternalID
RecipePrimaryOutput
RecipePrimaryOutputDesc
RecipeVersionNumber rcp RecipeVersionNumber
RecipeAlternativeNumber rcp RecipeAlternativeNumber
Material finder_cache Material Vehicle Model
Specification finder_cache Specification Specification
SpecificationInternalID finder_cache SpecificationInternalID Specification
RecipeFinderSearchItem finder_cache RecipeFinderSearchItem
RecipeFinderSearchItemDesc
RcpWhereUsedResultTotQtyInPct
RecipeFinderSrchItmIsUsdAsDesc
NumberOfRecipes
RecipePrimaryOutputMaterial RecipePrimaryOutputMaterial
RecipePrimOutputMaterialName RecipePrimOutputMaterialName
RecipePrimOutpSubstNatr RecipePrimOutpSubstNatr
RecipePrimOutpSubstNatrDesc RecipePrimOutpSubstNatrDesc
RecipePrimOutpSpecType RecipePrimOutpSpecType
_PlantVH _PlantVH
_RecipeTypeText _RecipeTypeText
_RecipeStatusText _RecipeStatusText
_RecipeAuthorizationGroupText _RecipeAuthorizationGroupText
_RecipePurposeText _RecipePurposeText
_PrimaryOutputSpecification rcp _PrimaryOutputSpecification
_LogAccMObjectTypeActive rcp _LogAccMObjectTypeActive
_LogAccMObjectUserAuthzn rcp _LogAccMObjectUserAuthzn
_LogAccMObjSecureIDAssgmt rcp _LogAccMObjSecureIDAssgmt
_RecipeForKeyDate _RecipeForKeyDate
_SourceRecipeForKeyDate _SourceRecipeForKeyDate
_Product _Product
_Specification _Specification
_RecipePOSpecTypeText _RecipePOSpecTypeText
_RecipePOMaterialVH _RecipePOMaterialVH
_RecipePrimOutputSpecTypeVH _RecipePrimOutputSpecTypeVH
SourceRecipe
SourceRecipeDescription

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_RecipeAnalysis.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CRCPANALYSIS
-- Parameters: P_KeyDate : sydate

CREATE VIEW C_RecipeAnalysis AS
SELECT
  finder_cache.RecipeFinderCacheUUID AS RecipeFinderCacheUUID,
  finder_cache.RecipeFinderCacheLineUUID AS RecipeFinderCacheLineUUID,
  finder_cache.RecipeUUID AS RecipeUUID,
  finder_cache.SourceRecipeUUID AS SourceRecipeUUID,
  rcp.RecipeUniqueID AS RecipeUniqueID,
  rcp._RecipeDescription[1:Language = $session.system_language].RecipeDescription AS RecipeDescription,
  rcp.Recipe AS Recipe,
  rcp.RecipeType AS RecipeType,
  rcp.RecipeStatus AS RecipeStatus,
  rcp.RecipeAuthorizationGroup AS RecipeAuthorizationGroup,
  cast( coalesce( rcp._Plant.Plant, '' ) as /plmb/werks_d ) AS Plant,
  rcp.RecipePurpose AS RecipePurpose,
  rcp.RecipeCreatedByUser AS RecipeCreatedByUser,
  rcp._CreatedByUser.UserDescription AS CreatedByUserName,
  rcp.RecipeLastChangedByUser AS RecipeLastChangedByUser,
  rcp._LastChangedByUser.UserDescription AS LastChangedByUserName,
  rcp.RecipeValidityStartDate AS RecipeValidityStartDate,
  rcp.RecipeValidityEndDate AS RecipeValidityEndDate,
  rcp.RecipePrimaryOutputInternalID AS RecipePrimaryOutputInternalID,
  cast(rcp._PrimaryOutputSpecification(P_KeyDate:$parameters.P_KeyDate).Specification as /plmb/rcp_prim_output_id preserving type ) AS RecipePrimaryOutput,
  cast(_PrimaryOutputIdentifier( P_KeyDate : $parameters.P_KeyDate).SpecIdfgDescText as /plmb/rcp_prim_output_text preserving type ) AS RecipePrimaryOutputDesc,
  rcp.RecipeVersionNumber AS RecipeVersionNumber,
  rcp.RecipeAlternativeNumber AS RecipeAlternativeNumber,
  finder_cache.Material AS Material,
  finder_cache.Specification AS Specification,
  finder_cache.SpecificationInternalID AS SpecificationInternalID,
  finder_cache.RecipeFinderSearchItem AS RecipeFinderSearchItem,
  cast( coalesce( _Product._Text[Language=$session.system_language].ProductDescription, _Identifier( P_KeyDate : $parameters.P_KeyDate).SpecIdfgDescText ) as /plmb/rca_calc_item_desc preserving type) AS RecipeFinderSearchItemDesc,
  cast(finder_cache.RecipeWhereUsedResultQtyInPct as /plmb/rca_srch_item_total_per preserving type ) AS RcpWhereUsedResultTotQtyInPct,
  cast(finder_cache._RecipeFinderSrchItmIsUsdAs._Text[Language = $session.system_language].RecipeFinderSrchItmIsUsdAsDesc as /plmb/rca_srch_itm_occrnc_desc) AS RecipeFinderSrchItmIsUsdAsDesc,
  cast(1 as /plmb/rca_number_of_recipes) AS NumberOfRecipes,
  RecipePrimaryOutputMaterial,
  RecipePrimOutputMaterialName,
  RecipePrimOutpSubstNatr,
  RecipePrimOutpSubstNatrDesc,
  RecipePrimOutpSpecType,
  rcp._PrimaryOutputSpecification AS _PrimaryOutputSpecification,
  rcp._LogAccMObjectTypeActive AS _LogAccMObjectTypeActive,
  rcp._LogAccMObjectUserAuthzn AS _LogAccMObjectUserAuthzn,
  rcp._LogAccMObjSecureIDAssgmt AS _LogAccMObjSecureIDAssgmt,
  cast(srcrcp.Recipe as /plmb/source_rcp_id) AS SourceRecipe,
  cast(srcrcp._RecipeDescription[Language = $session.system_language].RecipeDescription as /plmb/source_rcp_desc) AS SourceRecipeDescription
FROM I_RcpWhereUsedAnlysForKeyDate
INNER JOIN R_RecipeWithPrimaryOutput ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN C_RecipeFinderPlantValueHelp AS _PlantVH ON Plant = _PlantVH.Plant  -- association [0..1]
LEFT OUTER JOIN I_ProductVH AS _Product ON Material = _Product.Product  -- association [0..1]
LEFT OUTER JOIN I_SpecIdfrBscForKeyDate AS _Identifier ON SpecificationInternalID = _Identifier.SpecificationInternalID  -- association [0..1]
LEFT OUTER JOIN I_SpecIdfrBscForKeyDate AS _PrimaryOutputIdentifier ON RecipePrimaryOutputInternalID = _PrimaryOutputIdentifier.SpecificationInternalID  -- association [0..1]
LEFT OUTER JOIN I_CalendarDate AS _RcpValidityStartDate ON rcp.RecipeValidityStartDate = _RcpValidityStartDate.CalendarDate  -- association [0..1]
LEFT OUTER JOIN I_CalendarDate AS _RecipeValidityEndDate ON rcp.RecipeValidityEndDate = _RecipeValidityEndDate.CalendarDate  -- association [0..1]
LEFT OUTER JOIN I_RecipeTypeText AS _RecipeTypeText ON RecipeType = _RecipeTypeText.RecipeType  -- association [0..*]
LEFT OUTER JOIN I_RecipeStatusText AS _RecipeStatusText ON RecipeStatus = _RecipeStatusText.RecipeStatus  -- association [0..*]
LEFT OUTER JOIN I_RecipeAuthorizationGroupText AS _RecipeAuthorizationGroupText ON RecipeAuthorizationGroup = _RecipeAuthorizationGroupText.RecipeAuthorizationGroup  -- association [0..*]
LEFT OUTER JOIN I_RecipePurposeText AS _RecipePurposeText ON RecipePurpose = _RecipePurposeText.RecipePurpose  -- association [0..*]
LEFT OUTER JOIN I_SpecTypeText AS _RecipePOSpecTypeText ON RecipePrimOutpSpecType = _RecipePOSpecTypeText.SpecificationType  -- association [0..*]
LEFT OUTER JOIN C_RecipeIngredientMaterialVH AS _RecipePOMaterialVH ON RecipePrimaryOutputMaterial = _RecipePOMaterialVH.RecipeIngredientMaterial  -- association [0..1]
LEFT OUTER JOIN C_RecipePrimOutputSpecTypeVH AS _RecipePrimOutputSpecTypeVH ON RecipePrimOutpSpecType = _RecipePrimOutputSpecTypeVH.SpecificationType  -- association [0..1]
LEFT OUTER JOIN E_Recipe AS _Extension ON RecipeUUID = _Extension.RecipeUUID  -- association [1..1]
;