cancel
Showing results for 
Search instead for 
Did you mean: 

smartform Error

Former Member
0 Kudos

Hi Experts,

I am getting the following error when i run my Smartform Driver Program. Following is the error.

Runtime Errors         CALL_FUNCTION_CONFLICT_TYPE
Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
Date and Time          03.03.2009 13:03:12


 Error analysis
     An exception occurred that is explained in detail below.
     The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
      not caught in
     procedure "CALL_SMARTFORM" "(FORM)", nor was it propagated by a RAISING clause.
     Since the caller of the procedure could not have anticipated that the
     exception would occur, the current program is terminated.
     The reason for the exception is:
     The call to the function module "/1BCDWB/SF00000234" is incorrect:

     The function module interface allows you to specify only
     fields of a particular type under "IM_T_COMM".
     The field "IT_COMM" specified here is a different
     field type
     .

I have created my Driver Program Internal Table as a Data Type in the system with the name ZCOMM which refers to a structure ZCOMMPRINT. Please find herewith the structure below.

Field		DataElement	DataType	Length	Decimal	ShortDescription

MANDT		MANDT		CLNT		3	0	Client
VTEXT		VTEXT		CHAR		20	0	Description
SPART		SPART		CHAR		2	0	Division
DIVISIOn 	VTEXT		CHAR		20	0	Description
PRCTR		PRCTR		CHAR		10	0	Profit Center
DMBTR		DMBTR		CURR		13	2	Amount in Local Currency
DMBTR_DR	DMBTR		CURR		13	2	Amount in Local Currency
DMBTR_CR	DMBTR		CURR		13	2	Amount in Local Currency
NETVAL		DMBTR		CURR		13	2	Amount in Local Currency
COMM_VAL	DMBTR		CURR		13	2	Amount in Local Currency
ST_VAL		DMBTR		CURR		13	2	Amount in Local Currency
CESS_VAL	DMBTR		CURR		13	2	Amount in Local Currency
HCESS_VAL	DMBTR		CURR		13	2	Amount in Local Currency

Since it is a big report i will give the structure definition and internal table code in my Driver program.Pl find the code below: -

Internal Table Definition

data: it_comm type zcomm with header line.

Internal Table Data passing in Driver Program.

data: wa_matnr_1 like mara-matnr,
              wa_matkl_1 like vbrp-matkl,
              wa_ktgrm_1 like vbrp-ktgrm,
              wa_hkont like bsis-hkont,
              wa_gltxt like skat-txt20,
              wa_hkont_dr like bsis-hkont,
              wa_hkont_cr like bsis-hkont,
              wa_maktg_1 like makt-maktg,
              wa_vtext_1 type vtext,
              wa_vtext_2 type vtext,
              wa_spart type spart,
              wa_prctr type prctr.

        sort it_final_1 by matnr matkl ktgrm division prctr hkont.

        loop at it_final_1.
          wa_matnr_1 = it_final_1-matnr.
          wa_matkl_1 = it_final_1-matkl.
          wa_ktgrm_1 = it_final_1-ktgrm.
          wa_vtext_1 = it_final_1-vtext.
          wa_spart = it_final_1-spart.
          wa_hkont = it_final_1-hkont.
          wa_gltxt = it_final_1-gltxt.
          wa_vtext_2 = it_final_1-division.
          wa_prctr = it_final_1-prctr.
          wa_maktg_1 = it_final_1-maktg.

          at end of count.
            sum.
            it_comm-vtext = wa_vtext_1.
            it_comm-spart = wa_spart.
            it_comm-division = wa_vtext_2.
            it_comm-prctr = wa_prctr.
            it_comm-dmbtr = abs( it_final_1-dmbtr - it_final_1-disc ).
            it_comm-dmbtr_dr = abs( it_final_1-dmbtr_dr ).
            it_comm-dmbtr_cr = abs( it_final_1-dmbtr_cr ).
            it_comm-netval = ( it_comm-dmbtr + it_comm-dmbtr_dr ) - ( it_comm-dmbtr_cr ).
            it_comm-comm_val = ( it_comm-netval * p_comm ) / 100.
            it_comm-st_val = ( it_comm-comm_val * 12 ) / 100.
            it_comm-cess_val = ( it_comm-st_val * 2 ) / 100.
            it_comm-hcess_val = ( it_comm-st_val * 1 ) / 100.

            append it_comm.
            clear wa_matnr_1.
            clear wa_vtext_1.
            clear wa_matkl_1.
            clear wa_ktgrm_1.
            clear wa_hkont.
            clear wa_hkont_dr.
            clear wa_hkont_cr.
          endat.
          clear it_final_1.
          clear it_comm.
        endloop.

Calling Smartform

form call_smartform .

* /1BCDWB/SF00000234

call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname                 = c_formname
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 importing
   fm_name                  = fm_sform
 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.

    wa_controlpara-device = 'PRINTER'. "Device
    wa_controlpara-no_dialog = 'X'. "No dialog

    wa_output-tddest = 'LOCL'.


call function fm_sform
  exporting
*   ARCHIVE_INDEX              =
*   ARCHIVE_INDEX_TAB          =
*   ARCHIVE_PARAMETERS         =
   control_parameters         = wa_controlpara
*   MAIL_APPL_OBJ              =
*   MAIL_RECIPIENT             =
*   MAIL_SENDER                =
   output_options             = wa_output
*   USER_SETTINGS              = 'X'
    im_t_comm                  = it_comm
* IMPORTING
*   DOCUMENT_OUTPUT_INFO       =
*   JOB_OUTPUT_INFO            =
*   JOB_OUTPUT_OPTIONS         =
 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.                    " CALL_SMARTFORM

In my Smartform i have defined the Import Parameter in the Form Interface as below

ParameterName		TypeAssignment	AssociatedType	DefaultValue

ARCHIVE_INDEX		TYPE		TOA_DARA	                     
ARCHIVE_INDEX_TAB	TYPE		TSFDARA	                     
ARCHIVE_PARAMETERS	TYPE		ARC_PARAMS	                     
CONTROL_PARAMETERS	TYPE		SSFCTRLOP	                     
MAIL_APPL_OBJ		TYPE		SWOTOBJID	                     
MAIL_RECIPIENT		TYPE		SWOTOBJID	                     
MAIL_SENDER		TYPE		SWOTOBJID	                     
OUTPUT_OPTIONS		TYPE		SSFCOMPOP	                     
USER_SETTINGS		TYPE		TDBOOL		'X'
IM_T_COMM		TYPE		ZCOMM	

Can you please help me out as to why the error is coming?

Thank You,

Regards,

Jitesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

call function fm_sform

exporting

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

control_parameters = wa_controlpara

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

output_options = wa_output

  • USER_SETTINGS = 'X'

  • im_t_comm = it_comm Commented

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

*****add

TABLES

im_t_comm = it_comm

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.

Former Member
0 Kudos

Hi there,

I got a small problem in the smartform. When i executed my Driver Program and Smartform in DEVELOPMENT server it showed the output without any data. So i transferred it to QUALITY server for testing. But in QUALITY server when the Smartform gets executed it shows the following error: -

"Reference Field IM_FS_COMM-DMBTR unknown in Form"

Now in the SMARTFORM i have defined IM_FS_COMM as follows: -

Global Definitions ==> Global Data ==> IM_FS_COMM type ZCOMMPRINT

where ZCOMMPRINT is structure.

Then in the MAIN WINDOW i am looping it as follows: -

IM_T_COMM into IM_FS_COMM

Then in my MAIN AREA i am calling the columns from IM_FS_COMM . For Ex:

&IM_FS_COMM-DIVISION&
&IM_FS_COMM-DMBTR&
&IM_FS_COMM-DMBTR_DR&
&IM_FS_COMM-DMBTR_CR&
&IM_FS_COMM-NETVAL&
&IM_FS_COMM-COMM_VAL&
&IM_FS_COMM-ST_VAL&

Can you tell what the problem is? Welcome for any more clarifications

Thanks,

Regards,

Jitesh

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi there,

I got a small problem in the smartform. When i executed my Driver Program and Smartform in DEVELOPMENT server it showed the output without any data. So i transferred it to QUALITY server for testing. But in QUALITY server when the Smartform gets executed it shows the following error: -

"Reference Field IM_FS_COMM-DMBTR unknown in Form"

Now in the SMARTFORM i have defined IM_FS_COMM as follows: -

Global Definitions ==> Global Data ==> IM_FS_COMM type ZCOMMPRINT

where ZCOMMPRINT is structure.

Then in the MAIN WINDOW i am looping it as follows: -

IM_T_COMM into IM_FS_COMM

Then in my MAIN AREA i am calling the columns from IM_FS_COMM . For Ex:

&IM_FS_COMM-DIVISION&
&IM_FS_COMM-DMBTR&
&IM_FS_COMM-DMBTR_DR&
&IM_FS_COMM-DMBTR_CR&
&IM_FS_COMM-NETVAL&
&IM_FS_COMM-COMM_VAL&
&IM_FS_COMM-ST_VAL&

Can you tell what the problem is? Welcome for any more clarifications

Thanks,

Regards,

Jitesh

Former Member
0 Kudos

Hi,

in smartforms goto form interface- -


tables----- declare ur internal table.

Thanks

Sai

Former Member
0 Kudos

Hi

you can also look in thread

" Type conflict when calling a function module in smartform "

that is exactly the same ( also from today )

Gr., Frank

Former Member
0 Kudos

Hi,

U have to pass the parameter " im_t_comm = it_comm " in TABLES Section.

because it_Comm is an internal table and not a struture.

If it is a structure then u can pass it in importing section.

Former Member
0 Kudos

hi there..

thanks for reply...

where should i pass it...

In SMARTFORM in Form Interface --> Import Parameters i have already passed IM_T_COMM type ZCOMM..

If in the report then when i am calling functional module the Tables Section does not appear.. Can you please given an example to illustrate..

thanks ,

Regards,

Jitesh

Former Member
0 Kudos

Hi,

declare in se11 also a table type of your zcomm and use that one in your smartform.

Now in smartform it sees the import as a structure not as a table type.

Gr., frank

Former Member
0 Kudos

ZCOMMPRINT is defined as a structure..

I have defined a table type ZCOMM which refers to the above structure...

I have referring IT_COMM type ZCOMM and IT_COMM type standard table of ZCOMMPRINT.

but both times the same error keeps on coming.

Please tell if you want any more detail. I will be willing to give..

Regards,

Jitesh

Former Member
0 Kudos

declare like this..


data: it_comm type standard table of ZCOMMPRINT with header line.

Edited by: Arunima Rudra on Mar 3, 2009 1:34 PM