SAP Integration

Hello … Just wondering if anyone has ever run into this snag with SAP. The problem that I am experiencing is that I have created an integration that takes data from an Oracle database and inserts into SAP (version 4.6C).

The error I receive is that “The plant data of the material ##### is locked by the user JSMITH”. I am using the following BAPI to insert into SAP BAPI_GOODSMVT_CREATE.

The first record seems to go in ok and then the second & third and so on seems to fail. Perhaps just a timing issue. Any comments would be greatly appreciated.


Your Bapi is returning a SAP message that indicates that the plant view of the material is currently being ‘locked’ by user JSMITH. This individual probably has a ‘change’ screen on his PC of this plant / material combination. Ask this person to back out of the screen, if that doesn’t resolve the problem you may need to go to the SAP Basis group to remove the record lock.

Thanks for the suggestion Gene. Sorry I should of been a little more specific. The user JSMITH is actually the user that I am logged onto SAP with the wM SAP RFC client adapter.

It appears that the first record goes in successfully and then the next 3-4 error with the locking error and then another one is submitted successfully and then the next 3 to 4 are locked up.

I think it maybe a timing problem. Does anyone know of away to put in some kind of 10 second delay between RFC calls?


Your right it is a timing issue… The commit to the SAP database has not yet occurred, therefore your subsequent calls are failing. We’ve done a couple of things to try to get around this, the first being: test the return code coming back within SAP and if it’s bad, then basically go into a loop routine for a period of time and try again. Obviously you also need to put some time limitations on this loop also. If an error still occurs, then either route to data to a SAP shared folder or into SM35 (BDC). From webmethods perspective,
you could also do some type of looping within webmethods if this error occurred and then retry the BAPI invoke.