‎2006 Nov 04 2:19 PM
hi,
help me in this issue
how to round off the decimal places like 86.67 to 86.70
like that.
thanks in advance
kiran kumar
‎2006 Nov 04 2:23 PM
hi,
<b>DATA: VAR1 TYPE P DECIMALS 2,
RES TYPE P DECIMALS 2.</b>
VAR1 = '12.33'.
RES = ROUND( VAR1 ).
WRITE RES.
rgds
anver
if hlped pls mark points.
<i>is it working, pls let me know</i>
Message was edited by: Anversha s
‎2006 Nov 04 2:23 PM
hi,
<b>DATA: VAR1 TYPE P DECIMALS 2,
RES TYPE P DECIMALS 2.</b>
VAR1 = '12.33'.
RES = ROUND( VAR1 ).
WRITE RES.
rgds
anver
if hlped pls mark points.
<i>is it working, pls let me know</i>
Message was edited by: Anversha s
‎2006 Nov 04 2:30 PM
hi Anversha,
i have to make whole one amount column to be rounded off . i think i can use what u have written
is it right and one more thing anversha can u plz tell how to update the tables using change_document in fi.
thanks in advance
kiran kumar
Message was edited by: kiran kumar
Message was edited by: kiran kumar
‎2006 Nov 04 2:34 PM
hi kiram,
for amount u can use <b>ROUND</b> do that.
chk some FM also.
<b>ROUND_AMOUNT
FI_ROUND_AMOUNT</b>
anothe FM <b>HR_IN_ROUND_AMT</b>
u can use any of these . ROUND will work perfectly.
rgds
anver
<i>did it work or any help needed.</i>
if hlped pls mark points
‎2006 Nov 04 2:44 PM
hi anersha,
i have gien amount as some 200,37 and company code as some 0101 and currency as gbp but it s should same value as result.
and can u plz tell tell how can we use change_document
functional module.
thanks in advance
‎2006 Nov 04 2:49 PM
hi,
chk the sample code.
REPORT ZEXAMPLE.
TABLES T001R.
DATA V_AMTOUT LIKE BSEG-WSKTO.
PARAMETERS P_AMTIN LIKE BSEG-WSKTO.
WRITE:/ 'Original amount:', P_AMTIN,
/ 'Company', 15 'Currency', 35 'Amount'.
ULINE.
LOOP AT T001R.
CALL FUNCTION 'ROUND_AMOUNT'
EXPORTING
AMOUNT_IN = P_AMTIN
COMPANY = T001R-BUKRS
CURRENCY = T001R-WAERS
IMPORTING
AMOUNT_OUT = V_AMTOUT.
WRITE:/ T001R-BUKRS, 15 T001R-WAERS, 25 V_AMTOUT.
ENDLOOP.
rgds
anver
if hlped pls mark points
‎2006 Nov 04 2:55 PM
hi,
Anversha
thanks it is working, can u plz tell tell how the change_document functional module will be used i need to update the zuonr and xref2 i dont know how many tables like bsid bsed needs to updated so how can i proceed with it
thanks in advance
kiran kumar
‎2006 Nov 04 2:59 PM
Hi kiran,
Please check this link.
http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa0182493111d182b70000e829fbfe/frameset.htm
regards,
snver
‎2006 Nov 04 2:29 PM
Hi,
If you just want this functionality just for display purpose, then you can use the following option.
DATA: X TYPE P DECIMALS 3 VALUE '1.267'.
WRITE: /X DECIMALS 0, "output: 1
/X DECIMALS 2, "output: 1.27
/X DECIMALS 5. "output: 1.26700
Thanks
Ramakrishna