Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg: Function Modules

Former Member
0 Likes
684

Hi,

Any function Module is there which converts the Qty (If it has fraction ) to the nearest value.

EX: if the Qty value is 2.789, it has to return the value 3.

Thanks in advance

5 REPLIES 5
Read only

Former Member
0 Likes
646

Check <b>ROUND</b> FM

You can do this way too


data: l_1 type i, l_2 type p decimals 2.

l_2 = '1.78'.

l_1 = FLOOR( l_2 ).
l_1 = l_1 + 1.

write: l_1.
or
Use CEIL function to get the result.

Go through this link for more details.

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3316358411d1829f0000e829fbfe/content.htm


Reggards,

Santosh

Message was edited by:

Santosh Kumar Patha

Read only

h_senden2
Active Contributor
0 Likes
646

You can use the statement CEIL, it's not a function module actually.

A = Ceil( B ).

regards,

Hans

Please reward all helpful answers !!!!!

Read only

former_member189631
Active Contributor
0 Likes
646

Hi Sree,

Check these Function Modules,

  • ROUND_AMOUNT

  • ROUND_WITH_PARAMETER

  • ROUND

  • ROUND_DATE

Try to use Floor and ceil also,

Regards,

<b>Ramganesan K</b>.

Read only

Former Member
0 Likes
646

Hi,

For Quantity rounding, you can use the Function module COS6_QUANTITY_ROUND. You need to specify the unit of measure here.

Regards,

Sharmila

Read only

former_member189631
Active Contributor
0 Likes
646

Hi Sree,

Problem is solved ?