Skip to Content
0
Former Member
Oct 08, 2009 at 08:14 AM

How to round the fractional values in Abap webdynpro?

29 Views

Hi Experts,

I have designed a screen in which I have a field called ANZHL(which is numberic field of infotype14) It is a fractional digits which needs to be rounded when it comes to display in my webdynpro application?

Here is my code .........

How to round the ANZHL field ?

**if start and end dates are changed then delete the old and insert the new else just mmodify the record

if ws_0014_temp-begda ne ws_edit-begda or ws_0014_temp-endda ne ws_edit-endda.

call function 'HR_INFOTYPE_OPERATION'

exporting

infty = '0014'

number = wd_this->w_pernr

subtype = ws_0014_temp-subty

objectid = ws_0014_temp-objps

lockindicator = ws_0014_temp-sprps

validityend = ws_0014_temp-endda

validitybegin = ws_0014_temp-begda

recordnumber = ws_0014_temp-seqnr

record = ws_0014_temp

operation = 'DEL'

nocommit = 'X'

importing

return = w_bapireturn.

" key = w_bapireturn.

if w_bapireturn-type ca 'EA'.

r_bapireturn = w_bapireturn.

return.

endif.

ws_0014 = ws_0014_temp.

ws_0014-endda = ws_edit-endda.

ws_0014-begda = ws_edit-begda.

ws_0014-anzhl = ws_edit-anzhl.

call function 'HR_INFOTYPE_OPERATION'

exporting

infty = '0014'

number = wd_this->w_pernr

subtype = ws_0014-subty

objectid = ws_0014-objps

lockindicator = ws_0014-sprps

validityend = ws_0014-endda

validitybegin = ws_0014-begda

recordnumber = ws_0014-seqnr

record = ws_0014

operation = 'INSS'

nocommit = 'X'

importing

return = w_bapireturn.

" key = w_bapireturn.

if w_bapireturn-type ca 'EA'.

r_bapireturn = w_bapireturn.

return.

endif.

else.

ws_0014 = ws_0014_temp.

ws_0014-anzhl = ws_edit-anzhl.

Edited by: Dharani us on Oct 8, 2009 10:15 AM