Please, man... I do not posses any kind of psychic abilities, at least tell what error are you getting...
Please look up in program SF_EXAMPLE_01 what exceptions are available for generated Smartform function module and how to handle them. Look up in SAP Help on Smartform programming how to set the parameters to get the output of form as OTF. Search before posting - getting OTF is a basic stuff.