Rounding quantity variable to 2 decimals
hi,
Q--> How to reduce 3 decimals to 2 decimals for quantity variable in SAP-SCRIPT. (4.7 version)
eg. RM06P-PRMG1 has value 30.000 KG and it should look like 30.00 KG.
To solve above problem i tried &RM06P-PRMG1(.2)& and &RM06P-PRMG1(R.2)& but still it is not giving result.
Regards,
Sujit
Since the field PRMG1 in Structure RM06P is the CHAR field, standard formatting rule like &RM06P-PRMG1(.2)& will not work.
Try to use the field type of Quantity to make it work.
Regards,
Naimesh Patel
Similar Messages
-
Hi All!
I want to round quantity field to one decimal place instead of three decimal places.How to achieve this I know there is FM to convert to 2 decimal places but how to get it for one decimal place.
Regrads
Praneeth<b>WRITE .... <f> <option>.
U can use into another field</b>
Formatting options for numeric fields
Option
Function
NO-SIGN
The leading sign is not displayed on the screen.
DECIMALS <d>
<d> defines the number of digits after the decimal point.
EXPONENT <e>
In type F fields, the exponent is defined in <e>.
ROUND <r>
Type P fields are multiplied by 10**(-r) and then rounded.
CURRENCY <c>
Format according to currency <c> in table TCURX.
UNIT <u>
The number of decimal places is fixed according to unit <u> specified in table T006 for type P fields.
DATA pack TYPE p VALUE '123.456'
DECIMALS 3.
WRITE pack DECIMALS 2.
WRITE: / pack ROUND -2,
/ pack ROUND -1,
/ pack ROUND 1,
/ pack ROUND 2.
output
123,46
12.345,600
1.234,560
12,346
1,235
regards
vinod -
Rounding quantity field in scheduling agreement not considered in JITK
Hello ALL,
I would like to consult to you a scenario I am facing when it comes to creating a scheduling agreement (VA31) and maintaining a Rounding Quantity (field ABLFZ) in it.
When using the standard LZ type scheduling agremeent, the Rounding quantity is considered when creating a delivery in VL10.
However, when using the LZJ type of scheduling agreement, the Rounding quantity is NOT considered when creating a delivery in JITK.
Can you please tell me what causes the case in LZJ scheduling agreement?
Thank you all in advance.Hi,
This field is not available for Scheduling Agreement. It is only available for Purchase Order.
Even you will not get this in Field selection also. -
Change rounded quantity (VBEP-CMENG) in Sales order with FM
Hello,
In an ABAP program I want to change the rounded quantity of a scheduleline in a sales order using a function module. However with BAPI_SALES_ORDER_CHANGE or SD_SALESDOCUMENT_CHANGE in the input tables for schedulelines however the field for adjusting rounded quantity is not avalable.
Is there anybody who knows another solution to update the rounded quantity. Note i want to avoid to do a call transaction.... ))
TNXHi ..
Check your config. again or debug the routine code with your ABAPer and find the problem area.
-Maharshi -
Rounding Quantity for SALES ORDER
Hello All,
I would like to ask if it is possible to fill the rounding quantity in a standard order?
The current behavior is that when i enter number in the Order quantity in the schedule line, the quantity is copied into the Rounding Quantity?
Why does it happen?
Thanks for a brief explanation.
Thank you guys!could you please explain to me in detail the USE of rounding quantity
Place your mouse on this field and press F1. The explanation given therein is self-explanatory.
thanks
G. Lakshmipathi -
How to round up double to 2 decimals? where in API i should look up? Thank you for your help!
e.g., Book (including tax) :14.99 + 14.99 * 10% = 16.489 ---> 16.49* Scale decimal number via the rounding mode BigDecimal.ROUND_HALF_UP.
* @param value Decimal value.
* @param scale New scale.
* @return Scaled number.
* @since 1.8.3
static public double getScaled(double value, int scale) {
double result = value; //default: unscaled
//use BigDecimal String constructor as this is the only exact way for double values
result = new BigDecimal(""+value).setScale(scale, BigDecimal.ROUND_HALF_UP).doubleValue();
return result;
}//getScaled() -
Rounding a variable, can this be done.
Hi,
I'm trying to round a variable. Howerver, nothing appears!
I know that numbers can be rounded, but I can't get the bit below to work....
<?xdoxslt:set_variable($_XDOCTX, 'diff', number(A.OXF_UNRST_VALUE_YTD) - number(A.OXF_USTRCT_EXP_AMT_YTD))?><?xdoxslt:set_variable($_XDOCTX, 'testa',(number(xdoxslt:get_variable($_XDOCTX, 'diff')) div number(A.OXF_UNRST_VALUE_YTD))*100)?>
<?xdofx:round(number(xdoxslt:get_variable($_XDOCTX, 'testa')),0)?>
Any suggestions most appreciated.Hi,
Thanks for taking the time to reply. I did wonder if the namespace was correct, but alas did not try changing it from xdofx.
The XDOUserGuide.pdf has the reference below:
round <?xdofx:round ( number [, integer ] )?>
ROUND returns number rounded to integer places right of the decimal point. If integer is omitted, then number is rounded to 0 places. integer can be negative to round off digits left of the decimal point. integer must be an integer.
Cheers,
Steve.
Edited by: user7137712 on 01-Dec-2011 07:48
Edited by: user7137712 on 01-Dec-2011 07:48 -
How realize Sales order rounding quantity
Hello Expert
I would like to know how to realize Sales order rounding quantity.
As I have checked other title there are a lot of same topic however I couldn't realize yet.
My scenario is as bellow.
There are the materials which we want to input every 12 Qty for instance.
I expect if I input 10 it rounds to 12, if I input 19 it rouns to 24.
I already created rounding profile via OWD1 and assign it to material master sales view.
However it didn't work.
As I have checked item category there are no flag on Rounding permitted.
Best regards,
IchimuraHi,
I guess you´re using static rounding.
Check when created if you´ve restricting it to a plant or you left it blank (valid for all plants).
Check that you´ve properly assigned the profile to master material in sales view to the proper plant if any
Check that swith off rounding is not selected in customer master data
Check that ítem category in custo has selected rounding permitted.
Regards,
JM -
Round off quantity variable eliminating decimal places
Hi,
I have a variable of quan type with value = 1008.123
I want to round it off with no decimal to be displayed.
Please suggest.Hi,
Refer
https://forums.sdn.sap.com/click.jspa?searchID=11055268&messageID=4565374
https://forums.sdn.sap.com/click.jspa?searchID=11055268&messageID=4721312
https://forums.sdn.sap.com/click.jspa?searchID=11055268&messageID=2700419
Regards
KIran -
Automatic Purchase Order Rounded Quantity
Hello Everybody,
I have a doubt with automatic purchase order, here is the situation:
Purchase Requisition (ME51N) reference on a Contract
ITEM 1 - Quantity 750,920 (Total Value $750,92)
ITEM 2 - Quantity 29.041,640 (Total Value $29.041,640)
Total Value PR: $29.792,56
Automatic Purchase Order (ME59N)
ITEM 1 - Quantity 750 (Total Value $750)
ITEM 2 - Quantity 29.041 (Total Value $29.041)
Total Value PR: $29.791
I would like to know if when I execute the ME59N to generate automatic PO, the quantities from PR always will get rounded? It's possible to adjust manually (standard way) to generate them with all the quantity of the PR?
Thank You!
Best Regards,
Raphael PalmieriHI,
"CUNI is only for display, in background system will consider decimals in table level."
Rephrase - CUNI you can only define how the decimals are presented to the user, but stored in tables is always with 3 decimals.
Note: 23771,
The same has been discussed many time, Follow mr JürgenL -
Unit of measure rounding.
Increase in decimal places for UOM -
Quantity Variable No. On BackOrder Report
Hi Experts,
I want to show the quantity on Sales Back Order Report PLD(Sales A/R ->Sales Report -> BackOrder). Please suggest how can i do this ? Which variable no cintain the info about quantity .
Thanks & RegardsHi Om...........
if you refer the system defaul PLD then you can get the variable no. But its already there in ordered and delivered column.
Regards, -
ALV column with variable number of decimals to be displayed
Hi,
I've an ALV where I need to display a numeric column with a variable number of decimal row-by-row, from 0 (no decimals) to 4.
I've declared the numeric field as TYPE P DECIMALS 4.
I've tried with DECMLFIELD in ALV catalog, and this works for 1 to n decimals, but when I leave the field indicated in DECMLFIELD equal to 0, ALV shows the default number of decimals of the field (4 in that case).
Any help will be very appreciated.
Thanks.
JordiNo, I didn't try EDIT_MASK.
How should I use it to format output to display decimals or not depending on the row?
I have 2 kinds of values, all stored in a TYPE P DECIMALS 4: Those that really are an integer (decimals should not be displayed for that ones) and the values that really have 4 decimals (which should be displayed with decimals in ALV).
Example:
13,0000 should be displayed as 13
0,4567 should be displayed as 0,4567
With EDIT_MASK could I do that?
Thank you very much. -
How to round quantity with FMS for some items in Production order lines?
Hello,
How to round the quantity with FMS or SP for only some items in the composition of Production order (lines) and the bill of materials like a box or a stick that should not be with commas.
Exemple of Production Order
P1
M1 | 234,78
M2 | 104,04 --> 104
M3 | 60,7
M4 | 512, 00
M5 | 107,67 --> 108
and others will not be rounded
Thanks,
HafidHi Gordon,
you're always the first to respond, thank you.
Its when adding the production order, before its creation or when entering the quantity of product in OWOR.
Like :
SELECT CASE WHEN ($[$37.4.0] = 'M2') OR ($[$37.4.0] = 'M5') THEN ROUND (T0.[PlannedQty],0)
ELSE T0.[PlannedQty] END AS PlannedQty FROM WOR1 T0
or
SELECT ROUND (T0.[PlannedQty],0) FROM WOR1 T0 WHERE T0.[ItemCode] =$[$37.4.0] AND (T0.[ItemCode] = 'M2' OR T0.[ItemCode] = 'M5)
Thanks,
Hafid -
Convert variable type f into variable type p decimals 2
Hi,
How can i convert a type f variable into a type p decimals 2 variable?
I'm trying to make this division:
var type f.
var1 type p decimals 2
var = 50 / 100.
the result is:
var = 5.0000000000000000E-01
if i do
move var to var1.
the result is:
var1 = 0.01 ???
can anyone tell me what i'm doing wrong?DATA: var type f,
var1 type p decimals 2.
var = 50 / 100.
WRITE:/ var.
move var to var1.
WRITE:/ var1.
Result is: 0.50
I don't see what's your problem...
Greetings,
Blag. -
hi folks: i need to round the values in my float variables to 2 points precision like this x.xx, so that i can compare them easily.
for example: 0.08765432 and 0.09087654 would be esaier for me to compare if i could round them to: 0.09 and 0.09(equal). otherwise those numbers will, virtually, never equal ech others.
is ther a way to round up my float variables to x.xx precision?
thxRather than comparing string representations of integers, I'd suggest just using a delta:
double delta = 0.0000005;
double someNumber1, someNumber2;
// get values for someNumber1, someNumber2
if (Math.abs(someNumber1 - someNumber2) < delta) {
// say they're equal
}But actually using BigDecimal is probably the better choice.
Maybe you are looking for
-
i'm creating a website in flash, and to create a button i usually click the text i want to be converted to a button, convert it to a button then put an actionscript in to make it link to another scene. but recently when i do this it won't even do the
-
PDF Portfolio on IPAD-text to be highlighted
how can I highlight text in a PDF document that is part of a PDF portfolio on an ipad. the tool is whited out?
-
How to disable html for whole swing application.
Hi, As we can disable html for individual swing components , for example JLabel label.putClientProperty("html.disable",Boolean.TRUE); BasicHTML.updateRenderer(label,"html.disable"); is there any way to disable html rendering in swing components for s
-
Sales order information in Output text as subject in External Email
Dear Expert Request to guide me with the steps involved to configure output text for the information of sales order to be sent to customer via e mail once the order is svaed.
-
Problems with the function RFC_GET_TABLE_ENTRIES
Hi experts, We have a external application named P-Synch that is used when a user needs to change or unlock their password on our SAP system. The problem we are presenting is that in our PBP system the application is working fine but in our BW