Skip to Content

Which BAPI to use to create inspection points using inspection lot and phsyical sample

Oct 31, 2017 at 04:37 PM


avatar image
Former Member


We are using BAPI-BAPI_INSPOPER_RECORDRESULTS with BAPI_TRANSACTION_COMMIT but it is creating issues where in some random cases inspection points do not get created.

I want to know if it is better to use BAPI_INSPPOINT_CREATEFROMDATA instead?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Craig S
Nov 01, 2017 at 02:56 PM

Why aren't you simply doing this via the standard SAP configuration and the FM's that SAP provides? Copy the provided FM's to your own "Z" version and modify the Z FM to meet your needs.

insp-point.jpg (97.9 kB)
Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Craig - We have a significant custom set up where we are using notification action box to trigger actions like

1) Create physical sample

2) Create inspection lot. ( When user clicks on this action box a code in the background create the lot, assigns it to physical samples and also creates the inspection points)

We are using BAPI - BAPI_INSPOPER_RECORDRESULTS to create inspection points but it is causing issues where it does not create inspection point randomly. Hence checking if there is another FM that could be used.


So why isn't this just a standard "create inspection lot for physical sample"?

Create the physical sample from the notification and then if needed for your process, use an action box to trigger the standard creation of the inspection lot for the physical sample, (QPR5)

Let SAP create the inspection points through standard SAP. Don't have the program doing it.

Seems like the process is trying to do more than it might need to.

But I'm not privy to your process and this appears to be a very customized solution. It will probably be difficult for any of us to really help you much since we have no access your program and what it is all doing.


Former Member

There is an action box which triggers the "create inspection lot" but within this action we are creating the lot and the points also.

Are you suggesting we create an action box for "create inspection point" and this is linked to the standard SAP configuration configuration to create the inspection points? Or within the action to create inspection lot we call the standard SAP configuration to create inspection instead of using a BAPI to do it?


I would suggest you create a FM to be used in the action box to run QPR5. Use the notification to pass the physical sample number to the action box FM and execute QPR5 via the FM. Again, not knowing if your current requirements that your customizations were done for I can't promise this would work for you.

Former Member

Thanks Craig,. for the time being we have found a fix we want to try.

Upon debugging it seems that the commit being done to QPRS table is taking longer than the check inspection lot create BAPI does to confirm if physical sample is updated with inspection lot or not. We are adding a wait after this commit.

In case this does not work i will evaluate the option you mentioned.