‎2005 Sep 18 10:54 AM
Dear all,
I'm developing a simple samrt form. But getting short dump at the print program end.
form = 'Z_SO_DATA'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = form
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
EXPORTING
form_kydate = p_kydate
TABLES
form_itab_header = itab
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.
The moment controls reaches at <b>CALL FUNCTION fm_name</b>. It throws a short dump saying..<b>Type conflict when calling a function module (field length).</b>. Please suggest.
Thanks,
Anup.
‎2005 Sep 18 11:12 AM
Hi Anup,
Please check whether the parameter "form_itab_header" and the internal table "itab" are of same type, length.
I think the fields are different.
Thanks
Vinod
‎2005 Sep 18 11:04 AM
can you give us the data declaration of form and fm_name.
there is something wrong with that.
the form varialbe should be of type TDSFNAME
data: form type TDSFNAME .
and the fm_name should be of type RS38L_FNAM .
data: fm_name type RS38L_FNAM .
Regards
Raja
‎2005 Sep 18 11:27 AM
Hi
The answer of Raja is right, when you use a FM you should always check the variable type is the same of fm parameter where variable is transfered.
So you should check the type of paramenter in SE37 and then declare the variable like it.
These is a piece of code of FM SSF_FUNCTION_MODULE_NAME where FORNAME parameter is declared:
FUNCTION SSF_FUNCTION_MODULE_NAME .
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(FORMNAME) TYPE TDSFNAME
So your variable should be declare like TDSFNAME:
DATA FN_NAME TYPE TDSFNAME.
Generally if you use a fm:
FUNCTION <FUNCTION>.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(PARAMETER) TYPE <TYPE>
then in your program:
DATA: MY_PARAM TYPE <TYPE>.
CALL FUNCTION <FUNCTION>
.....
.....
PARAMETER = MY_PARAM
Max
‎2005 Sep 18 11:12 AM
Hi Anup,
Please check whether the parameter "form_itab_header" and the internal table "itab" are of same type, length.
I think the fields are different.
Thanks
Vinod
‎2005 Sep 18 12:21 PM
Dear Vinod,
Thanks for ur help...u caught it rightly.
Regds,
ANUP.
‎2005 Sep 18 12:24 PM
i guess Vindo deserves full points as he has solved your problem.
Regards
Raja
‎2005 Sep 18 2:11 PM
Hi
Besides all the correct answers you can directly find the info of which field is a type conflict in calling FM in the short dump ( just scroll down in the dump and you will find this ). This will help if you miss something on what has been stated before in this thread .
Cheers