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