SAP Message 8B679 - The first digit in the CFOP in item & is incorrect

Diagnosis
By law, the first digit in the CFOP must be as follows:
Transaction,,Digit
Within a state,,1 or 5
Between two states,,2 or 6
International,,3 or 7

Example
You enter an item with the CFOP 1.11, where your own business place isSão Paulo and that of your business partner is in in Minas Gerais -instead you must enter a CFOP with a "2" as the first digit (incomingnotas fiscais) or a "6" (outgoing notas fiscais).