Mahāpuṇṇama sutta MN 109

Bhikkhu Bodhi Translation

"Bhikkhu, any land of material form whatever, whether past or present, internal or external, gross or subtle, inferior [19] or superior, far or near - one sees all material form as it actually is with proper wisdom thus: "This is not mine, this I am not, this is not my self.’ Any kind of feeling whatever.. .Any land of percep- tion whatever…Any kind of formations whatever…Any kind of consciousness whatever.. .one sees all consciousness as it actually is with proper wisdom thus: “This is not mine, this I am not, this is not my self.’ It is when one knows and sees thus that in regard to this body with its consciousness and all external signs there is no I-making, mine-making, or underlying tendency to conceit.”

Then, in the mind of a certain bhikkhu this thought arose: "So, it seems, material form is not self, feeling is not self, perception is not self, formations are not self, consciousness is not self. What self, then, will actions done by the not-self affect?"1042

Then the Blessed One, knowing in his mind the thought in the mind of that bhikkhu, addressed the bhikkhus thus: It is possible, bhikkhus, that some misguided man here, obtuse and ignorant, with his mind dominated by craving,’ might think that he can outstrip the Teacher’s Dispensation thus: 'So, it seems, material form is not self…consciousness is not self. What self, then, will actions done by the not-self affect?’ Now, bhikkhus, you have been trained by me through interrogation on various occasions in regard to various things.

This sutta highlights the misunderstanding of anatta that we often see in these days. The poor bhikkhu couldn’t grasp cause and result without a self.
Bodhi Note 1042, It seems that this bhikkhu had difficulty in understanding how kamma can produce results without a self to receive them.

and on page 194 -195 of Bodhi translation Net of Views the tika refers to this sutta;

Sub. Cy. “It is said,” etc., this bhikkhu reveals his own disapproval of the emptiness of selfhood (attasuññatā) as it is taught by the Exalted One.

“Kammas done without a self”: kammas not done by any self, or kammas done by the aggregates that are non-self.

He asks: “If there is no self, and the aggregates are momentary, what self do kammas affect when they produce their fruits?”

The meaning is: “Who experiences the fruit of kamma?”

He is “confused” because he is unskilled in the ariyan dhamma due to lack of learning, etc.; he is “immersed in ignorance” because he has not abandoned ignorance due to lack of discipline in the ariyan dhamma; and he is “dominated by craving” because he has come under the dominion of craving, thinking: “If there is no one called ‘I,’ who experiences the fruit of the kamma done by me? But if there is an ‘I,’ there may well be the enjoyment of the fruit.”

“In his mind”: in a mind accompanied by clinging to a doctrine of self.

“That he can overshoot the dispensation of the Master”: though formations are momentary, the kamma and the fruit in the assemblage of dhammas, constituting no individual, are connected together by the fact that the fruit arises in the same continuum in which the kamma was originally done.

But because he wrongly applies the method of unity to this connection, he concludes that there must be a single self-identical agent (kāraka) and experiencer (vedaka), in order to establish a connection between kamma and its fruit. Thus he conceives that he can pass beyond the dispensation of the Master, which elucidates the emptiness of a self and of any property of a self.