Gen code from SP
gen code from SP. complate