Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in smartform

Former Member
0 Likes
747

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.

1 ACCEPTED SOLUTION
Read only

Vinod_Chandran
Active Contributor
0 Likes
727

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

6 REPLIES 6
Read only

athavanraja
Active Contributor
0 Likes
727

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

Read only

0 Likes
727

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

Read only

Vinod_Chandran
Active Contributor
0 Likes
728

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

Read only

0 Likes
727

Dear Vinod,

Thanks for ur help...u caught it rightly.

Regds,

ANUP.

Read only

0 Likes
727

i guess Vindo deserves full points as he has solved your problem.

Regards

Raja

Read only

Former Member
0 Likes
727

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