Hi Kaustav,
I think fm_name returns null value.. Place a debugger and check the Varible VAR, whether it is passing the Smartform name correctly.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = var
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
Here fm_name is null, so place the condition as shown below, that may help to prevent the dump.
Place a condition as shown below.
if fm_name is not initial.
call function fm_name.
....
...
Endif.
Regards
Rajkumar Narasimman