Hi,
What is the check on generating the idoc.
If the check is based on the current system then you can still generate the idoc and the idoc will not be sent to the target system but still idoc will be generated.
Please check the below link..
http://wiki.scn.sap.com/wiki/display/ABAP/Steps+to+create+custom+IDOC
Step 10 and 11 can point to dummy system which doers not exists.
Thanks
Rishi Abrol