on 07-20-2007 9:28 AM
Hi Experts,
How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?
I mean, in driver program i called SSF_FUNCTION_MODULE_NAME to get the related FM for my smart form. after that How do I call it(smartform fm) . I tried to call by pressing PATTERN button in Report. but it is showing FM is not exist error.
Call function SSF_FUNCTION_MODULE_NAME
Export
formname = 'zsmartform'
import
fm_name = function_name.
function_name is stored the corresponding smartform fm. then How do i call it to process my smartform?
thanks in advance.
Do it like this...
copy the function module name from Smartform, environment--> function module name
Use pattern and paste the copied function module name.
Now, replace Call function function_name "<b>SSF_FUNCTION_MODULE_NAME</b>
Reward points to all useful answes.
Regards,
SaiRam
Message was edited by:
Sai Ram Reddy Neelapu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf">SAP Smart Forms (BC-SRV-SCR)</a>
Sample :
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = '<form name>'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
CALL FUNCTION fm_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
g_carrid = <variable>
g_connid = <variable>
g_fldate = <variable>
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
gt_sbook = <internal table>
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
Regards
Hi
Run trx SMARTFORMS and press test icon, here you'll be in SE37, copy the function name and go to your program.
Here press PATTERN and past the function name generated by smartform.
In this way you'll insert in your program the call of the smartform:
CALL FUNCTION '/1BCDWB/SF00000003'
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
.................................
and after replace the name of fm of smartform with the variable function_name:
CALL FUNCTION function_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
.................................
Max
hi,
Chk this sample.
DATA: p_output_options TYPE ssfcompop, "occurs 0 with header line
p_control_parameters TYPE ssfctrlop. "occurs 0 with header line
p_output_options-TDCOPIES = 3. "number of copies.
p_output_options-tddest = 'LP01'. "def
p_control_parameters-no_dialog = 'X'. "no dilog box
p_control_parameters-preview = 'X'. "no preview
DATA : v_form_name TYPE rs38l_fnam.
*---- Function to get the function module name of the ----
*---- specified Smart form. ----
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'GIVE YOUR SMART FORM NAME'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3 .
*---- Function Module to call the Smart Form ----
*step 1 - go to ur smart form
*step2 - take environment
*step3-take function module name
*copy that unique number.
*step4 -come back to ur driver program.
*step5 - place ur cursur here. take patter,.give that unique number.
*at that time u will get the below code.
*step6 - rename that unique number with 'v_form_name' in the code generated by pattern.
CALL FUNCTION v_form_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_PARAMETERS =
control_parameters = p_control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = p_output_options
user_settings = ' '
* ARCHIVE_INDEX_TAB =
* 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.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
for any clarifiaction pls revert.
regards,
Reshma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use after ssf_function_module call:
call function function_name
providing import and export parameters
Message was edited by:
abapuser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.