In your code please un-comment Exceptions parameters of the FM.
CALL FUNCTION fm_name "'/1BCDWB/SF00000031'
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
rorderno = RORDERNO
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
To print multiple orders: You have to create a new structure in se11 as that of select-options with fields SIGN, OPTION, LOW and HIGH.
-> Create an entry in Form Interface Tables parameters by using above structure.
-> Pass your select-option value from driver program to smart form and use it like an select option.
Refer below link for more details:
-Venkat