Do men who kill other people in battlefield in the course of war, if they follow all the rules of the war ?
Although men who die in the battlefield go in heaven.
But do they incur sin ?
No, it's not a sin to kill one in battlefield
Vasiṣhṭh Smṛiti (verse 3.19) under six circumstances it is acceptable to kill; in order to protect themselves from such enemies who have: set fire to their property, tried to poison them, conspired to murder, loot their wealth, kidnap or dishonor their women, or seize their kingdom.
Gautama (10.16).—‘To stand firm in battle and not to turn hack.’
Baudhāyana (1.18.9).—‘He shall not turn back in battle.’
Viṣṇu (3.43).—‘When ho has been attacked by his foe, he shall protect, his own realm to the best of his power.’
Yājñavalkya. (1.323).—‘Those who, for the sake of lands, fight in battles with fair weapons, go to heaven, like Yogins.’
Devala (Vīramitrodaya-Rājanīti, p. 405).—‘For the sake of his people, the Kṣatriya shall fight and even give up his life.’