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: 

Smartforms Reference fields

Former Member
0 Kudos

Hello all,

I have made a smartform with some currency and amount fields. When I´m calling the form from the report, I´m getting the error, that I haven´t declared reference fields. I can remember, that I have done that before, but I can´t find the place to declare these fields!

I´m working on a 4.6C System. Shouldn´t be there a special option in the global data area?

Regards Michael

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In Global Definition->Global Data,declare the character variable whose output lenght is equal to that of that field.

In Program logic,use the field as input parameter and the variable you declared as output parameter.

In the coding,assign the value to the variable.

Then instead of printing the field,print the variable.

Refer this thread:

Regards,

Gayathri

4 REPLIES 4

Former Member
0 Kudos

Hi,

In Global Definition->Global Data,declare the character variable whose output lenght is equal to that of that field.

In Program logic,use the field as input parameter and the variable you declared as output parameter.

In the coding,assign the value to the variable.

Then instead of printing the field,print the variable.

Refer this thread:

Regards,

Gayathri

Former Member
0 Kudos

Hi Michael,

I suppose your requirement is "How to display currency and quantity fields in Smartforms".

Here is the solution.

Suppose the quantity variable is MENGE from table EKPO

In the Global definition, declare a variable

WA_MENGE type ekpo-menge.

Create program lines in the smartform.

There , in the input parameters , put MENGE and in the output parameter, put WA_MENGE.Now assign Menge to WA_MENGE.

In the text element where u will display the text, instead of giving MENGE, give WA_MENGE..

Hope your query is satisfied.

Regards,

Sylendra.

Former Member
0 Kudos

Hi,

For calculation purpose you can use the same field, but for printing a quant/curr field u need to pass it to a variable of type c of same length and then use it for printing in smartforms.

Declare a variable as the same type of the currency field of the table which u are using in Global Definition-Global Data

For example:

v_variable type vbrp-fkimg.

Chk this link for a detailed explanation:

Regards,

Anjali

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

1. In Global Definitions->Global Data,declare the structure as follows.

say for ex...

Mara type Mara

wa1 type mara

2.In Global Definitions->Currency/Quantity Fields,

wa1-ntgew MARA-GEWEI CURR

Hope it helps.If so,kindly reward points.