per record in your source file SAP is going through the IDOC structure from beginning to the end.
Because of that E1KNA1H segment is only processed 1x per record in the source
so it is with E1KNA1L segment too.
so you can only do mapping for 1 text id and 1 line from your source record in the usual mapping process.
for any additional text id and text line you need to do coding.
you need to create new segments in the IDOC, a new segment for the header and for a item line.
This has to be in the right sequence of the IDOC structure otherwise your IDOC runs into a syntax error.
And this place to add this coding is after the original transfer_record step to the text line.