cancel
Showing results for 
Search instead for 
Did you mean: 

smartform error

Former Member
0 Kudos

hi all

i want to pass two internal tables to my smart form

i give the folowing code in the globel definition TYPES

types: begin of st_itab1,

mblnr like mkpf-mblnr,

bldat like mkpf-bldat, "document date

mjahr like mkpf-mjahr, "document year

budat like mkpf-budat, "posting date

end of st_itab1.

types: begin of st_itab2,

mblnr like mseg-mblnr,

mjahr like mseg-mblnr,

bwart like mseg-bwart,

matnr like mseg-matnr,

menge like mseg-menge,

meins like mseg-meins,

end of st_itab2.

and in form interface i wrote in TABLES:

IATB4 TYPE ST_ITAB1

ITAB5 TYPE ST_ITAB2.

i hav not used these tables in the smart form

but when i activate this form

the following error comes

Form Interface: Only table types may be used as the reference type

PLZ HELP

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

As far as my knowledge goes you have to create a structure. While activating it will search for its associated type in DDIC. Without creating structures I don't know whether its possible or not. But after creating structures I have got my output.

Regards,

mallick

Former Member
0 Kudos

1) Are you using any driver program to call this smartforms. if so , the structure of the internal table should be created as structure in database, otherwise smartforms won't recognize it. Don't declare anything in types tab. don't put anything under global data.

delete the code you have written earlier.

2) if there is no driver program to pass data's to smartforms. Don't declare anything on table tab. and write whatever I wrote in global declaration there.

The error is due to the fact that in tables tab your internal table is of your customized type which the smartforms does not understand. It refers to data dictionary, there it does not find any such structure. So it displays the error.

Regards,

mallick

Former Member
0 Kudos

look wat i want to do

i wil make a report from which i wil call this smart form

and wil pass two internal tables to it.

now thing is i hav to create structure for that in the smartform in se11

but can i do the same by declaring types in the global definition

this is my prob

plz help

regards

Former Member
0 Kudos

Hi,

You use table tab under global declaration to pass internal tables from driver program to smartforms. Here you have to create a structure using se11 containing the fields and in the reference field instead of writing st_itab1 give the name of the structure created. types is used for making structures local to the smartforms. You have to declare it again in global declarations the tables or structures that has the same structure as that of the typed structure. In case you are not using driver program don't write it under tables.

rather in global declaration write

st_itab3 type st_itab1 (for declaring work area)

st_itab4 type table of st_itab1 ( for declaring the table).

Similarly do the same for type st_itab2.

Reg

Former Member
0 Kudos

hi

no i dont want to create any structures

i want to use the local structure

i have tried ur code

but it gives same error

plz help