cancel
Showing results for 
Search instead for 
Did you mean: 

Error in BAPI_PBSRVAPS_GETDETAIL

Former Member
0 Kudos

Hi Gurus,

While testing BAPI_PBSRVAPS_GETDETAIL2 i am getting error " No valid plannig area could be determine for planning book"

i am passing only these values:

plannin book , selection_id and period.

Thanks in advance.

Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Paramvir,

i had the same issue ... finally it was an authorization issue ... maybe tracing helps you to identify missing objects.

hope this helps,

maawdee

Former Member
0 Kudos

Hi ,

Could you please tell me the minimum parameters we need to pass in bapi BAPI_PBSRVAPS_GETDETAIL.

Thanks

Former Member
0 Kudos

Hi,

You can check that in teh documentation of the BAPI itself from txn SE37. If it is mentioned as optional then it is optional rest all are mandatory.

For your convenience I am giving the essential ones here.

Planning Book

Data View

Selection ID or use teh Selection Table

Period Type - A -Date, B- Week, C-Month

Start Date - Should be a date/week/month based on what you selected in Period Type

End Date - Should be a date/week/month based on what you selected in Period Type

Key Figure Selection

Characteristic Selection

Grouping Table.

This should give you a result.

Hope this helps.

Thanks

Mani Suresh

Former Member
0 Kudos

Hi Mani,

Does this Bapi give me the value of key figure which we are giving in KEY_FIGURE_SELECTION.

Thanks

Former Member
0 Kudos

Hi,

Yes it does. The value is returned in the table KEY_FIGURE_VAL. Another suggestion is pls use BAPI_PBSRVAPS_GETDETAIL2 BAPI instead of the one you have suggested. It has marked advantages over the older version.

Hope this helps.

Thanks

Mani Suresh

Former Member
0 Kudos

HI Mani,

There is no table with name KEY_FIGURE_VALUE .

Table KEY_FIGURE_SELECTION is there

Thanks

Former Member
0 Kudos

Hi Paramvir,

If I remember correct, this is the parameters for the BAPI


CALL FUNCTION 'BAPI_PBSRVAPS_GETDETAIL2'
EXPORTING
planningbook = p_plnbk
data_view = p_datvw
planning_version = '000'
selection_id = 'ALL-SKU'
read_options = w_read_opt
period_type = 'B'
date_from = '012001'
date_to = '012011'
TABLES
group_by = i_groupby
key_figure_selection = i_keyfig_sel
key_figure = i_keyfig
key_figure_value = i_keyfig_val
characteristics_combination = i_char_comb
return = i_return.

I think we have discussed the parametrs part already. In the tables

group_by, key_figure_selection are input tables.

key_figure --> This tables returns the Key figure to Charactersitic Combination mapping

key_figure_value --> This table returns the Key figure value for every key figure for every time period as separate entries.

Characteristic_combination --> This table returns the charactersitic combination.

So again, what exactly are you trying to achieve, may be we have the solution in front of us but are not seeing it.

Rgds

Mani Suresh

Former Member
0 Kudos

HI Mani,

First of all thanks for your reply .

i m in APO 3.1

so i am using only : BAPI_PBSRVAPS_GETDETAIL not BAPI_PBSRVAPS_GETDETAIL2

In BAPI_PBSRVAPS_GETDETAIL

we have only

Import

PLANNINGBOOK

DATA_VIEW

SELECTION_ID

PERIOD_TYPE

DATE_FROM

DATE_TO

LOGICAL_SYSTEM

BUSINESS_SYSTEM_GROUP

SOURCE_PARTNER

TARGET_PARTNER

Tables

SELECTION

GROUP_BY

KEY_FIGURE_SELECTION

TIME_SERIES

TIME_SERIES_ITEM

CHARACTERISTICS_COMBINATION

RETURN

EXTENSION_IN

EXTENSION_OUT

Plz help me on this .

Former Member
0 Kudos

Hi,

In this case

TIME_SERIES internal table contains the relation ship between Key Figure and Characteristic Combination.

TIME_SERIES_ITEM internal table contains the data values for Key Figure's various time periods.

Hope this helps.

Thanks

Mani Suresh

Former Member
0 Kudos

HI Mani ,

Thanks your inputs are useful for me.

I want key figure value on base of Product NO..

Is there any options where we can mention our product no.

Thanks

Former Member
0 Kudos

Hi paramvir,

Parameter selection_id is used for this purpose.

you can create a selection id with the necessary filter conditions and pass it to the parameter selection_id in the BAPI.

That should do it for you.

Hope this helps.

Thanks

Mani Suresh

Former Member
0 Kudos

HI Mani ,

In Selection Id i am passing the value of selectio id only. How can i pass the product no. there ?

Regards

Former Member
0 Kudos

Paramvir,

A selection id contains a selection. I guess your product no. is your selection. So you need to create a selection id with your product number in the selection and then pass that selection id to the parameter.

Thanks

Mani Suresh

Former Member
0 Kudos

Hi Mani,

Thanks for your reply.

In my selection id i have multiple products. How can i see one particular key fig. value against each product in the Bapi o/p

Regards

Former Member
0 Kudos

Here is how!

Go to the characterisic_combination table. Check the number against your product no.

Take this number to time_series table and pick the KF number from there.

Take this KF number to the time_series_value table and look up for this value as the key. All values relating to this key are the values for the various time periods.

For Example, it will look something like this.

Characteristic Combination

10 | Product No. | P12

Time Series

25 | 10 | Key Figure Name

Time Series Values

15 | Time Period | Value

Hope this helps.

Thanks

Mani

Former Member
0 Kudos

HI

Could you please tell me the tables name .

Regards