In your PBO set the focus to the input where the barcode should be if is initial, this will make that wharever the user hit and PAI is executed you will get the focus allways again in the barcode input, ready for scanning a barcode.
The scanner has a feature auto-enter so when the barcode is readed you will get the PAI trigger if the barcode is filled just fill the others field.
Regards