Rounding off net weight value.
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
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
Similar Messages
-
Rounding of Net Book Value or Depriciation
Dear All,
How Can we round the Net Book Value and / Or Depriciation.
Thanks & Regards,
Mahendra GuptaYes, we can
T CODE: OAYO - Select each Dep. area and do it as per your client req.
Normally, max no follows "Arithmetic rounding:
Tnaks -
Problem in Routine after rounding off the condition value
Dear all,
I have attached the routine for rounding off value for condition value for T.Code va02. Routine is working fine but the problem is after the execution of routine it goes in some standard program LV61AA55 where again the rounded value gets changed . Maximum points will be allocated ..
Thanks anr RegardsFORM FRM_KONDI_WERT_925.
*{ INSERT D01K911062 2
data : wa_xkomv like xkomv,
v_kwert like xkomv-kwert,
W_INDEX TYPE SY-TABIX.
read table xkomv into wa_xkomv with key kschl = 'JIN6'.
W_INDEX = SY-TABIX.
v_kwert = 1 * wa_xkomv-kwert / 100.
V_KWERT = WA_XKOMV-KWERT.
read table xkomv with key kschl = 'JHSC'.
CALL FUNCTION 'J_1I6_ROUND_TO_NEAREST_AMT'
EXPORTING
I_AMOUNT = v_kwert
I_AMOUNT1 =
I_AMOUNT2 =
I_AMOUNT3 =
I_AMOUNT4 =
I_AMOUNT5 =
I_EXADDTAX1_AMOUNT =
I_EXADDTAX2_AMOUNT =
I_EXADDTAX3_AMOUNT =
IMPORTING
E_AMOUNT = v_kwert
E_AMOUNT1 =
E_AMOUNT2 =
E_AMOUNT3 =
E_AMOUNT4 =
E_AMOUNT5 =
E_EXADDTAX1_AMOUNT =
E_EXADDTAX2_AMOUNT =
E_EXADDTAX3_AMOUNT =
xkomv-kwert = v_kwert.
xkwert = v_kwert.
modify xkomv INDEX W_INDEX transporting kwert.
*} INSERT
ENDFORM. -
Rounding Off to lower value!
Dear Experts,
Currently am calculating some values, and it returns me the results as such:
If the calculated value is 6.85714, then by default the output value in my integer type variable is 7.
Now, whenever the output results in 6.xxx, even if it is 6.9999 then i want it to round off to 6.
How is it possible?
Please advice!
Regards,
Sundar.Hi
Handle it like this,,,
CLEAR : l_f_kbetr4 , l_f_kbetr5 .
l_f_kbetr4 = l_F_kbetr1 - l_f_kbetr3 .
CHECK = FRAC( l_f_kbetr4 ) .
IF CHECK GE '0.50' .
l_f_kbetr4 = CEIL( l_f_kbetr4 ) .
ELSE .
l_f_kbetr4 = FLOOR( l_f_kbetr4 ) .
ENDIF.
l_f_kbetr5 = l_f_kbetr4 .
Hope it helps.
Praveen -
How to avoid rounding off large Double values?
For converting from String to Double, consider a piece of code as below:
String str = "999999999999999.99999";
Double d = Double.valueOf( str );In this case, d will contain the value 1E15 and not 999999999999999.99999.
Is there any way by which we can avoid this rounding off?
TIA,
Ninad.> String str = "999999999999999.99999";Note that you have a total of 20 decimal digits here.
A double only has 53 bits to represent the mantissa
so it can only accurately represent about 16 decimal digits. -
Rounding off to nearest value with formatNumber
Can I use the formatNumber tag to round my numeric value to the nearest value?
Like if it's 15.7 I would like to display 16
And if it's 15.2, I would like to display 15
I could successfully truncate by giving a patteren but Im not sure if I can round it off.
Regards,
LeenaYes you can - the following works on JSTL 1.1 / Tomcat 5.5 :
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head><title></title></head>
<body>
Test Auto Rounding of 16.8 :
<fmt:formatNumber value="16.88" pattern="##"/>
<br/><br/>
Test Auto Rounding of 16.2 :
<fmt:formatNumber value="16.22" pattern="##"/>
</body>
</html>Message was edited by:
appy77 -
Sales Order Net Value - Round off
Hi Guru's,
I am having a requirement to round off the total value (VBAK - NETWR) in sales order.
Condition type DIFF is not fulfilling our requirement because its functioning as an item condition. It's doing round off for each line item.
Our requirement is Header level net value round off.
I have searched in SCN but I cant able to find any solution. Kindly throw some light on this subject.
Regards,
DineshHi,
After downloaded the note 1158475 implementation status show that cannot be implemented.
Check the screenshot below.
Regards,
Dinesh -
Rounding off to a variable value to 4 decimal values in sap script ouput
Hi All,
I have a value getting displayed in sap script output as 235.6789 i want to Round off this variable value to 4 decimal values!
What is the formatting option need to be used & how!
Thanks in advance.
Thanks,
Deep.Hi,
1.In layout just call that variable, where you need like:
&variable(.4)&.
Just see these:
&symbol(Z)& Omit Leading Zeros
&symbol(S)& Omit Leading Sign
&symbol(<)& Display Leading Sign to the Left
&symbol(>)& Display Leading Sign to the Right
&symbol(C)& Compress Spaces
&symbol(.N)& Display upto N decimal places
&symbol(T)& Omit thousands separator
&symbol(R)& Right justified
&symbol(I)& Suppress output of the initial value
Regards,
If helpful reward with points(Don't forget). -
User exit for rounding off result value
Hi Gurus,
Is there any user exit available or std. functionality by which we can round off the result value. My client wants if the value is 192.5 or 191.8 then this value should be rounded off to 195. That means rounding in multiples 0f 5. Is there any exit available?
Regards
AmitIf in QM just specify the correct number of decimals for the characteristic, in your case 0. In config under plant settings you can set up the results recording settings to allow you to record one additional decimal then specified by the characteristic. The result is rounded to 0 decimals when displayed.
FYI - there should be no reason to have to use user exits to round off decimals in QM.
Craig
I didn't read the initial posting correctly. To round the whole number portion by 5 you will have to provide that logic yourself via the user exits already posted.
Craig
Edited by: Craig Snyder on Jan 13, 2010 2:56 PM -
Hi all,
I have a small problem,
In sales Invoice I am having 10 items with different price and quantities,
In PLD i have used formula concept to show tax wise break up,
as our invoice tax amount is cumulative of its sub taxes,
i need to round off the total of sub taxes in the document
For Example:
In Invoice;
Assessable Value: 3697.20 (qty X Price)
Total of BED 8%: 295.77
Total of Cess 2% of BED : 5.91
Total of HE Cess 1% of BED: 2.95
Total of VAT/CST 4% of (BEDCessHECess): 160.08
So I want to round off these amounts:
BED: 296
Cess:6
HECess:3
VAT: 160
1. I tried using rounding option in tax formula;
but it doesnt give correct result as it works on row level
2. I also tried making decimal places zero in general settings
But it round off my assessable value also
also round to one is also active in currency settings
can anybody please help me to get the desired results
Regards,
Atul Joshi
Edited by: Atul Joshi on Dec 9, 2008 1:38 PMHi,
If you use round off in tax formula it will bring you considerable differrence.
You use the document level rounding in Administrattion->Setupup-Financials->Currency.
I think this would be helpful for you.
Rgds,
Sundar -
Rounding net book value - Depreciation calculated even 0%
Dear all,
I'm becoming crazy with ERP6.
We are upgrading our SAP from 4.7 to ERP6, EA-FIN is active.
Now if I look the asset explorer or whatever FI-AA reporting with the planned depreciation, I have a difference on the depreciation values, but only for lands ( Depreciation key 0000) - We have set "round net book value at the end of the year", but It seems that now, the system rounds the net book value, even if the depreciation key is 0% . (not the case in 4.7)
please advice
Thanks
natHi,
This has nothing to do with the depreciation key.
If you have flagged in tr. OAYO the following rounding specifications:
Ind: Round net book value
This indicator specifies that the net book value of an asset should be rounded to whole units of currency at the end of the fiscal year.
You specify the type of rounding in the same screen. ...."
.....the system makes this rounding.
But this was also the same in former releases.
regards Bernhard -
Hi all,
Is there a function module to round off the currency value to nearest 0.05 , ie. if the currency value is 10.63, it should be rounded off to 10.65 and when it is 10.68, it should be rounded off to 10.70?
If yes, could you please let me know?
Any help in this regard is appreciated.
Regards,
Partha.hi,
try this out.here is the sample program.
pl look into my modified program,
i am assuming your requirement is like
if the last digit in your value is < 5. it should be rounded to 5.
like 10.23 should come to 10.25
& if the last character value is > 5 , it should be rounded to next value with 0.
10.67 should be 10.70
10.98 should be 11.00.
with this assumption, i developed this small code. let me know, if i am wrong.
regards
srikanth
DATA : V_CURR TYPE VBAK-NETWR,
V_CHAR(10) TYPE C.
V_CURR = '10.67'.
WRITE V_CURR TO V_CHAR.
CONDENSE V_CHAR NO-GAPS.
DATA : V_STRLEN TYPE I.
BREAK-POINT.
V_STRLEN = STRLEN( V_CHAR ).
IF V_STRLEN <> 0 .
V_STRLEN = V_STRLEN - 1.
IF V_CHAR+V_STRLEN < '5'.
V_CHAR+V_STRLEN = '5'.
V_CURR = V_CHAR.
ELSE.
IF V_CHAR+V_STRLEN = '6'.
V_CURR = V_CURR + '0.04'.
ELSEIF V_CHAR+V_STRLEN = '7'.
V_CURR = V_CURR + '0.03'.
ELSEIF V_CHAR+V_STRLEN = '8'.
V_CURR = V_CURR + '0.02'.
ELSEIF V_CHAR+V_STRLEN = '9'.
V_CURR = V_CURR + '0.01'.
ENDIF.
ENDIF.
ENDIF.
write :/ v_curr,
v_char.
added modified code.
Message was edited by: Srikanth Kidambi -
Dear All,
I have done following setting for net value of rounding off .
OB90 Company code XXX INR 100
Condition type DIFF assigned rqt 13
*+Cal type+* 16
Basy Type 4.
But still system is not doing round off net value.
Regards
SainathDear Sainath,
Use T-Code V/06 & Select Condition type - DIFF.
Under Control Data 1 There is a box for Rounding Rule. Select option A, B or Blank depending on your requirement.
Alternatively, if you dont have Condition type (means it is a Sub-Total) then insert 17 in AltCTy column.
Hope this helps...
Give points if useful...
Thanks,
Jignesh Mehta -
How to round off quantity in inventory
Hi,
How to avoid decimal places for PC(Piece) in the goods movement transactions.. I have given 0 decimal places in CUNI transaction. It is working properly for Production Order during Conrimation but it is not working in Inventory transactions like MIGO, MB1C,MB1A....
for example When I enter Unint of entry In Alternate Unit say '10 KG' System Automatically Caliculates quantity in base unit in decimal places say 115.012 PC based on the conversion factor defined in material master.
My requiremet is the base unit quantity PC rounded off to nearest value in as 115 (PC).
The same thing is working fine for production order.
please suggest me how to do.
Thanks,
Shekarthis all depends on your conversion rate enterd in material master.
if 115.012 PC equals 10 KG.
what do you actually want the system to do,
it would now that you would get 115.012
you want it to be 115,
this would then mean that you have to modify the entered quantity from 10 to 9something
Is it that what oyu want?
you certainly cannot have 115 PC and 10 KG if you dont change the conversion rate in your material master -
Rounding-off difference in Line Item vs Invoice
Can anyone help on how to correct the rounding-off difference in the amount per line item display vs the amount printed in the invoice? In viewing the document, the line item has an amount of 187.09, meanwhile, when invoice was printed, the amount was 187.10.
Hi
Ask ABAPer to modify the format for the invoice amont number field not to round off to nearest value in invoice form.
Regards
Laxmiprasad
Maybe you are looking for
-
?
-
How to access IFS document contents in PL/SQL procedure ?
I am interested in using IFS as a way to load documents (PDF, HTML, RFT, text...) in an Oracle database table, and then access the table via a regular application Server. I understand that the right way to do this is via a Java API mapped on top of I
-
why we use line item attributes for account dimension
-
Hangs but only when connected to secondary monitor
I am "trying" to move from PC to MAC, but one issue that I seem to have is that most times I have the Macbook plugged into a secondary monitor the thing crashs. Not with the grey screen, but a single solid colour, I've had green, blue, purple, and ju
-
Sold to Party information in Service order cleared automatically
Hi, I need a clarification.In my case Service Order getting generated from Sales Order. Before saving the sales order,in the generated Service order(under schedule lines), Iam seeing the Sold-to-Party is populated automatically. After saving the orde