fault codesp0340 andp1397 on 2000 BMW 323Ci

Ijust got codepo34,andp1397,which says camshaft position sensorcircuit malfunctioned,how is this fixed

Asked by for the 2000 BMW 323Ci
Hello,
Were you able to get this issue resolved? If so, what did it take?
Thanks!