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.
Showing results for 
Search instead for 
Did you mean: 

Performance issue calling bapi po create in test mode to get error messages

Former Member
0 Kudos


We have a report which displays in alv the purchase orders that got created in SAP, but either got blocked due to not meeting PO Release Strategy tolerances or have failed output messages .We are displaying the failed messages too.

We are looping the internal table of eban(purchase requisition) and calling bapi po create in test mode to get failed messages.

Now we are facing performance issue in production.What can be the other effecient way to get the error messages without effecting performance.




Active Contributor
0 Kudos

Hi Suvarna,

so you need to reduce the number of PO-simulations.

- Likely you checked already, that all EBAN-entries should already be converted into POs. If there would be a large number of "new" EBAN-entries, they don't need to be simulated.

- If it's a temporary problem: give aid to correct the problems (maintain prices or whatever the error-reasons are) Then the amount of not-converted purchase requisitions (PR) should drop, too

- If it's likely, that your volume of open PR will stay high: create a Z-Table with key of EBAN and a counter, simulate (once a day) PO conversions and store the results in the Z-table. In your report you can use the results... if they are "new enough". From time to time new simulations should be done, missing master data might be available.

Maybe users should be allowed to start this 2nd report manually (in background), too -> then they can update the messages after some data corrections themself, without waiting for the result (just check later in online report and do something different in between).

And you might need to explain, PO simulation takes as long as PO creation... there is no easy or fast way around this.

Best regards,


Active Participant
0 Kudos


You have to create a parameter named Return for every BAPI. This parameter returns exception messages or success messages to the calling program.

BAPIs themselves must not trigger any messages (such as MESSAGE xnnn) in the coding, also they must not generate terminations or display dialog boxes. Instead, all messages must be intercepted internally and reported back to the calling program in the Return parameter.