‎2008 Oct 14 1:46 PM
Dear gurus
My smartform name is zretail_invoice
when executed it gives the function module /1BCDWB/SF00000005
in program i callef function ssf_function_module_name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZRETAIL_INVOICE'
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.
and again i called the function module /1BCDWB/SF00000005
it calls the smartform now
but when i do changes in that it's not accepting...
let me help that
‎2008 Oct 15 2:37 PM
Continue doing your changes in ZRETAIL_INVOICE using the transaction SMARTFORMS. Don't do the changes in /1BCDWB/SF00000005 because that's a MANDT dependant name, so when you later transport the order, the changes don't carry across.
In other words, there's no guarantee that in another mandt /1BCDWB/SF00000005 will still be called /1BCDWB/SF00000005, so there's no point in making changes to it. If you do the changes to ZRETAIL_INVOICE they will be shown in this mandt as /1BCDWB/SF00000005, but you don't know how they will be called when you transport it. That's why you need to call SSF_FUNCTION_MODULE_NAME in your code and call the smartform with the name resulting from that function call.
‎2008 Oct 14 1:54 PM
we need to use both the function modules ; i.e.the function module which is generated and SSF_function module also.
what are you trying to tell? i dint get you.
‎2008 Oct 14 1:56 PM
hi, I suggest you to make the changes in smartform transaction and not in the FM....
check this sample code to call the smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_BOOK'
IMPORTING
fm_name = l_smart_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 l_smart_name
TABLES
tab_smart = it_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.
‎2008 Oct 14 1:58 PM
when you call sencond function module instead of /1BCDWB/SF00000005 use variable FM_NAME.
i.e CALL FUNCTION FM_NAME.
‎2008 Oct 15 2:26 PM
‎2008 Oct 15 2:37 PM
Continue doing your changes in ZRETAIL_INVOICE using the transaction SMARTFORMS. Don't do the changes in /1BCDWB/SF00000005 because that's a MANDT dependant name, so when you later transport the order, the changes don't carry across.
In other words, there's no guarantee that in another mandt /1BCDWB/SF00000005 will still be called /1BCDWB/SF00000005, so there's no point in making changes to it. If you do the changes to ZRETAIL_INVOICE they will be shown in this mandt as /1BCDWB/SF00000005, but you don't know how they will be called when you transport it. That's why you need to call SSF_FUNCTION_MODULE_NAME in your code and call the smartform with the name resulting from that function call.