Hi
Please see the following links , should be helpful
For idocs - IDOC Steps - ABAP Development - SCN Wiki
For LSMW - http://wiki.scn.sap.com/wiki/display/ABAP/LSMW+Steps+in+Detail
Also see this document
http://www.sap-press.de/download/dateien/2121/sappress_practical_guide_to_idoc_development.pdf
Thanks