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

error in 'CX_SY_DYN_CALL_ILLEGAL_TYPE' problem

Former Member
0 Likes
3,238

Dear Friends,

I developed a code for SD module for RAS GAS invoice. It it I m accessing it through VF02. on output there will be a smartform appered for invoice.

I tested the driver code and smartform individually and had no errors.

I attached the driver code and form through NACE for run time.

Now when I m executing it through VF02 , when I clicked on print preview it throws a error as show.

Plz help me to remove it. Error analysis and piece of code is attached.

Thanx and regards,

Error analysis

An exception occurred. This exception is dealt with in more detail below

. The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE',

was neither

caught nor passed along using a RAISING clause, in the procedure "PROCESSING"

"(FORM)"

.

Since the caller of the procedure could not have expected this exception

to occur, the running program was terminated.

The reason for the exception is:

The call to the function module "/1BCDWB/SF00000193" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "ITVBRK".

Although the currently specified field

"ITVBRK" is the correct type, its length is incorrect.

-


Information on where terminated

The termination occurred in the ABAP program "ZV_RASGAS " in "PROCESSING".

The main program was "SAPMV60A ".

The termination occurred in line 633 of the source code of the (Include)

program "ZV_RASGAS "

of the source code of program "ZV_RASGAS " (when calling the editor 6330).

Processing was terminated because the exception "CX_SY_DYN_CALL_ILLEGAL_TYPE"

occurred in the

procedure "PROCESSING" "(FORM)" but was not handled locally, not declared in

the

RAISING clause of the procedure.

The procedure is in the program "ZV_RASGAS ". Its source code starts in line 58

of the (Include) program "ZV_RASGAS ".

-


Source code extract

006030 no_function_module = 2

006040 OTHERS = 3.

006050 IF sy-subrc <> 0.

006060 * error handling

006070 cf_retcode = sy-subrc.

006080 PERFORM protocol_update.

006090 ENDIF.

006100 ENDIF.

006110

006120 IF cf_retcode = 0.

006130 PERFORM check_repeat.

006140 IF ls_composer_param-tdcopies EQ 0.

006150 nast_anzal = 1.

006160 ELSE.

006170 nast_anzal = ls_composer_param-tdcopies.

006180 ENDIF.

006190 ls_composer_param-tdcopies = 1.

006200 DO nast_anzal TIMES.

006210 * In case of repetition only one time archiving

006220 IF sy-index > 1 AND nast-tdarmod = 3.

006230 nast_tdarmod = nast-tdarmod.

006240 nast-tdarmod = 1.

006250 ls_composer_param-tdarmod = 1.

006260 ENDIF.

006270 IF sy-index NE 1 AND repeat IS INITIAL.

006280 repeat = 'X'.

006290 ENDIF.

006300 * call smartform invoice

006310 append itvbrp.

006320

-


> CALL FUNCTION lf_fm_name2

006340 EXPORTING

006350 RDT = rdt

006360 BILSDT = min

006370 BILEDT = max

006380 CUMMMSCM = cummmscm

006390 TPCUMMMBTU = tpcummmbtu

006400 TPCUMSCM = tpcumscm

006410 WS_IVBEL = WS_IVBEL

006420 WS_GVBEL = WS_GVBEL

006430 WS_BVBEL = WS_BVBEL

006440 WS_BILDT = WS_BILDT

006450 TPCUMMMBTUX = TPCUMMMBTUX

006460 GINVNO = inv

006470 BILDOC = BILDOC

006480 ZKBETR = ZKBETR

006490 zlng = zlng

006500 zrc = zrc

006510 zkb = zkb

006520 * VOLUM = VOLUM

-


thanx and regards,

sitendra

Dear Friends,

I developed a code for SD module for RAS GAS invoice. It it I m accessing it through VF02. on output there will be a smartform appered for invoice.

I tested the driver code and smartform individually and had no errors.

I attached the driver code and form through NACE for run time.

Now when I m executing it through VF02 , when I clicked on print preview it throws a error as show.

Plz help me to remove it. Error analysis and piece of code is attached.

Thanx and regards,

Error analysis

An exception occurred. This exception is dealt with in more detail below

. The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE',

was neither

caught nor passed along using a RAISING clause, in the procedure "PROCESSING"

"(FORM)"

.

Since the caller of the procedure could not have expected this exception

to occur, the running program was terminated.

The reason for the exception is:

The call to the function module "/1BCDWB/SF00000193" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "ITVBRK".

Although the currently specified field

"ITVBRK" is the correct type, its length is incorrect.

-


Information on where terminated

The termination occurred in the ABAP program "ZV_RASGAS " in "PROCESSING".

The main program was "SAPMV60A ".

The termination occurred in line 633 of the source code of the (Include)

program "ZV_RASGAS "

of the source code of program "ZV_RASGAS " (when calling the editor 6330).

Processing was terminated because the exception "CX_SY_DYN_CALL_ILLEGAL_TYPE"

occurred in the

procedure "PROCESSING" "(FORM)" but was not handled locally, not declared in

the

RAISING clause of the procedure.

The procedure is in the program "ZV_RASGAS ". Its source code starts in line 58

of the (Include) program "ZV_RASGAS ".

-


Source code extract

006030 no_function_module = 2

006040 OTHERS = 3.

006050 IF sy-subrc <> 0.

006060 * error handling

006070 cf_retcode = sy-subrc.

006080 PERFORM protocol_update.

006090 ENDIF.

006100 ENDIF.

006110

006120 IF cf_retcode = 0.

006130 PERFORM check_repeat.

006140 IF ls_composer_param-tdcopies EQ 0.

006150 nast_anzal = 1.

006160 ELSE.

006170 nast_anzal = ls_composer_param-tdcopies.

006180 ENDIF.

006190 ls_composer_param-tdcopies = 1.

006200 DO nast_anzal TIMES.

006210 * In case of repetition only one time archiving

006220 IF sy-index > 1 AND nast-tdarmod = 3.

006230 nast_tdarmod = nast-tdarmod.

006240 nast-tdarmod = 1.

006250 ls_composer_param-tdarmod = 1.

006260 ENDIF.

006270 IF sy-index NE 1 AND repeat IS INITIAL.

006280 repeat = 'X'.

006290 ENDIF.

006300 * call smartform invoice

006310 append itvbrp.

006320

-


> CALL FUNCTION lf_fm_name2

006340 EXPORTING

006350 RDT = rdt

006360 BILSDT = min

006370 BILEDT = max

006380 CUMMMSCM = cummmscm

006390 TPCUMMMBTU = tpcummmbtu

006400 TPCUMSCM = tpcumscm

006410 WS_IVBEL = WS_IVBEL

006420 WS_GVBEL = WS_GVBEL

006430 WS_BVBEL = WS_BVBEL

006440 WS_BILDT = WS_BILDT

006450 TPCUMMMBTUX = TPCUMMMBTUX

006460 GINVNO = inv

006470 BILDOC = BILDOC

006480 ZKBETR = ZKBETR

006490 zlng = zlng

006500 zrc = zrc

006510 zkb = zkb

006520 * VOLUM = VOLUM

-


thanx and regards,

sitendra

2 REPLIES 2
Read only

rainer_hbenthal
Active Contributor
0 Likes
1,209

To be honst i do not have the time to have a look at your code, but this exception is thrown when you deleiver a wrong type to function module or method, especially when you are going through a method and the declaration is of type any or clike or csequence.

Check this:

method declares an importing value of type csequence. in the method you are calling a function module which has an importing value of c. The compiler cant see of which type the variable is and doesnt throw an error. But if you deliver a string to the method the run time will throw exactly this exception cause a string does not fit the desired type.

So check every type declarations used in function modules and methods and compare them to those needed.

Read only

Former Member
0 Likes
1,209

According to your shortdump the length of one parameter is wrong:

Although the currently specified field "ITVBRK" is the correct type, its length is incorrect.

Check the definition of ITVBRK in the function module and make sure that you define it in the exact same way. That should solve your problem.

Regards,

Michael