Hi, Krishna
Do you call the smartform by the formname or the programm name of the smartform? A safe way is to get the function module name prior to calling the smartform. Like this:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_YOUR_SMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
TABLES
your tables here
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.