Hi Venkat,
the rejection is set via rejection reason code, as you wrote. You defined them in IMG:
I suggest you to read the documentation, especially if you have an ECC connected and replicate sales orders.
In a sales transaction, you can then maintain the Rejection in Details assignment block (either on header level, which will reject all line items or on each line item):
Hope this helps.
Regards,
Dawood.