An XPRA is a program that is executed after all the objects in a transport have been imported. XPRA's are really easy to create just make a standard report type program in SE38 that performs all the function you require when your transport imports.
keep in mind that write statements will not be output to the list as there is no list output during the import. There is a function module TR_APPEND_LOG to add messages to the transport log. If you are testing the program (i.e. not in a transport but in SE38) you can use the function module TR_FLUSH_LOG to write the log entries to the standard list output.
Once the program is complete and the transport has been made edit the transport in SE09 and add a new item to the object list with the key:
Program ID: R3TR
Object Type: XPRA
Object Name: Your Program Name
After this save, release and import your transport. When it is complete you can look in the "Programs Run After Import" section of the log for your xpra and it's messages.