P_FixedAssetDescription

DDL: P_FIXEDASSETDESCRIPTION SQL: PFXDASSET Type: view CONSUMPTION

Fixed Asset Description

P_FixedAssetDescription is a Consumption CDS View that provides data about "Fixed Asset Description" in SAP S/4HANA. It reads from 1 data source (I_PurCtrAccount) and exposes 12 fields with key fields PurchaseContract, PurchaseContractItem, AccountAssignment. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_PurCtrAccount I_PurCtrAccount from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_PurchasingDocumentItem _PurchasingDocumentItem $projection.PurchaseContract = _PurchasingDocumentItem.PurchasingDocument and $projection.PurchaseContractItem = _PurchasingDocumentItem.PurchasingDocumentItem

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PFXDASSET view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
EndUserText.label Fixed Asset Description view
VDM.private true view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY PurchaseContract PurchaseContract
KEY PurchaseContractItem PurchaseContractItem
KEY AccountAssignment AccountAssignment
MasterFixedAsset MasterFixedAsset
FixedAsset FixedAsset
CompanyCode _PurchasingDocumentItem CompanyCode
PurchasingIsBlockedForSupplier
DocumentCurrency _PurchaseContractItem DocumentCurrency
CreationDate _PurchaseContract CreationDate
DisplayCurrency
PurgDocNetAmount
_FixedAsset _FixedAsset
@AbapCatalog.sqlViewName: 'PFXDASSET'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey
@VDM.viewType: #CONSUMPTION
@EndUserText.label: 'Fixed Asset Description'
@VDM.private: true
define view P_FixedAssetDescription
//  as select from P_ContractItemAcctMntr

//  association [1..1] to I_FixedAsset as _FixedAssetWorklist on  $projection.MasterFixedAsset = _FixedAssetWorklist.MasterFixedAsset

//                                                            and $projection.FixedAsset       = _FixedAssetWorklist.FixedAsset

//                                                            and $projection.CompanyCode      = _FixedAssetWorklist.CompanyCode

//

//{

//  key PurchaseContract,

//  key PurchaseContractItem,

//  key AccountAssignment,

//      MasterFixedAsset,

//      FixedAsset,

//      _FixedAssetWorklist.FixedAssetDescription,

//      CompanyCode,

//      PurchasingIsBlockedForSupplier,

//      DocumentCurrency,

//      CreationDate,

//      DisplayCurrency,

//      PurgDocNetAmount,

//      ProfitabilitySegment

//

//}


  as select from I_PurCtrAccount

  association [0..1] to I_PurchasingDocumentItem  as _PurchasingDocumentItem on  $projection.PurchaseContract     = _PurchasingDocumentItem.PurchasingDocument
                                                                             and $projection.PurchaseContractItem = _PurchasingDocumentItem.PurchasingDocumentItem

{

  key PurchaseContract,

  key PurchaseContractItem,

  key AccountAssignment,
  
  MasterFixedAsset, 
  FixedAsset, 
  _PurchasingDocumentItem.CompanyCode, 
  

      //BLOCKED SUPPLIER

      cast (_PurchaseContract._Supplier.PurchasingIsBlocked as   boolean) as PurchasingIsBlockedForSupplier,   

      @Semantics.currencyCode: true
      _PurchaseContractItem.DocumentCurrency,

      @Semantics.businessDate.at: true
      _PurchaseContract.CreationDate,

      @Semantics.currencyCode: true
      cast (_PurchaseContract._CompanyCode._Currency.Currency as vdm_v_display_currency) as DisplayCurrency,

      @Semantics.amount.currencyCode: 'DocumentCurrency'
      cast ( PurgDocNetAmount as mm_a_target_amount )                                    as PurgDocNetAmount,

      // --------------------------------------------------------------------------------------------------------------

      // Old Logic with Currency Conversion - removed since aggregation is supported without currency conversion

      // --------------------------------------------------------------------------------------------------------------

      //case

      //  when _PurchasingDocumentItem._CompanyCode.Currency <>  _PurchaseContractItem.DocumentCurrency and _PurchasingDocumentItem._CompanyCode.Currency <> ''

      //  then cast ( currency_conversion( amount => PurgDocNetAmount,

      //     source_currency => _PurchaseContractItem.DocumentCurrency,

      //     target_currency =>   _PurchasingDocumentItem._CompanyCode.Currency,

      //     exchange_rate_date => _PurchaseContract.CreationDate  ) as mm_a_target_amount )

      //

      //  else

      //  case when _PurchasingDocumentItem._CompanyCode.Currency = ' ' and _PurchaseContractItem.DocumentCurrency <> ''

      //       then

      //         cast ( currency_conversion( amount => PurgDocNetAmount,

      //                source_currency => _PurchaseContractItem.DocumentCurrency,

      //                target_currency => cast ( 'EUR ' as abap.cuky(5) ),

      //                exchange_rate_date => _PurchaseContract.CreationDate  ) as mm_a_target_amount )

      //       else

      //         cast ( PurgDocNetAmount as mm_a_target_amount )

      //       end

      //end                                                                              as PurgDocNetAmount,


      //Profitability Segment

      case when ProfitabilitySegment_2 = '0000000000'
           then cast(' ' as rkeobjnr_char )
           else
             ProfitabilitySegment_2
           end                                                                           as ProfitabilitySegment, 
           
           //Association          

           _FixedAsset

}

where
      _PurchaseContract.PurchasingDocumentCategory           =  'K'
  and _PurchaseContract.PurchasingDocumentDeletionCode       =  ' '
  and _PurchaseContractItem.PurchasingContractDeletionCode   =  ' '
  and(
    (
      _PurchaseContract.Supplier                             =  ' '
    )
    or(
      _PurchaseContract._Supplier.IsBusinessPurposeCompleted <> 'X'
    )
  )

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_CURRENCY",
"I_PURCHASECONTRACT",
"I_PURCHASECONTRACTITEM",
"I_PURCHASINGDOCUMENTITEM",
"I_PURCTRACCOUNT",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"I_FIXEDASSET",
"I_PURCHASINGDOCUMENTITEM"
],
"BASE":
[
"I_PURCTRACCOUNT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/