on 11-25-2011 6:16 AM
when executing the below code i am getting
"Function parameter "FM_NAME" is unknown." Error.
Can anyone please suggest me regarding this .
I searched the forums but did not get exact answer.
REPORT ZTEMP.
TYPES: BEGIN OF TY_VBAK,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
ERNAM TYPE ERNAM,
END OF TY_VBAK.
DATA: IT_VBAK TYPE TABLE OF TY_VBAK,
WA_VBAK TYPE TY_VBAK.
data: sf_formname type tdsfname value 'ZTEMP',
sf_fmname type rs38l_fnam.
DATA: st_output_options TYPE ssfcompop,
st_control_parameters type ssfctrlop,
st_document_output_info type ssfcrespd,
st_job_output_options type ssfcresop,
st_job_output_info type ssfcrescl.
select-options: s_vbeln for WA_vbak-vbeln.
select vbeln
erdat
ernam from vbak into
table it_vbak where vbeln in s_vbeln.
loop at it_vbak into wa_vbak.
append wa_vbak to it_vbak.
endloop.
clear wa_vbak.
PERFORM SF USING sf_formname sf_fmname.
*&---------------------------------------------------------------------*
*& Form SF
form SF using p_sf_formname
p_SF_fmname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = p_sf_formname
* VARIANT = ' '
* DIRECT_CALL = ' '
* IMPORTING
FM_NAME = p_sf_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 p_sf_fmname
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
* USER_SETTINGS = 'X'
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
tables
it_vbak = IT_VBAK
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.
endform. " SF
Thanks in advance,
ben.
Hello
You have done a mistake in call
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = p_sf_formname
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = p_sf_fmname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
Please remove the comment before IMPORTINGin the above code
To be exact
IMPORTING
Regards,
Prakash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks to all for giving valuable answers,
I am getting this error
CALL_FUNCTION_CONFLICT_LENG
The reason for the exception is:
The call to the function module "/1BCDWB/SF00000053" is incorrect:
REPORT ZTEMP.
TYPES: BEGIN OF TY_VBAK,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
ERNAM TYPE ERNAM,
END OF TY_VBAK.
DATA: IT_VBAK TYPE TABLE OF TY_VBAK,
WA_VBAK TYPE TY_VBAK.
data: sf_formname type tdsfname value 'ZTEMP',
sf_fmname type rs38l_fnam.
DATA: st_output_options TYPE ssfcompop,
st_control_parameters type ssfctrlop,
st_document_output_info type ssfcrespd,
st_job_output_options type ssfcresop,
st_job_output_info type ssfcrescl.
select-options: s_vbeln for WA_vbak-vbeln.
select vbeln
erdat
ernam from vbak into
table it_vbak where vbeln in s_vbeln.
loop at it_vbak into wa_vbak.
append wa_vbak to it_vbak.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = sf_formname
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = sf_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 sf_fmname "getting error here
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
* USER_SETTINGS = 'X'
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
tables
it_vbak = IT_VBAK
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.
endloop.
clear wa_vbak.
Kindly suggest me.
The standard parameters (CONTROL_PARAMETERS, etc.) seem correct, look via SMARTFORMS transaction at the form interface. (look at IT_VBAK definition in caller and form)
Hints: When editing the driver program, first use the generated name as a pattern (SMARTFORMS menu Environment, Function Module Name), and then change the FM name by the variable returned by SSF_FUNCTION_MODULE_NAME. Before replacing the FM name, you could also call the source code inspector or the old SLIN transaction, those will check parameters definitions in the call.
Regards,
Raymond
Hi,
The same i repeated and deleted.
Edited by: madhurao123 on Nov 25, 2011 11:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
Check like this
DATA FMNAME TYPE RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZEPP_PUR_REQ'
IMPORTING
FM_NAME = FMNAME
CALL FUNCTION FMNAME
EXPORTING
P_EBAN = S_EBAN
TABLES
IT_EBAN = IT_EBAN
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.