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 for APO

Former Member
0 Kudos

Hi Guys,

i have a requirement in which i need to create a Z BAPI in APO. How can this be done?????

Does the code remain same as in ABAP or we have some different concepts for retrieving data from info objects??????

Please help me out. Its very urgent....

2 REPLIES 2

Former Member
0 Kudos

Extraction from APO

Hi,

I have used that BAPI ('BAPI_PBSRVAPS_GETDETAIL'). For test purposes you can call the transaction "BAPI" and run the bapi function. But, if you want to extract whole data and make a report, you should write an ABAP program.

Here I paste a part of the code that we wrote in our project which shows how the BAPI is called:

........

wa_selection-characteristic_name = '9AVERSION'.

wa_selection-char_val_sign = 'I'.

wa_selection-char_val_option ='EQ'.

wa_selection-char_val_low = '000'.

APPEND wa_selection.

wa_selection-characteristic_name = 'ZURUN'.

wa_selection-char_val_sign = 'I'.

wa_selection-char_val_option ='BT'.

wa_selection-char_val_low = '0'.

wa_selection-char_val_high = 'ZZZZZZZZZZZZZZZ'.

APPEND wa_selection.

wa_keyfigure-key_figure = 'ZALOKE'.

APPEND wa_keyfigure.

wa_group_by-characteristic_name = 'ZFABRIKA'.

APPEND wa_group_by.

wa_group_by-characteristic_name = 'ZURUN'.

APPEND wa_group_by.

CALL FUNCTION 'BAPI_PBSRVAPS_GETDETAIL'

EXPORTING

planningbook = 'ZSNPKAPASITE10'

data_view = 'ZSNPKAPASITE10'

period_type = 'C'

date_from = '01.2005'

date_to = '12.2006'

logical_system = 'PCTCLNT001'

TABLES

selection = wa_selection

group_by = wa_group_by

key_figure_selection = wa_keyfigure

time_series = wa_time_series

time_series_item = wa_time_series_item

characteristics_combination = wa_characteristics_combination

return = wa_return.

........

But do not forget that it is not very easy to interpret the results of the BAPI. I recommend to work with an experienced ABAPer...

see these links too..

http://abap.wikiprog.com/wiki/BAPI_DELIVERYPROCESSING_EXEC

http://abaplog.wordpress.com/

thanks

shankar

reward me if usefull