Skip to Content

SAP IBP: Having multiple Key Figures in oData Query

Hello IBP Experts,

I am referring help document at:

https://help.sap.com/viewer/feae3cea3cc549aaa9d9de7d363a83e6/1808/en-US/75eb06fce53b4d42bf95cc96fe553581.html

to build an oData URL to extract IBP data applying certain filters including: KF_FILTER.

My question is how do I apply multiple KF_FILTER. I need to apply filter for multiple key figures having non-zero values.

Example Syntax I tried is(to exclude zeros):

KF_FILTER eq '[{"KF":"FINALCONSENSUSDEMAND","SIGN":"E","OPERATOR":"EQ","IS_ABSOLUTE":"X","VALUE":"0"}, {"KF":"FINALCONSENSUSDEMAND","SIGN":"E","OPERATOR":"EQ","IS_ABSOLUTE":"X","VALUE":"0"}]'

But this still returns all zeros.

I do have other filter criterias as well in my URL as mentioned on SAP help page.

Any help is greatly appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Sep 21, 2018 at 05:52 AM

    Hi,

    can you try this example?

    KF_FILTER eq '[{"KF":"FINALCONSENSUSDEMAND","SIGN":"I","OPERATOR":"GT","IS_ABSOLUTE":"X","VALUE":"0"}]'

    Sample code:

    https://YOUR SERVER-api/sap/opu/odata/IBP/EXTRACT_SRV/extract_kf?$filter=BUSINESS_USER eq 'YOUR BUSINESS USER' and PLAREA eq 'YOUR PLANNING AREA' and CONVERSION_ATTRIBUTES eq '[{"ATTRIBUTE":"UOMTOID","VALUE":"KG"},{"ATTRIBUTE":"CURRTOID","VALUE":"USD"}]' and KF_IN eq 'FINALCONSENSUSDEMAND,DELIVQTY' and PERIOD_FILTER_VALUE eq 'JAN 2016' and KF_FILTER eq '[{"KF":"FINALCONSENSUSDEMAND","SIGN":"I","OPERATOR":"GT","IS_ABSOLUTE":"X","VALUE":"12"}]' and ATTR_IN eq 'BRAND,PERIODID3,PRDDESCR' and VERSIONS eq '[{"VERSION_NAME":"YOUR VERSION","SCENARIO_NAME":""}]' and SORT_BY eq '[{"SORT_BY":"ATTRIBUTES","SORT_TYPE":"DESCENDING"}]'saml2=disabled

    Best Regards,

    Lingaiah

    Add a comment
    10|10000 characters needed characters exceeded

    • Thank you Lingaiah for the response...

      I think, I was not very clear in my question earlier.

      I am more looking for how to add multiple filter criterias in my query, however, I don't know the syntax for multiple KF_FILTER and SAP help page shows the syntax for only 1 filter. So, I am not even sure if I can apply multiple filters in the query.

      When I write multiple filters like:

      KF_FILTER eq '[{"KF":"IFINQTY","SIGN":"E","OPERATOR":"EQ","IS_ABSOLUTE":"X","VALUE":"0"},{"KF":"IREVSHIPQTYACT","SIGN":"E","OPERATOR":"EQ","IS_ABSOLUTE":"X","VALUE":"0"}]'

      The first key figure filter is applied correctly, however the second one does not seem to be working and it returns zeros as well.

      Appreciate any help...

      Thanks,

      Shetul

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.