on 07-16-2009 11:00 AM
Hi all,
I created one smartform and trying to assign it to a driver program and when I call the function module second time in SE38 and give the FM(number) generated then its throwing an error saying that' FM '' '' has been called'.
when I called the function module giving the number generated then I remove it and put 'fm_name'.
For all other forms I have done the same then what will be the problem wih this
Please answer
Thx
Hi,
Smartform generated FM is system dependent. it may be different when we transport to quality or production systems. so follow the below process:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = p_form -
variant = ' '
direct_call = ' '
IMPORTING fm_name = fm_name -
EXCEPTIONS no_form = 1
no_function_module = 2
OTHERS = 3.
Now, u call the Smartform Function Module dynamically..
CALL FUNCTION fm_name
EXPORTING
control_parameters = l_t_control
output_options = l_t_out
user_settings = space
customer = customer
bookings = bookings
connections = connections
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Hope it helps!!
Rgds,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for quick answer vishnu,
but u know when we call the dynamic call function in that only I have problem and its going for dump,
and in the FM exporting I cant see customer ,bookings and connections to give.
when I save and test it then there's no problem but when I execute it then its going to dump and throwing error saying "_" has been called'
Thx
Have a look on this
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSALESFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
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 fm_name "'/1BCDWB/SF00000228'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
VBELN = VBELN
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.
hi,
you will face problem after transported to PRD, because in PRD the smartform generates different functionmodule.
follow this.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = lf_formname
importing
fm_name = v_form_name
exceptions
no_form = 1
no_function_module = 2
others = 3.
IF sy-subrc <> 0.
* error handling
ent_retco = sy-subrc.
IF sy-subrc = 1.
MESSAGE e001(ssfcomposer).
ENDIF.
IF sy-subrc = 2.
MESSAGE e002(ssfcomposer) WITH tnapr-sform.
ENDIF.
PERFORM protocol_update_i.
ENDIF.
if ls_control_param-preview is not initial.
clear ls_control_param-getotf.
*********************Preview*****************************
CALL FUNCTION v_form_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
is_ekko = l_doc-xekko
user_settings = ' '"iv_user_settings "Disable User Printer
is_pekko = l_doc-xpekko
is_nast = l_nast
iv_from_mem = l_from_memory
iv_druvo = iv_druvo
iv_xfz = iv_xfz
IMPORTING
JOB_OUTPUT_INFO = w_return
EV_ADDNR_VENDOR = IV_ADDNR_VENDOR
TABLES
it_ekpo = l_doc-xekpo[]
it_ekpa = l_doc-xekpa[]
it_pekpo = l_doc-xpekpo[]
it_eket = l_doc-xeket[]
it_tkomv = l_doc-xtkomv[]
it_ekkn = l_doc-xekkn[]
it_ekek = l_doc-xekek[]
it_komk = l_xkomk[]
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.