To translate a statement in Indirect Discourse in English into Latin you do two things:
First: Change the finite verb of the English subordinate clause ("He said that I did this." The clause is underlined; its finite verb is did.) into an infinitive: Did the reported event happen at the same time that the speaker reported it (present infinitive), before the speaker reported it (past infinitive), or is/was/will it happen after the speaker's report (future infinitive)? In the example above, did refers to what I did before the speaker reported my action. Therefore: egisse (Perfect Active Infinitive of ago, agere, egi, actum = "to do")
Second: Change the subject of the finite verb into the accusative case. Remember: The subject must be expressed and must be in the accusative case. In the example above, "I" is the subject of the report. Therefore: me (Accusative Singular of ego, mei, mihi, me, me = "I").
That's it. Everything else translates into Latin just as it normally would.
"He said that I did this" = dixit me hoc egisse.
It is even easier if you converting an original Latin statement into Indirect Discourse still in Latin.