On a CMS-1500 the drug identifier goes in the shaded portion of box 24A as N4 immediately followed by the 11 digits, with no space or hyphen, then the unit qualifier and quantity. On an 837P it occupies the LIN and CTP segments.
N4 with a 10-digit code, or an 11-digit code with no N4, are both rejected at the clearinghouse rather than by the payer, which is why the error often surfaces as a file-level failure rather than a denial.
Example
N400006302602 UN1