cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP IBP: Having multiple Key Figures in oData Query

zsc
Explorer
0 Likes
906

Hello IBP Experts,

I am referring help document at:

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

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.

View Entire Topic
lingaiahvanam
SAP Champion
SAP Champion
0 Likes

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

zsc
Explorer
0 Likes

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