SAURAV,
If the user buys any material or all materials(LISTED ABOVE i.e A,B,C or D) and the total line item QUANTITY adds up to 5 cases he will will get a piece of material X free.
I think this requirement can not be satisfied with standard SAP.
The client wants to give a % discount based on purchase of materials either all 5 materials or combination of materials 1 to 5 based on a certain quantity i.e. either he can buy 5 cases of material 1 or 2cases,3cases of material 1 and 2 respectively.
The above requirement can be met with Group condition functionality.
But the percentage discount shall populate in all the line items, for which group condition type is activated.