Question:
Hi Experts,
I am reading a planning book using 'BAPI_PBSRVAPS_GETDETAIL'. However, the read is slow and often the program timesout or crashes due to lack of swap space. We have already increased the swap space to 1Gig but things haven't imporved much.
The documentation for the BAPI says, performance can be enhanced by using READ_OPTIONS parameter. I havent found this parameter in the BAPI or otherwise in APO.
Can someone please help! Any help is greatly appreciated.
Thanks,
Kartik.
Answer:
Hi,
increasing swap space has bought you time until the crash
Seriously, are you trying to read the whole planning area with all key figures? This wont work with this BAPI.
The BAPI is really not the fastest, so better restrict the selection and the keyfigures you want to read. Don't forget to fill the GROUP_BY table, too.
If you need a complete mirrow of the planning area, create a macro that stores the keyfigures to a selfdefined DB-table and run it in a background-job once a day.
If you need the data up to date, define the macro as end-macro within all data views. So instead of using the BAPI, read the DB-table in your program. This is much faster unless you need only a few values for some char. combinations. Then resrtict the BAPI as described above.
Greetings,
Christian
Answer:
Thanks Christian !!!
I am not reading the entire planning area, 2/3 kf at a time. It still takes awefully long.
I looked all the standard func. provided by macros and it didn't seem like any macro would store data to a Z-table. I am assuming this has to be a custom macro. I am not sure what you mean by an 'end-macro'. Can you please elaborate.
Thanks,
Kartik.
Answer:
Hi Kartik,
my proposal uses a userfunction macro. With end macro I mean to set the macro as end macro in the macrobuilder (right side, top: start, default, level -->end<--). End macros are executed when you save in the interactive planning.
Greetings,
Christian