on 10-07-2011 10:40 AM
Hi Friends,
I have created 5 diffrent smartforms and i should print all these smartforms using single driver program. Please help.
Regards,
pmchandan
Hi,
As per your requirement i have created code for calling two smartforms from a single driver program .You can modify this code.
&----
*& Report ZSMARTFORM *
*& *
&----
*& *
*& *
&----
REPORT zsmartform.
DATA:fnam TYPE rs38l_fnam,
fname TYPE rs38l_fnam.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS:test1 RADIOBUTTON GROUP g1,
test2 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b1.
IF test1 = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFORM'
IMPORTING
fm_name = fnam
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION fnam.
ENDIF.
IF test2 = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFORM2'
IMPORTING
fm_name = fname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION fname.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thread closed.
Thanks for the help
Neela
Edited by: pmchandan on Oct 7, 2011 2:01 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Populate the formname into a variable based on different conditions. Then pass the variable to the fm.
If condition1.
wrk_form = 'Smartform1'.
else.
wrk_form = 'Smartform2'.
endif.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = wrk_form "variable which stores the formname.
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
Thanks & Regards,
Neela M B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chandan,
Check http://help.sap.com/saphelp_47x200/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm and do some research.
gs_control_param-no_open = 'X'.
gs_control_param-no_close = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
control_parameters = gs_control_param..
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_formname..
CALL FUNCTION lv_fm_name... " Do this for 5 outputs
CALL FUNCTION 'SSF_CLOSE'
Thanks & Regards,
Neela M B.
Edited by: Neela M B on Oct 7, 2011 4:54 PM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.