on 02-21-2009 10:08 AM
Hi
Can anyone guide me the process to add addtional field say "rate" in the query (sq01) where i am having "Qty" & "Total Amount" fields available from the standard table.
Rate = Total Amount / Qty
Thanks in advance
Tejpal
Hi Tejpal,
In SQ01
- Open your query for change
- Select the field groups that contain the data items you need to use to create your new data item. Move to the field display page.
- Once you have the field names displayed on the screen, Edit>Short Names>Switch on.
- Now, find each data item you will need to use to create your new data item. In the short name field create a new 'nickname' for each of these eg 'TOTAMT' and 'QTY' to represent total amount & quantity
- Now, Edit>local field>create.
- short name=the name of your new field, eg 'RATE' & Field desc= description of yr new field
- Heading=how it will be displayed in the header of your output report
- Select Calculation field
- Define number of digits and decimal places
- In the Calculation formula, use the 'nicknames' you previously defined to create your calculation. Simple arithmetic functions are supported, eg 'TOTAMT / QTY' would be the formula
Hope the above answers your query.
Regards,
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vivek,
I have a similar requirement wherein I have been able to capture Gross Amount and Tax in the query output. Now I need to have new column which would be a total(addition) of Gross amount and Tax amount. I have created this query in SQVI. Is it possible to have this ?
Thanks for your help.
Rgds
Dear Vivek
i had done all the steps but output is following runtime error due to new local field (without this field it works fine.)
-
Error analysis |
An exception occurred that is explained in detail below. |
The exception, which is assigned to class 'CX_SY_ARITHMETIC_OVERFLOW', was not |
caught in |
procedure "/1BCDWB/IQT000000000030EXTR" "(FUNCTION)", nor was it propagated by |
a RAISING clause. |
Since the caller of the procedure could not have anticipated that the |
exception would occur, the current program is terminated. |
The reason for the exception is: |
An overflow was discovered in an ongoing arithmetical operation with |
operands of type P. Possible causes are: |
1. The result field of type P is too small for the result. |
2. The result or a intermediate result has more than 31 decimal places. |
-
Also when i add qty=1 in the CONDITION ( below the CALCULATION FORMULA) in the Field defination as per your last point. it works fine & gives the rate values for the qty=1 only
Further if i put qty >1 or Amt>1 or both it gives the above error.
Regards
Tejpal Singh
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.