Hi,
This is more an ABAP question, it depends of the program, idoc or function module that you are calling from the LSMW.
IDOC processing has its own transaction tool for testing, transaction WE19.
Check this similar thread:
Best regards,
Alejandro López R.