‎2007 Jan 12 6:38 AM
Hi,
I am running a program which is calling a smart form, this program is running fine on one server but on another server it is just cuming out on the SAP workbench screen, i debugged the program and found out that after calling the following function , it is coming out
CALL FUNCTION lf_fm_name
EXPORTING
V_DATE = V_DATE
v_docno = v_docno
tables
T_ZEXC_REC = it_ZEXC_REC
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.
where the value of lf_fm_name is /1BCDWB/SAPLSF00000022,
Please suggest what can be the problem
Thanks
‎2007 Jan 12 6:42 AM
Hi,
Smartforms are client independent.They need to be activated on each client .
1. Activate the smartform in the server where you are having a problem.It generates a new function module in each client with a different name
2. This should resolve your issue.
Please let me know if you have any issues further.
Regards
Sunil
‎2007 Jan 12 6:42 AM
Hi,
Smartforms are client independent.They need to be activated on each client .
1. Activate the smartform in the server where you are having a problem.It generates a new function module in each client with a different name
2. This should resolve your issue.
Please let me know if you have any issues further.
Regards
Sunil
‎2007 Jan 12 6:48 AM
Hi Sunil I have activated the form ,it is showing a screen where a function module name /1BCDWB/SF00000011 is there in function module name and there are options for display change and create , what option i have to select
‎2007 Jan 12 6:51 AM
Dear manik,,
You acn't use the FM name as Hardcoded.. please use the
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING FORMNAME = LF_FORMNAME
variant = ' '
direct_call = ' '
IMPORTING FM_NAME = LF_FM_NAME
EXCEPTIONS NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
Error handling
CF_RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
Then your Problem will be solved
‎2007 Jan 12 7:00 AM
Hi I have activated the smartform but it is still not working, and the value of lf_fm_name is not hardcoded, it is a variable of type rs38l_fnam.
‎2007 Jan 12 7:11 AM
when a smart form is actiavted Functionmodule is generated E.g for u it is /1BCDWB/SAPLSF00000022 but this is not a static one it will change.
So use SSF_FUNCTION_MODULE_NAME Function module.
Pass ur form here & get the Smartform FM.
Hardcode doesnt mean that u have passed the value directly. rs38l_fnam type declaration only.
DATA : V_SSF_NAME TYPE TDSFNAME, "TO FIND FM
V_FUNC_MOD TYPE RS38L_FNAM. "TYPE FOR FM
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZICICI'
IMPORTING
FM_NAME = V_FUNC_MOD.
CALL FUNCTION V_FUNC_MOD
EXPORTING
NAME = P_CNAME
CONTROL_PARAMETERS = V_CTRLPARAMS
IMPORTING
JOB_OUTPUT_INFO = V_JOBOUTPUT
TABLES
ITAB = ITAB.
use like this.
Message was edited by:
Kalpanashri Rajendran
‎2007 Jan 12 7:58 AM
Do anybody knows about this error
SSFRT_READ_ERROR . I debugged the function 1BCDWB/SAPLSF00000011 , and i found it is generating this exception.
‎2007 Jan 12 8:03 AM
Make sure U have transported all the related object to other server..
like SMARTFORMS LAYOUT
SMART FORM STYLES. etc..
‎2007 Jan 15 3:03 AM
HI ,
Can you please tell me how to check whether the layouts and styles related to the smart form has been transported successfully or not.
Thanks
‎2007 Jan 12 6:43 AM
dear Manik
value of lf_fmname will be changed in other server...
each sereve will generate new verion of the FM /1BCDWB/SAPLSF00000022..
wht you r doing is ur hard coding the value of Development server.. but in quality or production system will generate another FM not this ../1BCDWB/SAPLSF00000022..
weht you have to do is
give LF_FORMNAME = 'YOUR SMARTFORMNAME'.
IN <b>lf_fm_name</b> you will get the /1BCDWB/SAPLSF00000022 generated in teh other server.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING FORMNAME = <b>LF_FORMNAME</b>
variant = ' '
direct_call = ' '
<b> IMPORTING FM_NAME = lf_fm_name</b>
EXCEPTIONS NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
Error handling
tehnd call the
CALL FUNCTION lf_fm_name
EXPORTING
V_DATE = V_DATE
v_docno = v_docno
tables
T_ZEXC_REC = it_ZEXC_REC
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
<b>Please Close this thread.. when u r problem ise solved</b>
Reward if Helpful
Regards
Naresh Reddy K
Message was edited by:
Naresh Reddy
‎2007 Jan 12 6:43 AM
Please check in SE37 whether this FM: /1BCDWB/SAPLSF00000022 exists???
Regards
Eswar
‎2007 Jan 12 6:44 AM
HI,
Instead of using the FM generated by SAP directly in your program, use another funtion module which will find the SAP Form FM.
'SSF_FUNCTION_MODULE_NAME'
and then call the FM generated by this above FM.
Regards
Subramanian
‎2007 Jan 12 6:44 AM
Hi,
The FM names may changes from servers so use the below code to get the correct FM
data : C_FMNAME TYPE RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSMARTFORM'
IMPORTING
FM_NAME = C_FMNAME
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 C_FMNAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IT_FINAL = IT_FINAL
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,
Ramu N.