2011 Jul 13 10:38 AM
Hi experts,
I want to round off the quantity value to the next integer value.
I am using the FM 'J_1I6_ROUND_TO_NEAREST_AMT' as follows...
call function 'J_1I6_ROUND_TO_NEAREST_AMT'
exporting
i_amount = gross_weight
i_amount1 = net_weight
importing
e_amount = gross_weight
e_amount1 = net_weight.
i want to round off the gross weight and net weight values.
In Global definitions, these are given as of type VEKP-BRGEW. The field BRGEW is of datatype QUAN (length - 15 and decimal -3 )
But when i tried executing i am getting dump .... saying
"The function module interface allows you to specify only
fields of a particular type under "I_AMOUNT".
The field "GROSS_WEIGHT" specified here is a different field type"
Please help me solve this and please let me know how to round off these fields.
Regards
Ammu
2011 Jul 13 10:43 AM
Make sure the data type of the function module parameters as well as the your variable are of same type. It is happening.I_AMOUNT is of different type type as compared of GROSS_AMOUNT. Declare a local variable of type GROSS_AMOUNT type and assign the I_AMOUNT to it and pass to FM>
Nabheet
2011 Jul 13 10:43 AM
Make sure the data type of the function module parameters as well as the your variable are of same type. It is happening.I_AMOUNT is of different type type as compared of GROSS_AMOUNT. Declare a local variable of type GROSS_AMOUNT type and assign the I_AMOUNT to it and pass to FM>
Nabheet
2011 Jul 13 10:44 AM
Hi,
the both fm parameters you fill have a currency data element of length 13, while you pass a quantity data element of length 15.
You can't use this fm for your fields.
Regards,
Klaus
2011 Jul 13 10:54 AM
Hi Klaus,
Do you know any FM which can be used for these fields or any other way where i can round off the values, as mentioned.
Regards,
Ammu
2011 Jul 13 10:50 AM
Hi,
My requirement is that the quantity should always be rounded off to the next higher integer.
ie when the weight = 12.111, it should be rounded off to 13.
Please advice.
Regards,
Ammu
2011 Jul 13 10:51 AM
2011 Jul 13 11:16 AM
Hi
Thanks a lot everybody.
I just used ceil function.
Regards,
Ammu
2011 Jul 13 11:47 AM
Hi Nair,
I actual new to this , can u please let me know the difference b/w ceil and floor function .
thanks
siva
2011 Jul 13 12:21 PM
Hi Siva,
Ceil gives the Smallest integer value not smaller than the argument.
and
Floor gives the Largest integer value not larger than the argument.
Regards,
Ammu
2011 Jul 13 12:45 PM
Hi,
Can somebody please let me know how to truncate the zeros also in decimal ?
I dont want the decimal itself.
As in, now the value is getting diplayed as 416.000
I want just 416.
Regards,
Ammu