So long as a rule is to be found in the Quran and the Sunnah...
So long as a rule is to be found in the Quran and the Sunnah, the need for ijtihad does not arise. However, in absence of relevant dicta in the Quran, the Sunnah or ijma', ijtihad becomes a source of legislation. On this basis, they have said that the sources of legislation are four: the Book, the Sunnah, ijma', and ijtihad (i.e. qiyas). Also, according to this approach, ijtihad is not synonymous with expertise in Islamic law (faqahah), nor is the term mujtahid synonymous with faqih.
Rather, ijtihad is one of the functions of the faqih. The faqih should have knowledge of the Quran and the hadith corpus; he should be able to distinguish the nasikh from the mansukh, the 'amm from the khass, the mujmal from the mubayyan, and the muhkam from the mutashabih.
He should be familiar with the Quranic vocabulary and terminology, know the circumstances in which a particular verse was revealed (sha'n al-nuzul), and have knowledge of the successive generations of narrators and transmitters of hadith. He should also be able to reconcile the apparently conflicting traditions. In addition to all that, he should practise ijtihad and exercise his personal judgements in particular cases. What was the character and basis of that ijtihad?
Did the term ijtihad found in hadith mean exercising qiyas? Did the Prophet (S) and his practise ijtihad in this sense. Did it also apply to other practices such as istihsan? Al-Shafi'i, in his famous Risalah, has a chapter on ijtihad, which follows the one on ijma', and is itself followed by one on istihsan.
In his discussion of the subject, al-Shafi'i draws the conclusion that the ijtihad prescribed by the Shari'ah is confined to qiyas and that other types of ijtihad, such as istihsan, do not have any canonical grounds. Al-Shafi'i believes that the canonical grounds for qiyas are identical with those for ijtihad.
There were other questions that were debated by Sunni fuqaha', such as: Are ijtihad and al-'amal bi al-ra'y confined to cases where there is no express text (nass) or whether one may do ijtihad (called ta'awwul in this case) and exercise his judgement despite the presence of express texts? What are the conditions applicable to Sunnah if it is to preponderate ijtihad? Are all traditions narrated from the Prophet (S) to be relied upon and given precedence over ijtihad?
Is reliable hadith confined to those which are mashhur and mustafid, as Abu Hanifah believed?