Based on your setting of Quality Inspection sample control either the stock will come to 917 or if that is not defined then it should come in 901 with inspection lot. You need to provide few more detail (eg. setting in LE---WM---INTERFACE-----Define Quality) and bit more clarity about whether it is coming in 901 or 917 to do analysis and suggest you the root cause
with regard to TR--TO , check your storage type search strategy and automatic TO in the Movement type (103), As a part of production receipt you receive the stock on 901(SAP standard) and then you need to configure your system to create a transfer order from 901 to physical bin