Application Development 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: 

Error in Smartform

Former Member
0 Kudos

Hi all,

I've been experiencing the following problem in a smartform:

when I execute the form it tells me that there are not

reference field for wa_material-netwr, but this work area is base on a structure that do have a reference field for netwr.

Thanks in advanced,

Fidel

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Fidel,

This problem arises for Currency fields and quantity fields....

What you need to do is create an extra field of type C with similar length....

Then assign the values of NETWR to this field where you want this to be printed.

Just refer to the link... This will help you out...

This will work..

Regards,

SP.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Is this structure referring to a structure in SE11? If you have declared a global variable for NETWR in the global def, then you need to provide a ref. curr variable there.

REgards,

Ravi

NOTE : Please mark the helpful answers

Former Member
0 Kudos

HI

GUD

HAVE YOU CAREATED A STRUCTURE FOR THE WORKAREA WA_MATERIAL.

IF YOU CREATED A STRUCTURE THAN DECLARE THAT STRUCTURE IN THE DRIVER PROGAM ,

DECLARE THAT STRUCTURE NAME IN THE FORM INTERFACE IN THE TABLE TAB.

SAME YOU DO IN THE GLOBAL DEFINITION GLOBAL DATA TAB.

YOU HAVE NOT MENTIONED WHEATHER YOU HAVE DECLARE ANY TABLE OR NOT.

IF YOU HAVE DECLARE ANY TABLE THAN IN THE DATA TAB YOU HAVE TO GIVE THE WORK AREA NAME IN THE RIGHT HAND SIDE.

THANKS

MRUTYUN

Former Member
0 Kudos

Hi Fidel,

This problem arises for Currency fields and quantity fields....

What you need to do is create an extra field of type C with similar length....

Then assign the values of NETWR to this field where you want this to be printed.

Just refer to the link... This will help you out...

This will work..

Regards,

SP.

Former Member
0 Kudos

Hi,

Use

You can assign a currency field or a quantity field to a table field in the ABAP Dictionary if a currency or a quantity is involved. Smart Forms consider the assigned currency or unit when such fields are output:

If the value field is in the same table as the corresponding currency field or quantity field, Smart Forms automatically recognizes the reference and formats the value field according to the currency or unit in the assigned field when the field is output.

If the value field and the currency field or quantity field are in different tables, you can define reference fields explicitly in the global definitions of a form.

A reference table has to be specified for fields that contain currency amounts (data type CURR) or quantity specifications (data type QUAN). This reference table has to contain a field (reference field) with the currency key format (data type CUKY) or the format for quantity units (data type UNIT). A program assigns the field to the reference field but not until runtime.

The field name and the reference field have to be defined in the form. This is checked when the form is activated (and in the local check). The reference field can either refer to a data type in the Data Dictionary or to local types within the form.

Example

If a field is filled with currency amounts, the corresponding currency is determined from the assigned reference field, that is, the value currently entered in the reference field determines the currency.

Thanks and Regards,

Bharat Kumar Reddy.V

Former Member
0 Kudos

declare a variable with a datatype 'NETWR'

then in the 'currency reference' tab give a reference,like..

FieldName: variablename

Reference Field : fieldname of document currency key (*)

DataType: CURR

frm se11 view the table's fields and click the 'Currency/Quantity fields' tab and check the reference table and the reference table.

(*) In this reference field u have to give the reference like this 'referencetable-referencefield'.

but make sure u have delcared a table of the type 'referencetable'.

hope u got it.!