‎2007 Aug 28 12:54 PM
How can I pass SELECT-OPTIONS to function module generated by SMARTFORM?
‎2007 Aug 28 12:58 PM
Hi,
What you can do is FOR the function module DO NOT mention any TYPE that is use GENERIC type like ANY.
And inside the function module you can use RANGES statement of TYPE RANGE OF statement to create a structure that is similar to the structure that a SELECT-OPTION will have.
SIGN, OPTION, LOW and HIGH are the fields of the structure that a SELECT-OPTION will create same kind of structre can be created using TYPE RANGE OF as follows.
TABLES: SPFLI.
SELECT-OPTIONS: sel_crit for SPFLI-CARRID. "
DATA: range_crit TYPE RANGE OF SPFLI-CARRID. " This is same as above.
Regards,
Sesh
‎2007 Aug 28 12:58 PM
Hi,
What you can do is FOR the function module DO NOT mention any TYPE that is use GENERIC type like ANY.
And inside the function module you can use RANGES statement of TYPE RANGE OF statement to create a structure that is similar to the structure that a SELECT-OPTION will have.
SIGN, OPTION, LOW and HIGH are the fields of the structure that a SELECT-OPTION will create same kind of structre can be created using TYPE RANGE OF as follows.
TABLES: SPFLI.
SELECT-OPTIONS: sel_crit for SPFLI-CARRID. "
DATA: range_crit TYPE RANGE OF SPFLI-CARRID. " This is same as above.
Regards,
Sesh
‎2007 Aug 28 12:59 PM
1st convert system genereted FM to ur own FM then pass the select-option
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
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'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
‎2007 Aug 28 1:01 PM
Hi,
i have some questions to understand your problem. Is the calling program a standard report or is it written in customer namespace? Is your Smart Form a standard Smart Form or a self written one?
Regards
Mark-André
‎2007 Aug 28 1:13 PM
Hi,
you can create a "table type" in abap dictionary (tcode se11). There you can hit the menu "Edit->Define as ranges table type" and you get an select-options table. This table type can now be used as an import parameter of your Smart Form.
Regards
Mark-André
‎2007 Aug 28 1:38 PM
hii
You can use the Data type DDSHSELOPT (structure in DDIC ) to Declare a parameter under TABLEs to Declare this in Smartforms.
<b>Reward if Helpful</b>