Reg: Quantity field taking as decimal values
Dear Experts
In the Bapi BAPI_SALESORDER_SIMULATE the structure BAPIITEMIN contains a field Req_qty that has the data element WMENGC which is taking the input with 3 decimal points even though the domain doesnt contains any decimals, because of this im facing the problem while giving the input.
Is there any functional requirement to avoid that quantity field taking those 3 decimals
eg: Original Value: 1000
Input Value(Converted Value) : 1.000
Kindly suggest me a solution to sort out the issue.
Regards
Arun.P
well i suspect that this bapi also has a currency field, which you should fill.
If he knows the currency he should be able to find out how much decimals there are customized for this currency, and then probably he will do it right.
oh lol you are talking of quantities and not values... sorry forget about my comment...
Edited by: Florian Kemmer on Jul 22, 2010 2:37 PM
Similar Messages
-
Rounding a quantity field to one decimal place. PLEASE URGENT
I have a quantity field with three decimal places. I have to print this field with only one decimal place. This is in a smartform.
suppose: qty = 45.678
I want it to be printed as 45.7
Thanks in advance.Hi Riki,
I think you can use Function Module ROUND to round off the value...
REPORT ZTEST_SHAIL4 .
data: out type p decimals 1,
inp type f.
inp = '45.678'.
CALL FUNCTION 'ROUND'
EXPORTING
DECIMALS =
input = inp
SIGN = ' '
IMPORTING
OUTPUT = out
EXCEPTIONS
INPUT_INVALID = 1
OVERFLOW = 2
TYPE_INVALID = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Now use the variable 'out' to display the rounded off value...
Regards,
SP. -
Quantity field to one decimal place. PLEASE URGENT
I have a quantity field with three decimal places. I have to print this field with only one decimal place. This is in a smartform.
suppose: qty = 45.678
I want it to be printed as 45.7
Thanks in advance.Create one more variable in Global definitions with only 1 decimal place.
Assign value of qty to this new variable.
SAP automatically takes care of the rounding.
And then print this new variable rather than qty.
You can write all these in a code block. -
Change of the quantity field to 5 decimal places in SAP
Hi Gurus,
The quantity field is appearing with 3 decimal places in BOM, Process Order, etc. Is it possible to make the decimal places to 5.
All the decimal digits from SAP are 3 digits. We have an interface through which the data flows from another legacy system (Fow system) to SAP. And the Fow system setting was 5 digits. The issue is some of the raw material requirement qty was really minor and it might be below the decimal 3 digits.
In that case, when the data flows to SAP from Fow system it will cause the material stage failure. so please help me to investigate how to let the SAP also could have the 5 digits decimal. Thanks.
Regards
BrijeshDear ,
Its SAP standard ,to put and use decimal places in BOM qty .You can use upto 3 decimal places in BOM qty.
At SE11 you need to see what measure field is linked to the quantity field.Then goto tranaction CUNI and chage the decimal places of the unit of measure for the qty field unit , it will not allow you more than 3 decimal places in case of BOM qty.
You have following choice :
1. With the access key make changes in the standard program and take help from ABAPer
SAPLCSDI, Table Name-RC29P, Field Name- MENGE.
2) Change the base quantity in BOM header to 1000 aand accordingly change the component quantity.
Hope this is clear
Regards
JH -
Datatype declaration for a user field to accept decimal values
What should a user defined field whose subtype is declared as price be declared so as to accept decimal values...I have declared as numeric but it is not accepting decimal values so how should it be declared..
hi,
in order to get Price format
FieldType should be Units and Totals
and structure of the field should be Price
this makes the field to accept decimals even
regards,
varma -
hi,
how to print the Quantity variable with 2 decimals actually the field is having 3 decimals.
Ex: field1 having value <b>16000.000</b> and field2 value is <b>800.000</b>
in out put i want field1 = <b>16.000,00</b> and field2 = <b>800,00</b>.
same is achieved in script is done by using field1(I12.2), and field2(12.2).
how can we do same thing in Smartform....
Regards
Ashok PPlease see formatting options for Smart Forms. There you will find this:
&field(.<nat.number>)&
Limits output of decimal places to <nat.number>
You should then use: &field1(.2)&
Here is the complete list:
Overview
Formatting Options for Fields
Syntax
Description
&field+<offset>&
Skips offsets (<offset>) in the field value (character fields only). If the offset is greater than the length of the value, nothing is displayed.
&field(<length>)&
Sets the output length to <length>.
&field(*)&
If the field is defined by a Data Dictionary type, Smart Forms sets the output length to the value specified there.
&field(S)&
Suppresses the sign
&field(<)&
Displays the sign to the left of the number
&field(.<nat.number>)&
Limits output of decimal places to <nat.number>
&field(E<nat.number>)&
Displays the field value with the fixed exponent <nat.number>. The mantissa is adapted to this exponent by shifting the decimal character and inserting zeros.
&field(T)&
Suppresses thousand indicators when displaying fields of types DEC, CURR, INT, and QUAN.
&field(Z)&
Suppresses leading zeros in numbers
&field(I)&
Suppresses display of initial values
&field(K)&
Deactivates a conversion routine specified in the Data Dictionary
&field(R)&
Right-justified display. Use this option only when specifying an output length as well.
&field(F<filler>)&
Replaces left-justified blanks in the value by the fill character <filler>.
&field(L)&
Converts a date field to a local date and displays it. The date is then formatted using the edit mask JPDAT.
Since this representation uses Japanese characters, it is only to be used in the Japanese version of the SAP System.
&field(C)&
The system takes the field value as a sequence of words separated by blanks. Option C shifts these words to the left
and leaves one blank in-between as a separator. Any leading blanks are omitted. This effect corresponds to that
of the ABAP statement CONDENSE. -
Quantity field referring to fixed value / total value?
Hi,
May I know the quantity in kb31n and kp46 is referring to fixed value or total value of SKF. correct?
Say take fixed value for example.
this month number of employee in company is 300 person where receiving cost center A =100 and receiving cost center B = 200.
this month total cost charge out is $5000.
so during cycle,
receiving cost center A will be charged 1667
receiving cost center B will be charged 3333
Thx
RgdsHi,
Yes your understanding is correct.
You can try this example in a test system.
regards
Waman -
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 -
Quantity Field Display in Sap Scripts
Hi,
I am displaying the quantity field in the sap script layout.But in the quantity field having 3 decimal places.
Ex: 3.400 is there i want to display 3.4
3.000 only i want to display 3
3.740 -
3.74 like that i want.
I want to omit the zeros after decimal places.
Please give me the solution.
Regards,
JennyAs it is quantity field, it will print even the decimal points...U can try this...move the value to a char variable and use truncating to remove zeros by deleting them and use this value in ur script to print the value.
-
Smartform - Format quantity field - CIZ
Hello all,
I have a quantity field which has a value 11.000.
I need to print it as 11 (no trailing zeroes ). But if the quantity is 11.23, then it shud print 11.23.
To acheive this, In sapscript, We used to write the quantity field with a C in bracket.
for eg. &CAUFVD-GAMNG(C)&
How Could I acheive this same functionality in smart forms ?
I beleive CIZ shud work in smartforms also..but unfortunately it is not..
Am i missing something.. ?
Thank you so much for your time.I donot think control commands are possible in Smartform like in sapscript. You have to create a program lines node and there u can write ur logic to meet this requirment.
Ex:
data: val type p decimals 3 value '10.230'.
data: l_char type c length 10.
data: l_whole_no type c length 10.
data: l_decimal type c length 3.
l_char = val.
split l_char at '.' into l_whole_no l_decimal.
if l_decimal = '000'.
l_char = l_whole_no.
endif.
Regards,
Joy. -
Hi,
I am displaying the quantity field in the sap script layout.But in the quantity field having 3 decimal places.
Ex: 3.400 is there i want to display 3.4
3.000 only i want to display 3
3.740 -
3.74 like that i want.
I want to omit the zeros after decimal places.
Please give me the solution.
Regards,
JennyHi Janardhan,
Do one thing in your print program make us of following line of code
shift wl_local right deleting trailing '0'.
where wl_local will containing your quantity..
This will solve your prob...
Enjoy SAP.
Pankaj Singh. -
Regarding quantity field...value in layout
Hi All,
my issue is here i am passing vbrp-fkimg value to layout..
the value in the field above is 100.000, but here in the layout it is coming as 100 and printing it.
how the value of 100.000 become 100.
any settings, configuaration are there which changes the value..
Regards,
vinesh..Hi,
quantity field will be whole no.
if the requirment is like printing decimals.
Then declare one variable of type pack decimal.
data : w_var type p decimal 3.
Move vbrp-fkimg to w_var.
and desplay this variable w_var.
Reward pts if helpfull.
Regards,
Dhan -
COPA report quantity field with decimal notations
Hi Gurus,
Is it possible that ALV reports in COPA can have a decimal notations particularly in quantity field?
Regards,Go to transaction KEA6 and check the data element of the value field you are interested if it foreseen decimal place.
If not, chose a different data element.
paolo -
Decimal place in Quantity field
Hello experts,
Got a query regarding decimal places in the quantity field of a sales order.
The material UOM is maintained as EA. I have checked the transaction CUNI, where the decimal place is maintained as ZERO. Still , Sales order / Delivery documents which i am creating is allowing decimal places for in the quantity.
For eg: material quantity of 50 EA in sales order, during the delivery batch splitting is getting splitted as 25.095 EA and 24.050 EA. Can you pleae advise the reason for this and how to go about this...
Thanks,
Safeer RahmanThanks for your reply....
But , as i have already told the decimal place field is maintained as 0(zero) in CUNI for the UOM EA.... Still its allowing me to enter decimal values... for eg:. its allowing me to enter 50.038 EA. I don't know why its not giving an error message prompting me not to enter decimal values...
Any idea?
Thanks,
Safeer Rahman -
In ML81N, Quantity Field allows maximum 3 digits after the decimal.
Hi Everyone!
Hope things are going good.
In SES, ML81N, The Vendor has a total invoiced value of $9033.5 .
The Gross Price of the Product is USD 13,333.33
The Quantity entered is .667 or .668.
Both of the quanities entered gives a value which is $6 more or less.
The only way to arrive at $9033.5 is to use quantity .6675 and the Quantity field does not allow the entry of more than 3 decimal digits.Dont change the domain, as this has a huge impact on your system. At least talk to SAP before you are doing that.
I am just the opinion that you have a wrong unit of measure for your material.
You did not say what unit you use, but if it is KG, then you better use Gram to meet your requirement.
Maybe you are looking for
-
Just how do i stop this autostandby feature. It was not on my previous ff. Or maybe not set. I need to know how to swithc it off and cannot find a lead in the index or even a list of all the items in the index to help track it. I am working on someth
-
Popups: Navigation from view to window does not work
Hi, I open a second window as popup. This window has 2 views embedded, displaying view1 first. On some actions I would like to navigate to view2. Defining an outbound plug on view1 and an inbound plug on view2, connecting them and firing the outbound
-
Migrate oracle 9i DB to 10g R2.
how can I Migrate oracle 9i DB to 10g R2. ?
-
Kernel version for my sp levels
Hello, I am running SAP server 6.40 on Solaris (64bit EX2 for Oracle) with 327 Kernel Version. I have work processes that crash when executing a specific abap program. As it may take time before sap dev support find the bug, I would like to test with
-
AGR_1251 &TSTCT Using SQVI?
Hi All, I need the Roles and its relevant TCodes with its text.When I combined AGR_1251 & TSTCT using SQVI.I used to combine both the tables with TCode field.But it shows as No relationship exists. For what reason It shows as there is no relationship