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

Regarding currency and quantity fields

Former Member
0 Likes
5,971

How to create the currency and quantity fields while creating tables and how to handle these fields while retrieving the data from the tables.

Also how to enter the data into these fields.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,885

Hi

Use the following data types

Currency(amount fields) use CURR data type

Quantity fields use QUAN data type

for both of tha baove fields you have to give a reference field

if you are having defined the Unit for Qty and Currency unit fields in your table give them as reference fields and the same table or

use any std table field like

VBAK-WAERK for Currency field

and EKPO-MEINS for Qty fields

While fetching no special care required

Only while displaying in the output you have to use again the reference field after the amount and Qty fields like

write: / itab-netwr currency vbak-waerk,

/ itab-menge unit ekpo-meins.

<b>Reward points for useful Answers</b>

Regards

Anji

How to create the currency and quantity fields while creating tables and how to handle these fields while retrieving the data from the tables.

Also how to enter the data into these fields.

2 REPLIES 2
Read only

Former Member
0 Likes
2,886

Hi

Use the following data types

Currency(amount fields) use CURR data type

Quantity fields use QUAN data type

for both of tha baove fields you have to give a reference field

if you are having defined the Unit for Qty and Currency unit fields in your table give them as reference fields and the same table or

use any std table field like

VBAK-WAERK for Currency field

and EKPO-MEINS for Qty fields

While fetching no special care required

Only while displaying in the output you have to use again the reference field after the amount and Qty fields like

write: / itab-netwr currency vbak-waerk,

/ itab-menge unit ekpo-meins.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
2,885

Hi,

CURRENCY and QUANT fields are special as they need a UNIT that is for currency u need currency type like EURO, USD etc, where as for quantity you need to know the unit that is KM, HOURS etc etc.

SO whenever you have such fields in your table you need to have a reference field to assign the UNIT for these fields.

So you will create another field in the table for UNIT and make this as a reference for your CURR or QUANT field.

The data will be inserted normally at the same time we have to insert the UNIT field.

Also when we retrive the data the reference field is used to perform conversion for these fields so that in the UI they appear as per the UNIT.

Regards,

Ses