Skip to Content
Jul 20, 2017 at 04:32 PM

Unpacking Handling Units - Locks and Performances


Hi gurus,

i'm looking for some support/ideas about a performance and lock issue while processing the Unpacking of a certain number of HU.

The scenario

My service (invoked from a Radio Frequency Terminal ) receives a certain number of HUs to unpack and then it has to move the packaging materials into a specific warehouse.

Nothing fantascientific or too much complicated, indeed.

What i did

I already found out BAPI_HU_UNPACK and the good old BAPI_GOODSMVT_CREATE and in my test enviroment, with a dozen of HU, all works smooth and nice, despite some slow down due the checks i applied to process records only when all the data is unlocked (i try for some seconds to see if the objects are locked, 20 attempts with 1 second delay between them, then i try to process data anyway), but all acceptable.

The real life (AKA the problem)

Now, in production enviroment, i discover the users process something like from 60 to 120 HUs each time (yes, you read it correctly 1-2-0) and the problems are starting to emerge:

  1. Unpacking item per item for 120 HU means about 240-300 calls of BAPI_HU_UNPACK, each call followed by a check on locks on the HU and the material unpacked, performance are killing for RFT
  2. Despite my checks, the amount of data seems to turn the system slow and, after a first 20% of HU succesfully unpacked, locks become longer and block the elaboration (the 20 attemps are not enough)

What i'm looking for

Since RFT means realtime, i cannot manage the unpacking as background report/procedure, so i've to find a way to handle all of this.

First step would be the unpack of the whole HU like HU02 transaction does, maybe even with more HUs at time.

I'd prefer to avoid a bdc and call transaction because i fear it would be even worst: any bapi or FM?

Second step is a possible solution to my flow, a fault i don't see, something i'm missing.

Thanks for all the support!