2007 Jun 27 7:20 AM
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.
2007 Jun 27 7:26 AM
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.
2007 Jun 27 7:26 AM
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
2007 Jun 27 7:30 AM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |