Posting Key is a two-character numerical key that together with the account number controls the posting at line item level. The posting key determines: Account type, Debit/credit posting & Layout of entry screens.
Cost Element Group is something we can use to define the row structure of our reports. It also uses in the information system, for example.
We can also use cost element groups whenever we want to process several cost elements in one transaction. For example, in cost center planning, distribution or assessment.