Hi Priyank,
Probably this is because there is already an error in the prebooking. What happens when you try to prebook the same course for the same person but in the back-end? Are you already prebooked for the same course maybe? Does SAP enter in the BAdI (have you tried inserting a breakpoint in the BAdI)?
For your info, note 1806593 is only relevant for course admin portal, not for the learner portal. If I understand correctly, the problem you have is in the learner portal so it's normal this note does not fix your issue.
Regards,
Julien