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

SmartForms: Error Msg: Field is unknown

Former Member
0 Likes
4,902

Hi All,

I have SmartForm(SF) with the following definition:

Note: Z_MATNR is a custom table.

Form Interface

P_PRINT TYPE Z_MATNR

P_PAGE TYPE I

Global Definitions

GWA_PRINT TYPE Y_MATNR

IT_PRINT TYPE TABLE OF Y_MATNR

Global Definitions>Types Tab

TYPES: BEGIN OF Y_MATNR,

MATNR TYPE MATNR,

MAKTX TYPE MAKTX,

END OF Y_MATNR.

I have a secondary window, inside it is a text node and code node.

In my code node, I have the following declared:


READ TABLE IT_PRINT INTO GWA_PRINT INDEX 3.

In my text node, I have


&GWA_PRINT-MATNR&

I'm having an error:

After doing a code check in SF, I have the error:

The field IT_PRINT is unknown, but there is a field with the similar name GWA_PRINT.

What would be the cause? I have them all declared already.

Thanks

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
2,802

have you entered IT_PRINT in import parameters.. in the program lines where you are reading the table..

5 REPLIES 5
Read only

former_member156446
Active Contributor
0 Likes
2,803

have you entered IT_PRINT in import parameters.. in the program lines where you are reading the table..

Read only

0 Likes
2,802

Sorry, need to revise my scenario again.

Note: Z_MATNR is a custom table.

Form Interface

IT_PRINT TYPE TABLE OF Z_MATNR

P_PAGE TYPE I

Global Definitions

GWA_PRINT TYPE Y_MATNR

Global Definitions>Types Tab

TYPES: BEGIN OF Y_MATNR,

MATNR TYPE MATNR,

MAKTX TYPE MAKTX,

END OF Y_MATNR.

Global Definitions>INITIALIZATION tab

Input Parameters: IT_IDPRINT (I also try to remove this one)

Output Parameters: IT_IDPRINT

I have a secondary window, inside it is a text node and code node.

In my code node, I have the following declared:


READ TABLE IT_PRINT INTO GWA_PRINT INDEX 3.

In my text node, I have


&GWA_PRINT-MATNR&

I'm having an error:

After doing a code check in SF, I have the error:

The field IT_PRINT is unknown, but there is a field with the similar name GWA_PRINT.

What would be the cause? I have them all declared already.

Thanks

Edited by: Jaime Cabanban on Feb 19, 2010 2:37 AM

Read only

0 Likes
2,802

Hi,

Have you also entered the table IT_PRINT in the input parameters of Code tab? if not entered, please enter and try.

Hope it helps you.

Thanks,

Venkat.

Read only

0 Likes
2,801

Hi Jaime,

You probably need to declare both variables you are using, in the Import & Export Parameters of your Coding Node.

Then You can get result of your below code.

    • READ TABLE IT_PRINT INTO GWA_PRINT INDEX 3.**

Regards,

Varun

Read only

0 Likes
1,581

Hello, 
I'm facing same issue in my smartform.
Could you help, how you solve it.
I defined the field in input/output parameters as suggested. but still getting the error same as you for my field.