cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PBSRVAPS_GETDETAIL2 with empty return

Former Member
0 Kudos

Hi experts,

I am trying to use BAPI BAPI_PBSRVAPS_GETDETAIL2 in order to obtain values of the keyfigure Forecast (registered in the planning table of SNP module) for a set of product-location pairs. However the return of the BAPI is empty (although when I access the planning table I can see all values registered). Someone could tell me what am I doing wrong?

In more detail, I am using the following parameters:

PLANNINGBOOK

=

EXAMPLE_PB (EXAMPLE_PB is a copy of 9ASNP94 planning book)

DATA_VIEW

=

EXAMPLE_DV (EXAMPLE_DV is a copy of SNP94(1) data view)

PLANNING_VERSION

=

PV (PV is a planning version that I created)

SELECTION_ID

=

I don't fill this field because I don't know how to use it

PERIOD_TYPE

=

I don't fill this field (although, in my case, the period type is monthly)

DATE_FROM

=

I don't fill this field because I want values of all periods (36 months)

|DATE_TO|=| I don't fill this field because I want values of all periods (36 months)|

I am using the version 5.0 of SCM.

Thanks in advance for help.

Greetings,

Francisco Fonseca.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Fransico,

Babu's comment in on the money. I think however to make this bapi work with an snp planning area you need to include both the product and location in the selection. And the grouping needs to be based on the snp agregate 9AMALO

George

babu_kilari4
Active Contributor
0 Kudos

Just an example provided here for you :-

Import Parameters:

PLANNINGBOOK :::: ZPBMC

DATA_VIEW :::: ZDVMC

PLANNING_VERSION :::: 000

PERIOD_TYPE :::: C

DATE_FROM :::: 06.2009

DATE_TO :::: 06.2009

Table Parameters:

SELECTION :::: 9AMATNR I EQ 0000000000000000000000000000000059999999

GROUP_BY :::: 9AMATNR

KEY_FIGURE_SELECTION :::: 9AADDKF1

KEY_FIGURE :::: 1 1 9AADDKF1

Once you execute with the above paramters, you will get the values populated in the following table paramter.

KEY_FIGURE_VALUE

Hope this helps though this is a late reply for you....

Thanks,

Babu Kilari

Former Member
0 Kudos

Hi,

Check the programs in SCM Code Gallery for Reference.

You can check this link: https://wiki.sdn.sap.com/wiki/display/SCM/APOPlanningBook+Viewer

cheers

Aveek

Former Member
0 Kudos

Hi Francisco -

Did you fill in the key_figure_selection table with "Forecast"?

Are you using the selection table parameter? If you are entering the prod-locs in the selection table then you do not use the selection_id paramter.

Is there a macro associated with this KF - if so then use flag in read_options.

Are you receiving any messages in the return table?

I think you should enter the period type - use C for month.

Andy