Hi Marco,
There are 2 ways to do what you want.
1. You can define another XML variable in your transaction with all your logics for input to RFC_READ_TABLE and then you can append it to your original XML.
2. You can define list/map type variable with your logics and then you should be able to append the contents of your list/map variable to your XML.
Hope this helps!!
Cheers,
Anuj