Hello,
If you see segments previous to segment E1IDT01, they are not mandatory segments except E1IDKU1 so logic to determine the exact position might not correct(It can include segments which are below the E1IDT01).
In my opinion, you can read the segments positions starting from E1IDKU3 ->E1IDKU4->E1IDKU5.
If any of those segment found then insert the segment E1IDT01 at previous position to it,
If first two segments (E1IDKU3 and E1IDKU4) are not there then segment E1IDKU5 must be there since it is mandatory segment.