cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PBSRVAPS_GETDETAIL2 for SNP planning book

ramesh_putta
Participant
0 Kudos

Hello,

Iam using the BAPI - BAPI_PBSRVAPS_GETDETAIL2 to retrive the keyfigure values for a planning book and dataview.

It works fine and brings me the keyfigure values for DP planning book

for example planning book - 9ADP_BASIC , dataview - ABSATZPLANUNG and version 000.

But when i run this BAPI for SNP planning book, it returns nothing.

for example planning book - 9ASNP94, dataview - SNP94(1) and version 000.

Does this BAPI not usable for SNP planningbook? if yes, is there other BAPI to read SNP planning book?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

BAPI_PBSRVAPS_GETDETAIL2: Used to read key figure values from one data view for a planning book. The parameters key figure, key figure value and characteristic combination serve as return parameters.

The key figure details are contained in Key figure. These entries use the field CharComId to refer to the characteristics combinations in parameter Characteristics Combination for which they are valid. The key figure values for the individual periods of time are contained in parameter Key Figure Value.

By default, no macros are executed for DP planning books. If, however, to execute macros for the planning book or the data view, the field Macro Execution Flag must be set in parameter read options. In the case of SNP planning books on the other hand, macros are always executed.

CALL FUNCTION 'BAPI_PBSRVAPS_GETDETAIL2'
EXPORTING

planningbook     = planningbook Name
data_view        = data view name
planning_version = planning version
read_options     = gs_read_options
period_type      = ’A’
date_from        = date_from
date_to          = date_to
TABLES

selection        = gt_selection
group_by         = gt_group_by
key_figure       = gt_key_figure
key_figure_value = gt_key_figure_value
    return   = gt_return1.

There is a new book on Programming in SAP APO. You might want to check that out.

http://www.flipkart.com/programming-sap-apo-1st/p/itmdgt9hbdh6auzu?pid=9781259028441&ref=bc49ea80-1a...

satish_waghmare3
Active Contributor
0 Kudos

Hello Ramesh,

The BAPI_PBSRVAPS_ GETDETAIL2 can be used to read key figure data from SNP Planning Area as well.

For each Product/Location combination you can read key figure data from Live Cache using BAPI_PBSRVAPS_ GETDETAIL2 based on parameters like “SNP Key Figure-1”, “SNP Planning Version”, “SNP Planning Book”, “SNP Planning View” and “Selection ID” and Date Range etc.

Please check.

Thank you

Satish

ramesh_putta
Participant
0 Kudos

Thanks Satish.

The BAPI actually not return anything for a SNP planning book.

Looks like its looking at the macros for SNP planning books. Is there a way to run this BAPI without using of macros ?