P_AssetCompanyCode

DDL: P_ASSETCOMPANYCODE Type: view BASIC

P_AssetCompanyCode is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (faat_cmp, P_TF_AssetRedesignSwitchStatus, P_TF_AssetRedesignSwitchStatus, t093c) and exposes 3 fields with key field CompanyCode.

Data Sources (4)

SourceAliasJoin Type
faat_cmp faat_cmp union_all
P_TF_AssetRedesignSwitchStatus P_TF_AssetRedesignSwitchStatus inner
P_TF_AssetRedesignSwitchStatus P_TF_AssetRedesignSwitchStatus inner
t093c t093c from

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PASSETCOMPCODE view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #BASIC view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode bukrs
IsActiveXkeycomp_codeasCompanyCode
ChartOfDepreciation
@AbapCatalog: { sqlViewName: 'PASSETCOMPCODE', preserveKey: true, compiler.compareFilter: true }
@VDM.viewType: #BASIC
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #NOT_REQUIRED

define view P_AssetCompanyCode
  as select from t093c
    inner join   P_TF_AssetRedesignSwitchStatus( P_SAPClient : $session.client ) on P_TF_AssetRedesignSwitchStatus.IsActive = ''
{
  key bukrs as CompanyCode,
  
      afapl as ChartOfDepreciation
}

union all select from faat_cmp
  inner join          P_TF_AssetRedesignSwitchStatus( P_SAPClient : $session.client ) on P_TF_AssetRedesignSwitchStatus.IsActive = 'X'
{
  key comp_code         as CompanyCode,
  
      /* Chart of depreciation cannot be derived from company code any longer */
      cast('' as afapl) as ChartOfDepreciation
}