cancel
Showing results for 
Search instead for 
Did you mean: 

Pulling data from API- FAA_ASSET_DEPRECIATION_LIST_SRV

amrita_goswami
Participant
0 Kudos
318

Hi All,

We need to pull the Planned depreciation values from S/4 into SAC. We are using S/4 on Premise - S4CORE 107.

The API FAA_ASSET_DEPRECIATION_LIST_SRV has been activated for this purpose. This API has an entity set - C_FixedAssetDepreciationListResults. The corresponding CDS view (C_FixedAssetDepreciationListResults) shows the data for the parameters P_LedgerFiscalYear='2023', P_FiscalPeriod='012'

However when I try to test the API in SAP Gateway it gives an error - ">Invalid key predicate.

The URI I used in SAP Gateway is:

/sap/opu/odata/sap/FAA_ASSET_DEPRECIATION_LIST_SRV/C_FixedAssetDepreciationListResults(P_LedgerFiscalYear='2023',P_FiscalPeriod='012')/Results?$select=CompanyCode,AssetClass,FiscalPeriod,DueAmountInDisplayCrcy,AmountInDisplayCurrency,AssetProfitCenter,AssetCostCenter$filter=AssetAccountingKeyFigureSet eq 'DEPR_TOTAL'

I have tried other variants of this uri like:

/sap/opu/odata/sap/FAA_ASSET_DEPRECIATION_LIST_SRV/C_FixedAssetDepreciationListResults(P_LedgerFiscalYear='2023',P_FiscalPeriod='012')/Results?
/sap/opu/odata/sap/FAA_ASSET_DEPRECIATION_LIST_SRV/C_FixedAssetDepreciationListResults(P_LedgerFiscalYear='2023',P_FiscalPeriod='012')

But none of this is working.

Has anyone had any success in writing an Odata query on this API to extract data from S/4 ?

TIA

Amrita

MarkSargent
Explorer
0 Kudos
Did you ever solve this?
View Entire Topic
MarkSargent
Explorer
0 Kudos

I notice that you missed out the P_KeyDate parameter.

In general, if anyone can support with how to set up an ODataService based on a CDS View with parameters so that it can be consumed via an import job in SAC I'd much appreciate it.

Thanks!