Skip to Content

BAPI_PBSRVAPS_GETDETAIL2 alternative for Planning Area Level

Feb 09, 2017 at 04:42 PM


avatar image


I am writing a program and trying to retrieve key figure information from a given planning area.

I was able to find a little success by using BAPI_PBSRVAPS_GETDETAIL2. It retrieved exactly the key values sought after. However - I want to be able to access this information at planning area level (through code). I know that the data will be the same whatever planning book is used but the user may not know an appropriate planning book and view- so being able to retrieve the information just from Planning Area and Version is a must.

Is there an alternative to this BAPI to achieve the desired results? Or is there a way to somehow use the BAPI knowing only the Planning area initially?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member
Feb 10, 2017 at 02:51 PM

Hello Benjamin,

Sorry but I didn't understand the problem statement. Keyfigure values (for a version) which are displayed in the planning book will remain the same in every planning book for that particular planning area. Kindly elaborate your business requirements in detail.



10 |10000 characters needed characters left characters exceeded
Benjamin Allsopp Mar 06, 2017 at 04:49 PM

Basically I need key figures for a planning area.

However I do not know the planning book - which makes BAPI_PBSRVAPS_GETDETAIL2 useless as you need to pass in a planning book for it to work.

I was able to use /SAPAPO/TS_DM_GET to retrieve the key figures I need however this does not give me the data against calender week and calender year which is essential for my later calculations.

So I either need to know how to use BAPI_PBSRVAPS_GETDETAIL2 without passing in a planning book

or -

be able to convert date to calendar month…for instance 30.01.2017 comes under calendar month 02.2017. There doesn’t seem to be a way to access the calendar month from a date?? I can't just take the month as in this instance it would give me 01.2017 which is not what the APO classes it as.

any ideas?

10 |10000 characters needed characters left characters exceeded