cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PBSRVAPS_GETDETAIL2 alternative for Planning Area Level

benjamin_allsopp
Active Participant
0 Kudos

Hi,

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Cheers,

Sonali

Answers (1)

Answers (1)

benjamin_allsopp
Active Participant
0 Kudos

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?