The two Russian soldiers stood in court and acknowledged being part of an artillery unit that fired at targets in the Kharkiv region from the Belgorod region in Russia. The shelling destroyed an educational establishment in the town of Derhachi, the prosecutors said.
"I am completely guilty of the crimes of which I am accused. We fired at Ukraine from Russia," Bobikin told the court in proceedings that were streamed live.
Asking not to be handed the maximum jail term, Ivanov said: "I repent and ask for a reduction in the sentence."
The servicemen, described as an artillery driver and a gunner, were captured after crossing the border and continuing the shelling, the prosecutor general's office said.
A defense lawyer asked for leniency, saying the two soldiers had been following orders and repented.
The Ukrainian court is expected to sentence the two admitted war criminals on May 31.
A Ukrainian court sentenced a Russian soldier to life in prison on Monday for killing an unarmed civilian. Russia said it had no information about the trial and that the absence of a diplomatic mission in Ukraine limited its ability to provide assistance.
Many more such trials are expected in both Ukraine and Russia, which has denied targeting civilians or involvement in war crimes.