07-02-2007 10:04 AM
When iam designing smart forms it activating properlyy then we get one functional module namee i.e sf00000111 somthing.
then how i will get namee of that FM to pass in se38?
plese tellme ans?
07-02-2007 10:06 AM
Hi Amarendar,
the function module name that is returned is what should be used by you.
Award Points if this was helpful.
Kiran
07-02-2007 10:07 AM
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = P_FORM
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = V_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 V_NAME "'/1BCDWB/SF00000366'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
S_MATNO = I_TAB-MATNO
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
I_TAB = I_TAB
I_TABLE = I_TABLE
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.
Regards,
Amit
Reward all helpful replies.
07-02-2007 10:10 AM
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 0.
Endif.
The fmname will be obtained when u just run the smart form....
it will be something like this '/1BCDWB/SF00000366'
regards,
Raksha SR
Message was edited by:
Raksha SR
07-02-2007 10:15 AM
when you maintain smartform properly,then activate it and then execute it.A number is shown there,copy that number and use it in a report program mentaining data definitions,and then open PATTERN and paste thet number in that call function area.
OR...........
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = <Smart Form Name>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = ls_control_para
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ls_ssfcompop
user_settings = ''
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
it_header_det = it_header_det (Pararmeter to be passed depending upon ur req)
lt_item_det = it_line_item
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5 .
If SY-SUBRC <> 0.
Endif.
IF helpful Points expected.
07-02-2007 10:13 AM
Hi,
u can use 'SSF_FUNCTION_MODULE_NAME' to get the Function module generated by smartform dynamically.
or u can directly use the function module which has been generated from the samrtforms...
F8 the samrtform it will give u the function module name and can use ibn ur SE38 code.
07-02-2007 10:19 AM
HI
refer this .
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = <Smart Form Name>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = ls_control_para
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ls_ssfcompop
user_settings = ''
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
it_header_det = it_header_det (Pararmeter to be passed depending upon ur req)
lt_item_det = it_line_item
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5 .
If SY-SUBRC <> 0.
Endif.
Reward all helpfull answers.
Regards.
Jay
07-02-2007 10:34 AM
hi amareder,
when u activate u'r smartform, just go to the environment menu select the function modeule name it will give u name of function module name which is used to pass in the se38..
reward if usefull.
buy
07-02-2007 11:10 AM
Hi Amar,
After activating properly U will be getting the Function Module name as "/1BCDWB/SF00000063".
In SE38, provide all the code for smartform to get the o/p.
Then click on Pattern button to call the specified funtion module.
RS38L_FNAM - Name of Function Module *****
DATA : FM_NAME TYPE RS38L_FNAM.
CALL FUNCTION<b> 'SSF_FUNCTION_MODULE_NAME'</b>
where the smartform name must be provided ***
EXPORTING
FORMNAME = 'ZK_SFORM_ME51'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
then again press Pattern buton to provide the internal table names used & the control parameters .The generated name is replaced with FM_NAME, which must be declared in Data Declaration part.
By clicking the Pattern, U have to give the auto generated FM name, to get the below function:-
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = CONTROL_PARAMETERS
OUTPUT_OPTIONS = OUTPUT_OPTIONS
BANFN = BANFN
TABLES
IT_HDR = IT_HDR
IT_DET = IT_DET
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.
Regards,
kavitha.
<b>Reward points if useful.</b>
07-02-2007 11:22 AM
hi when u activate the smart form ull get a functional module.
go to se38 ur driver program click on pattern button paste the functional module and click ok. the code for that functional module will be pasted in ur progarm.
now remove that hard coded functional module from ur program and use one variable in place of that bcause the functional module changes always when u activate the smart form.
regards,
siri.