‎2007 Jan 08 1:45 PM
Hai all,
i want to display the Amt which will come from Prin Amt* Bench mark rate
like here 408000.00*45.500000 =185640000000000.00
but i wanna display 18564000.00 like tht
This is in Script out put .
i wrote a Perform and pass the variables and use the code Amt = Princ amt * Bench rate .
please help me if any one knows..
regards,
Max.
‎2007 Jan 08 2:04 PM
185640000000000.00 and 18564000.00 are two completely different values.
There is something wrong with your initial calcualtion.
‎2007 Jan 08 2:11 PM
Hi,
These 2 values 185640000000000.00 and 18564000.00 are different values, so make sure the value, and coming to your code, waht evet you are getting the value in the Amt field, move that value to a variable of type C and this should be a global varialbe, i mean declare it very first.
Regards
Sudheer
‎2007 Jan 08 2:39 PM
Hai Sudheer ,
please chk the code wht i wrote .
i want to display the Amt in Indian rs..
FORM get_rupee_amt TABLES in_tab STRUCTURE itcsy
ot_tab STRUCTURE itcsy.
DATA: prin_amt LIKE vtbfhapo-bzbetr.
DATA: bench_amt LIKE vtbfhapo-bzbetr.
DATA: rupee_amt(10) type p decimals 2 .
DATA: val_amt(20) TYPE c .
READ TABLE in_tab INDEX 1.
IF sy-subrc EQ 0.
replace ALL OCCURRENCES OF ','in in_tab-value with space.
REPLACE ALL OCCURRENCES OF ',' IN in_tab-value WITH ' '.
CONDENSE in_tab-value.
prin_amt = in_tab-value.
ENDIF.
READ TABLE in_tab INDEX 2.
IF sy-subrc EQ 0.
replace ALL OCCURRENCES OF ',' in in_tab-value with space.
REPLACE ALL OCCURRENCES OF ',' IN in_tab-value WITH ' '.
CONDENSE in_tab-value.
bench_amt = in_tab-value.
ENDIF.
rupee_amt = ( prin_amt * bench_amt ) .
val_amt = prin_amt * bench_amt.
val_amt = rupee_amt.
WRITE rupee_amt using no leading zeros TO val_amt .
move rupee_amt to val_amt .
WRITE val_amt TO ot_tab-value.
WRITE rupee_amt TO ot_tab-value.
MODIFY ot_tab INDEX 1 TRANSPORTING value.
CLEAR ot_tab.
ENDFORM. "get_rupee_amt
Here I want to display the Amt in Indian rs..
As per the Calculations Pri amt = 408,000.00
Bench = 45.500000
Total =408,000.00 * 45.500000
Presently in my output it shows like 18564000000000.00
But it should not right when we read
‎2007 Jan 08 2:44 PM
Hi Raju,
DATA: prin_amt LIKE vtbfhapo-bzbetr.
DATA: bench_amt LIKE vtbfhapo-bzbetr.
<b>DATA: rupee_amt(8) type p decimals 2 .</b>
<b>DATA: val_amt(10) TYPE c .</b>
try this i think this should work
Thanks
Vikranth Khimavath