2006 Feb 14 6:09 AM
Hello guys,
I am currently modifying a report where in I must replace all hardcoded computations with the values from a certain table. the fields which I will be getting values from is EWT and EWT2 from the ZTF0158 table. The value of EWT and EWT2 is 1.1 and 11 respectively but it can be changed anytime by the user. So in the program, instead of
lv_am1 = ( t_upload_ii-amount * lv_glob ) * 1.1
I would do instead:
lv_am1 = ( t_upload_ii-amount * lv_glob ) * v_tm_interco_ewt
***v_tm_interco_ewt gets its value from the ZTF0158 table.
But my problem is this, how can I change hard coded computations like the value .1 since the value in EWT is 1.1.So instead of .1 I would put in the variable v_tm_interco_ewt but it has a value of 1.1. I have posted below the code.
lv_ovat = ( t_upload_ii-amount - lv_ob ) * '.1'.
Help would greatly be appreciated.Thanks guys!
2006 Feb 14 6:15 AM
TABLES: ZTF0158.
SELECT SINGLE EWT EWT2
INTO ( v_tm_interco_ewt , i_ewt2 )
FROM ZTF0158
.
lv_am1 = ( t_upload_ii-amount * lv_glob ) * v_tm_interco_ewt.
lv_ovat = ( t_upload_ii-amount - lv_ob ) * v_tm_interco_ewt.
Hello guys,
I am currently modifying a report where in I must replace all hardcoded computations with the values from a certain table. the fields which I will be getting values from is EWT and EWT2 from the ZTF0158 table. The value of EWT and EWT2 is 1.1 and 11 respectively but it can be changed anytime by the user. So in the program, instead of
lv_am1 = ( t_upload_ii-amount * lv_glob ) * 1.1
I would do instead:
lv_am1 = ( t_upload_ii-amount * lv_glob ) * v_tm_interco_ewt
***v_tm_interco_ewt gets its value from the ZTF0158 table.
But my problem is this, how can I change hard coded computations like the value .1 since the value in EWT is 1.1.So instead of .1 I would put in the variable v_tm_interco_ewt but it has a value of 1.1. I have posted below the code.
lv_ovat = ( t_upload_ii-amount - lv_ob ) * '.1'.
Help would greatly be appreciated.Thanks guys!
2006 Feb 14 6:15 AM
TABLES: ZTF0158.
SELECT SINGLE EWT EWT2
INTO ( v_tm_interco_ewt , i_ewt2 )
FROM ZTF0158
.
lv_am1 = ( t_upload_ii-amount * lv_glob ) * v_tm_interco_ewt.
lv_ovat = ( t_upload_ii-amount - lv_ob ) * v_tm_interco_ewt.
2006 Feb 14 6:17 AM
Hi viraylab
You have to declare another variable with decimal 1 for
ex.
data v_tm_interco_ewt(3) type c value '1.1'.
data v_tm_interco_ewt2 type p decimals 1.
v_tm_interco_ewt2 = v_tm_interco_ewt / 10.
write: v_tm_interco_ewt2.
<b>lv_ovat = ( t_upload_ii-amount - lv_ob ) * v_tm_interco_ewt2.</b>
regards
kishore
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |