cancel
Showing results for 
Search instead for 
Did you mean: 

Read Characteristics using BAPI_PBSRVAPS_GETDETAIL

Former Member
0 Kudos

I have 4 characteristics and 1 Key figure.

I want to read the values of the key figure for a specific value of characteristic that might be entered by the user.

How should i go about it?

Please tell me which tables should be used and what values should be entered in them to achieve my purpose.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Nitya,

Correct me if i have not targetted your post...

This is part of code that you mention in the BAPI...

While doing the selection criteria, pass the charectaristic value that you require like the following way...

Here charectarictic name is c_acustomer

and charectastic value is xyz.

  • fill in selection criteria based on customer'xyz'

itab_selection-char_val_sign = 'I'.

itab_selection-char_val_option = 'EQ'.

itab_selection-characteristic_name = c_acustomer.

itab_selection-char_val_low = 'xyz'.

APPEND itab_selection.

kindly post back for further clarification if you need...

regards,

uma mahesh

Former Member
0 Kudos

Hello,

I have the same issue as this...but the only difference is that I am creating a ABAP report......And I want the forecast values for each of the material-Plant combination from APO.

I tried using this function module....but I did not the Appropriate results .....

Or is their any other source from I can fetch the forecast value for each plant and materal combination which is basically stored in planning book in sap APO.

Could someone help me out to solve this issue.

Regards,

Komal.

Former Member
0 Kudos

Hi Nitya,

I have been using BAPI_PBSRVAPS_DETAIL2 which is the latest version on APO 4.1.

Input Parameters that are required:

Planningbook

Data_view

Planning_Version

Period_Type Values are to be found in the domain /SAPAPO/CPDS_PERIOD_TYPE e.g. ‘B’ Week ‘C’ Month

Date_From ) Date in the correct format e.g. ww.yyyy

Date_To )

SELECTION Table of Characteristics to be selected on

e.g. COUNTRY I EQ GB

PRODTYPE I EQ FERT

GROUP_BY Table of Characteristics to summarise the data by

e.g. PRODUCT

DEPOT

KEY_FIGURE_SELECTION Table of Keys Figures required

The data comes back in the following tables

CHARACTERISTICS_COMBINATION – this has one entry for each characteristic value retrieved. So if there were 100 entries in the table it would look like

CHAR_COMB_ID

1 PRODUCT ABC

1 DEPOT 10

2 PRODUCT ABC

2 DEPOT 20

The field NUMBER_OF_CHAR_COMBS has maximum value that CHAR_COMB_ID takes (in this case 50).

KEY_FIGURE - this has one entry for each characteristic combination - in our case 50.

KEY_FIGURE_ID CHAR_COMB_ID KEY_FIGURE

1 6

2 5

*Note it is not in CHAR_COMB_ID order

KEY_FIGURE_VALUE - this has one entry for each period/characteristic combination.

KEY_FIGURE_ID PERIOD_BEGIN PERIOD_END VALUE

1 20061218000000 20061224235959

1 20061225000000 20061231235959

Dates are stored in TIMESTAMP format

So now link the 3 tables together - for each KEY_FIGURE_VALUE, find the entry in KEY_FIGURE. From that find all the characteristics in CHARACTERISTICS_COMBINATION for that CHAR_COMB_ID

It took me a lot of debugging before I got my head around what the BAPI was giving me!