on 07-11-2012 1:43 PM
Hi all,
I have a requirement of Rounding decimals in Characteristic Value level.
For example,
If the characteristic value is 12.456 and required to be rounded off to 2nd decimal, then the result should be 12.46.
For this requirement i should not use ABAP Function Module. I should do it in SAP-VC.
Can anyone help me in this regard.
Regards,
B.Sivashankar
B.Sivashankar,
yes you can easily do it using procedure , but i will appriciate if you can tell business requirement too.
why dont you ask user to input already rounded quantity? or you can use ABAP to round it .
let me explain you how to do it using a wrok around.
Create characterstic for which you need tghis value ,
ex NUMBER1 , data type number , decimal places 2
create another characterstic NUMBER2 , data type number, decimal places 3
create a dependency type procedure , with syntex below
$SELF.NUMBER1 = $SELF.NUMBER2
attach it to configuration profile of material.
now when you will assign 12.456 to NUMBER2 , characterstic NUMBER1 will display a value 12.46.
check and reply if it meet your requirement.
Thanks
Ritesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ritesh,
Thank you for your reply.
Actually i had tried already with the steps u recommended.
But our requirement is we should not use any additional characteristics or ABAP function module.
Actually our Sales Person or Customer may enter their exact decimals.
For transferring this value (e.g) 12.456 as 12.46 to Routing operation description by using concatenation.
(e.g) Cut the Pipe 12.46 meters. This 12.46 will be passed from the characteristic.
Before passing this value, we will be using a function module to convert the NUM format to CHAR format.
Hence we require a solution to round off the decimals.
Regards,
B.Sivashankar.
Sivashankar B wrote:
(e.g) Cut the Pipe 12.46 meters. This 12.46 will be passed from the characteristic.
Before passing this value, we will be using a function module to convert the NUM format to CHAR format.
then better idea is use some code in same functional module to do this conversion before passing actual values to routing .
Check and share if you find any other option.
Thanks
Ritesh
Hi,
i am using the decimal value with data type and length is : dec 6,
i want to round this value, if .5 above then add +1 integer
i used ceil but it is not giving correct value,
and i check the ROUND also it is showing the same input value as output
can u give me suggestion plz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
B.Sivashankar,
i used ceil but it is not giving correct value,
and i check the ROUND also it is showing the same input value as output
can you please explain whats happeing while using Ceil or ROUND?
The easiest work aorund i already suggested you in my first reply.
if you dont want use this additional characterstic , go for a Function and attach it to your characterstic and it will work as per your wish.
below link will help you building a function.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/92/58d455417011d189ec0000e81ddfac/frameset.htm
check out , it may help you.
Thanks
Ritesh
User | Count |
---|---|
91 | |
9 | |
9 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.