I'm not familiar with these tcodes and you'll probably get a better answer here in a bit, but if the SAP log message contains the new record ID you can use RegEx to extract the number and store it elsewhere for use. We also had a teammate use a Studio feature to convert the message to only show a document number in the SAP log field.
------------------------------
Joshua Whitener | Technical Advisor
Exxon Mobil Corporation | 8326258441
------------------------------