Hi Stephen
Would you consider using a BAPI? You still may need some IF statements, depending on the variations of what you're trying to load, but you won't have to worry about screen names.
BAPI_ACC_DOCUMENT_POST is a standard SAP BAPI that runs in both ECC and S/4Hana. It is a bit more "geeky" to design, but it works well and is faster than a transaction recording.
Also, v12 processes the scripts more quickly, including handling lots of IF statements more efficiently, if you haven't upgraded yet.
HTH,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle North America
------------------------------