Installing short 18"- 24" threaded black pipe for lp gas line in wall
Short threaded connections are generally acceptable, if your piping system passes required pressure testing. As @keshlam states, check with your local permitting authority.