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

runtime error in executing smartform

Former Member
0 Likes
3,987

Hi,

I am working on smartform and its abap code in which i am getting runtime error :-

In the function "/1BCDWB/SF00000004", the STRUCTURE parameter "ITEM" is typed

in such a way

that only actual parameters are allowed, which are compatible in Unicode

with respect to the fragment view. However, the specified actual

parameter "ITEM_FINAL1" has an incompatible fragment view.

Here,item and item_final1(with header line) are the internal tables. plzz provide me guidelines for solvig this problem.

Edited by: ricx .s on Jan 16, 2009 6:24 AM

38 REPLIES 38
Read only

Former Member
0 Likes
3,830

Hi,

in the form interface give the name of all the import, export and tables parameter.

In table parameter check wheather all the fields are compatible to internal table or not.

hope it will solve your problem.

Regards

Rajesh Kumar

Read only

0 Likes
3,830

Hi,

I had checked the form interface,intializations in the smartform,but still it is giving the runtime error.

Read only

Former Member
0 Likes
3,830

Hi,

Check field type and field values.

Regards

Md.MahaboobKhan

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello Ricx,

Is the table "ITEM" a SORTED or a STANDARD internal table?

BR,

Suhas

Read only

Former Member
0 Likes
3,830

hi,

Yes,it is the sorted internal table similarly defined as a structure ZPOITEM having declaration of the fields like it.

i had checked in the debug mode that when it comes on calling the smartform it moves to the run time error.

plzz provide me guidelines for solving this problem.

Read only

Former Member
0 Likes
3,830

hi,

paste your smartform call function fnam code here..

and tell me how you declared the internal table in the smartform (form interfaces)..

i will try to help you..

regards

vijay

Read only

Former Member
0 Likes
3,830

Hi,

Please paste the complete error it is giving.

Regards

Rajesh Kumar

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello Ricx,

Plz make the table as a STANDARD Internal table & then sort the table based on the sort key.

I think it will solve the problem.

BR,

Suhas

Read only

Former Member
0 Likes
3,830

hi,

i had declared the ITEM and ITEM_FINAL1 AS :-

DATA : BEGIN OF item OCCURS 0,

ebelp LIKE ekpo-ebelp,

txz01 LIKE ekpo-txz01,

cc LIKE cacns_general-reserve3,

eindt LIKE eket-eindt,

menge LIKE ekpo-menge,

rate LIKE konv-kbetr,

rate1 LIKE konv-kbetr, " NEW ZING

rate2 LIKE konv-kbetr, " NEW ZGRD

rate3 LIKE konv-kbetr, " NEW ZBDL

disc LIKE konv-kbetr,

ed LIKE konp-kbetr,

ed1 LIKE konp-kbetr,"NEW

ed2 LIKE konp-kbetr,"NEW

tax LIKE konp-kbetr,

cutc LIKE konv-kbetr,

pf LIKE konv-kbetr,

insurance LIKE konv-kbetr,

frt LIKE konv-kbetr,

inst LIKE konv-kbetr,

octroi LIKE konv-kbetr,

knumh LIKE konh-knumh,"NEW

matnr LIKE ekpo-matnr,"NEW

vakey LIKE konh-vakey,"NEW

total LIKE konv-kbetr,

mtart LIKE ekpo-mtart,

bwtar LIKE ekpo-bwtar,

knttp LIKE ekpo-knttp,

meins LIKE ekpo-meins,

END OF item.

DATA : item_final1 LIKE item OCCURS 0 WITH HEADER LINE.

here's d code of the form :-

CALL FUNCTION form_name

EXPORTING

control_parameters = t_control_parameters

output_options = t_output_options

user_settings = 'X'

vknumv = vknumv

vtex = vtex

vebeln = vebeln

vkwert = vkwert

TABLES

header = header

item = item_final1

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.

IN the smartform i had declared it as it was in the declaration of the internal table(ITEM).

I

Read only

Former Member
0 Likes
3,830

Hi,

Create your internal table using TYPES statement.

i.e first create a structure with the TYPES statement and then create internal tables using

<ype standard table of> statement. sometimes it creates a problem to declare tables with header line.

accordingly make work areas for internal table and declare them in the form interface.

Regards

Rajesh Kumar

Read only

Former Member
0 Likes
3,830

hi,

but before adding the 3 fields the program was executing fine but when i added the fields i.e.

rate1 LIKE konv-kbetr, " NEW ZING

rate2 LIKE konv-kbetr, " NEW ZGRD

rate3 LIKE konv-kbetr, " NEW ZBDL

it is giving the probelm and i had added these field in the structure also.

Read only

Former Member
0 Likes
3,830

create the internal table item_final1 such that it is like that of zstruture that u created in se11 ......

data : item_final1 type table of zstru.....

ur structure in smartform and internal table in driver program should be same and fields should be same order...u said u have added 3 new fields , so check it out

Read only

Former Member
0 Likes
3,830

Hi Rajesh,

order of the fields in Internal table and The structure used in smart formm suppose to be same...

better ..

create a inertnal table with include structure..(which u used in smart form)

Hope It helps.

Guru

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello Ricx,

but before adding the 3 fields the program was executing fine but when i added the fields i.e.

rate1 LIKE konv-kbetr, " NEW ZING

rate2 LIKE konv-kbetr, " NEW ZGRD

rate3 LIKE konv-kbetr, " NEW ZBDL

it is giving the probelm and i had added these field in the structure also

KONV-KBETR is a currency / quantity field. Go to SE11 & check the reference in KONV table.

Plz declare the same in you SF: Global Defn. --> Currency/Quant. Field.

Hope this will help.

BR,

Suhas

Read only

Former Member
0 Likes
3,830

HI,

I had checked as you had said it had declared like u had said i.e. reference field and it is accurate .

when i execute the program in the debug mode it is filling the ITEM_FINAL1 similar to the ITEM whic is having the accurat data but when i come out of the loop and goes to the call form ,it gives this error:-

Short text

Type conflict during structure parameter transfer at CALL FUNCTION.

What happened?

Error in the ABAP Application Program

The current ABAP program "ZNEW29" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

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 and

therefore caused a runtime error.

The reason for the exception is:

In the function "/1BCDWB/SF00000004", the STRUCTURE parameter "ITEM" is typed

in such a way

that only actual parameters are allowed, which are compatible in Unicode

with respect to the fragment view. However, the specified actual

parameter "ITEM_FINAL1" has an incompatible fragment view.

CALL FUNCTION form_name

EXPORTING

control_parameters = t_control_parameters

output_options = t_output_options

user_settings = 'X'

vknumv = vknumv

vtex = vtex

vebeln = vebeln

vkwert = vkwert

TABLES

header = header

item = item_final1

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

plz provide me guidelines to solve this problem.i had checked the form interface also and it is rightly written.

Edited by: ricx .s on Jan 16, 2009 10:08 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello Ricx,

Can you tell how you have declare the interface parameter ITEM in the SF, i want the exact definition ?


CALL FUNCTION form_name
EXPORTING
control_parameters = t_control_parameters
output_options = t_output_options
user_settings = 'X'
vknumv = vknumv
vtex = vtex
vebeln = vebeln
vkwert = vkwert
TABLES
header = header
item = item_final1 "--> Plz give the exact definition as in SF. TYPE mismatch occuring here
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.

BR,

Suhas

Read only

Former Member
0 Likes
3,830

hi,

i had declared the following in the Interface parameter ,the following:-

HEADER LIKE ZHEADERPO1,

ITEM LIKE ZITEMPO1.

here, ZHEADERPO1 is a structure and ZITEMPO1 is alos a struture which is having same fields as ITEM and ITEM is a Internal table which is declared in the program..

Here, there is no such declaration of item_final1 in the smartform only item ,but 1 thing is that it was the code written by someone else and it is working fine but when i add the 3 fields,problem described occurs.

Read only

Former Member
0 Likes
3,830

Hi,

Try like this:

CALL FUNCTION form_name

EXPORTING

control_parameters = t_control_parameters

output_options = t_output_options

user_settings = 'X'

vknumv = vknumv

vtex = vtex

vebeln = vebeln

vkwert = vkwert

TABLES

header = header

item = item

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

Regards

Rajesh Kumar

Read only

Former Member
0 Likes
3,830

hi,

i had tried the concept of changing the item_final to item,but still it is giving the same run time error.

Read only

Former Member
0 Likes
3,830

Hi,

is ZNEW29 is report program. if yes then please paste this program here.

Regards

Rajesh Kumar

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello,

I think ZITEMPO1 is a dictionary structure. Did you add the 3 fields to your structure as well?

Suhas

Read only

Former Member
0 Likes
3,830

hi,

yes it is a structure and i had added 3 fields in that structure also.and znew 29 is the program.

Edited by: ricx .s on Jan 16, 2009 10:58 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello Ricx,

Can you change the declaration for your table and check:


* DATA : item_final1 LIKE item OCCURS 0 WITH HEADER LINE.
DATA : item_final1 LIKE ZITEMPO1 OCCURS 0 WITH HEADER LINE.

BR,

Suhas

Read only

Former Member
0 Likes
3,830

hi,

i had already declared as u had said or u want to declare it in the some other format?

Read only

Former Member
0 Likes
3,830

Hi,

To trace runtime errors in smartforms, use SMARTFORM_TRACE and check if it gets u near the problem.

Read only

Former Member
0 Likes
3,830

hi,

plzz provide me guidelines how to solve this problem as i had tried as per allu said it is still not working.

Edited by: ricx .s on Jan 16, 2009 11:38 AM

Read only

Former Member
0 Likes
3,830

Hi did you try this???

Hi,

item_final1 is an internaal table with header line so you have to pass item_final1[] not just item_final1 which is the work area. try this

CALL FUNCTION form_name

EXPORTING

control_parameters = t_control_parameters

output_options = t_output_options

user_settings = 'X'

vknumv = vknumv

vtex = vtex

vebeln = vebeln

vkwert = vkwert

TABLES

header = header

item = item_final1[]

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.

santhosh

Read only

Former Member
0 Likes
3,830

hi,

i had tried it by doing it but it is giving the same run time error.

1 thing i had observed in the debug mode that ITEM_FINAL1[] is a Standard Table[1x28(758) where as

ITEM_FINAL1 Structure: flat & not charlike.

i thought it might bring the output but still it is giving the error (run time.)

Read only

Former Member
0 Likes
3,830

Hi,

You are correct.

Now try doing that with Header also as I see even HEADER is in the tables.

pass HEADER[]

santhosh

Read only

Former Member
0 Likes
3,830

hi,

i had seen the header also and passed it in the calling the smartform also as header[] and item_final1[],but still it is giving the run time error.

Runtime Errors CALL_FUNCTION_UC_STRUCT

Except. CX_SY_DYN_CALL_ILLEGAL_TYPE

Date and Time 16.01.2009 16:27:30

What happened?

Error in the ABAP Application Program

The current ABAP program "ZNEW29" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

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 and therefore caused a runtime error.

The reason for the exception is:

In the function "/1BCDWB/SF00000004", the STRUCTURE parameter "ITEM" is typed

in such a way that only actual parameters are allowed, which are compatible in Unicode

with respect to the fragment view. However, the specified actual

parameter " " has an incompatible fragment view.

>>>>> CALL FUNCTION form_name

EXPORTING

control_parameters = t_control_parameters

output_options = t_output_options

user_settings = 'X'

vknumv = vknumv

vtex = vtex

vebeln = vebeln

vkwert = vkwert

TABLES

header = header[]

item = item_final1[]

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

Edited by: ricx .s on Jan 16, 2009 12:08 PM

Read only

Former Member
0 Likes
3,830

Hi,

in the function call.

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

this part is commented or uncommented.

if ot is commented then uncomment it and try to run your program.

Regards

Rajesh Kumar

Edited by: Rajesh Kumar on Jan 16, 2009 12:15 PM

Read only

Former Member
0 Likes
3,830

hi,

the part you are specifying is uncommented in the program.

Read only

Former Member
0 Likes
3,830

Hi,

What are the extra 3 things you have added to ZITEMPO1. and the types against them?

santhosh

Read only

Former Member
0 Likes
3,830

hi,

i had defined the fields in that structure :-

RATE1,RATE2 and RATE3 which are having the CURR(data type),(11,2).

and their reference fields RV61A-KOEI1.

in the smartform i had declared it in the global definitions :-

VRATE1 -> TYPE -> C LENGTH 13

VRATE1 -> TYPE -> C LENGTH 13

VRATE1 -> TYPE -> C LENGTH 13

i had declared it like this bcoz there is a field which is similar to it i.e. RATE which is displaying the value in the smartform.

Edited by: ricx .s on Jan 16, 2009 12:25 PM

Read only

Former Member
0 Likes
3,830

Hi smart form

Declare them as decimal type not char.

if you want a char field for display purposes. declare a seperate field and then use Write ..to

how are you filling these values in smartform.

Write item-rate1 To VRATE1. "Correct

or just VRATE1 = item-rate1. " Wrong

santhosh

Read only

Former Member
0 Likes
3,830

hi,

but there is a field called rate which i s present in the smartform and displaying the dat but i will change it to type decimals 3.

it is giving error that vrate 1 must be char type .

and the value is passed as move item-rate1 to vrate1.

is this is the correwct way of passing the value?

Edited by: ricx .s on Jan 16, 2009 12:46 PM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,830

Hello Ricx,

Place a hardcoded break-point at this point & check if the dump is coming here.

I think this is where you have done the mistake. You are trying to move a type decimals 3 variable to a char type variable. Hence the issue.

I think you should use:


BREAK <your username>.
WRITE item-rate1 to vrate1.

BR,

Suhas

Read only

Former Member
0 Likes
3,830

Hi,

item_final1 is an internaal table with header line so you have to pass item_final1[] not just item_final1 which is the work area. try this

CALL FUNCTION form_name

EXPORTING

control_parameters = t_control_parameters

output_options = t_output_options

user_settings = 'X'

vknumv = vknumv

vtex = vtex

vebeln = vebeln

vkwert = vkwert

TABLES

header = header

item = item_final1[]

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.

santhosh