Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PBSRVAPS_GETDETAIL2 Usage in ECC ?

Former Member
0 Kudos

Hi Experts,

I have a requirement in ABAP to read the planning book data from APO System.and for which i am using BAPI  - BAPI_PBSRVAPS_GETDETAIL2 .

Can you please provide me some sample code to use BAPI - BAPI_PBSRVAPS_GETDETAIL2  in ECC System

And what all parameters i need to pass as import parameters?

Or is there any other way i can achieve this functionality ?

Thanks in Advance !!

Regards

Rahul

2 REPLIES 2

former_member203305
Active Contributor
0 Kudos

Hello.

I found this post with the parameters of the FM, very clear to understand it.

http://www.e-abap.net/?document_srl=23059

Regards

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...