SAN FRANCISCO — SAP subsidiary TomorrowNow has agreed to plead guilty to 12 criminal counts related to alleged infringement of Oracle Corp.’s copyrighted software, according to documents filed Thursday by the Northern District U.S. attorney’s office.

The resolution of the criminal probe follows last week’s ruling by an Oakland federal judge junking a record $1.3 billion judgment won by Oracle in the related civil suit..