Hi Gurus,
I want to display round off values in total amount . Order conformation
i wrote one suroutine but it is not working , it is going for dump.
Eg:- total amount = 10004.49 it should display in 10004.
total amount = 10004.51 it should display in 10005.
Plz help.
REPORT ZVALUES.
tables:komk.
form round TABLEs INTAB Structure ITCSY
OUTTAB structure ITCSY.
data: w_fkwrt type fkwrt,
w_fkwr type fkwrt.
read table intab with key name = 'KOMK-FKWRT'.
if sy-subrc = 0.
w_fkwrt = intab-value.
w_fkwr = ceil( w_fkwrt ).
outtab-value = w_fkwr.
condense outtab-value.
modify outtab transporting value.
endif.
endform.
in layout i call this subroutine like this.
/:DEFINE &KOMK-FKWRT1& := &KOMK-FKWRT&.
/:PERFORM ROUND IN PROGRAM ZVALUES.
/:USING &KOMK-FKWRT&.
/:CHANGING &KOMK-FKWRT1&.
/:ENDPERFORM.
SU Final amount,,,,,,,,,,,,,,,,&KOMK-FKWRT(I13)&
Thanks & Regards,
Vamshi
Use this FM
CALL FUNCTION 'HR_IN_ROUND_AMT' EXPORTING amount = p_amt rndoff = '100'. RNDLMT = 'N' IMPORTING RETAMT = DLTAMT =
hi Vamshi,
1. modify outtab transporting value <b>WHERE name = 'KOMK-FKWRT1'</b>
2. for rounding use FM ROUND
ec
Message was edited by:
Eric Cartman
Add a comment