UB & NB
How to distinguish Stock Transport order (UB) and Standard Purchase order (NB).
Its a very Basic Setting in IMG for Purchasing and fundamental is also very clear given in SAP as for every Purchase you will need to book it and it should consist of different and unique no. range.
whenever you create a PO with ME21N you can see the order type as Standard PO/STO/Frame work PO etc as per your Configured part. it always Controls the no. range you assigned in IMG.
Just open SPRO => MM => Purchasing => PO => Define no. range and Document type => you can see that you named as NB Stnd PO and UB STO and its there in ME21N.
Another thing is you can also control the Allowed item Cat. for this at Document type level only.,
as per this whenever you will select the Stnd PO it will choose NB Doc type and you will get a different PO no. for your Created PO and also you system will ask you the required fields you mentioned for this PO through fields selection key inserted at Doc Type, which will be as per the thumb rule you implemented in IMG.
try Do confirmatory tests in Development for your Learning Purpose.