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).
Similar Messages
-
Very Urgent - Converting Character value to Hexa Decimal value
Hi
data: lv_stsor_hex(16) type X.
p_is_ppc_comp_conf-stsor is a char 10 field ***
<b>write p_is_ppc_comp_conf-stsor to lv_stsor_hex.</b> "<-- Hex Conversion
In 4.6C version this write statement is working fine but this is obsolete in ECC 6.0
and its showing syntax error.
Can anyone tell me how to convert a 10 char length value to a hexa decimal value
which is of 16 characters length and of type hexadecimal
Thanks a lot. Points will be rewarded immediately.Hi,
Use the Function module CHAR_HEX_CONVERSION.
report zeta_hex.
data: s type string.
data: h(1) type x.
data: c(1) type c.
data: byte(2) type c.
data: length type i.
FIELD-SYMBOLS: <DUMMY>.
s = 'ThisIsAString'.
length = strlen( s ).
do length times.
byte = ( sy-index - 1 ).
c = s+byte(1).
* You can do this
ASSIGN h TO <DUMMY> TYPE 'X'.
WRITE c TO <DUMMY>.
* or you can do this
* call function 'CHAR_HEX_CONVERSION'
* exporting
* input = c
* importing
* hexstring = h.
write:/ h.
enddo.
Regards
Sudheer -
Need rounding off value for partial Goods receipt
Hi,
My requirement is that the PO value,PO tax value ,GR value and Invoice value(IR) should get rounded off.
When I am using the PO value which is rounded off in PO, but at the time of posting partial goods receipt the value for the GR/IR clearing or the stock value is not getting rounded off for these G/ls.
What should I do for this to get the rounded off values in GR.
Regards,
GorakshHi Goraksh,
The problem is that the pricing (incl. the rule 17) is not normally called at the time of GR. As Jürgen wrote, the system just uses the "net value" field of the PO.
I have however a "wild" idea. If the price in the PO comes from the info record or from a contract (and not changed manually there), then you can set the "pricing date category" = 5 there, meaning "GR date". This causes the pricing to be called again at the time of GR and your formula 17 will fire.
The side effect of course is that the price that you had in the PO, printed and sent to the vendor will not be binding: if you change the PIR price before the GR, the GR will be posted to the new PIR price, despite the fact that the PO printout showed something else. So the question is if the price printed on the PO is indeed binding in your business case - in many business cases it is the current vendor price that matters for the billing by the vendor, not the one that you prined on the PO. For such business cases you should have had pricing date category 5 anyway...
BR
Raf -
Rounding off to two decimal places
Hello,
For simplicity, is there a method which will round off
a double variable to two decimal places.
Excample: if I have a result which equals 2.1999998
and I want to display this as 2.20 in a TexTField.
Any help would be much appreciated.
ThanksIf you are trying to do dollars and cents, I further recommend you use:NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance();
String currencyOut = currencyFormatter.format(yourNumber);to format your numbers as they will give the correct precision for international currencies simply by setting the locale, and they will also automatically handle the currency symbols ($, DM FR, etc.)
Doug -
hi all
the forecast which i receive from other system ( APO / BW ) comes in decimals even for an unit which wont have decimals. ( say Number, Item etc).
is there any settings that should be done so that the values get rounder off.
rgds
jollyDear,
You can maintain the following values for user parameter MM_FCST_ROUND:
' ':(No value maintained): Rounding as in standard.
'K': Rounding to the nearest whole number.
'B': Rounding always down.
The setting of user parameter MM_FCST_ROUND not only affects the material forecast with Transactions MP30, MP38 and MPBT but also with Transaction MM02.
Please try and come back.
Regards,
R.Brahmankar -
Using round off function in where clause
Hi All,
I'm trying to use round off function in where clause, I seek help in completing this script.
WITH CR_Details AS
(Select
request_id,
parent_request_id,
fcpt.user_concurrent_program_name Request_Name, phase_code, status_code,
round((fcr.actual_completion_date - fcr.actual_start_date),3) * 24 * 60 as Run_Time,
round(avg(round(to_number(actual_start_date - fcr.requested_start_date),3) * 1440),2) wait_time,
fu.User_Name Requestor,
fcr.argument_text parameters,
to_char (fcr.requested_start_date, 'MM/DD HH24:mi:SS') requested_start,
to_char(actual_start_date, 'MM/DD/YY HH24:mi:SS') ACT_START,
to_char(actual_completion_date, 'MM/DD/YY HH24:mi:SS') ACT_COMP,
fcr.completion_text
From
apps.fnd_concurrent_requests fcr,
apps.fnd_concurrent_programs fcp,
apps.fnd_concurrent_programs_tl fcpt,
apps.fnd_user fu
Where 1=1
and fcr.concurrent_program_id = fcp.concurrent_program_id
and fcp.concurrent_program_id = fcpt.concurrent_program_id
and fcr.program_application_id = fcp.application_id
and fcp.application_id = fcpt.application_id
and fcr.requested_by = fu.user_id
and fcpt.language = 'US'
and fcr.actual_start_date like sysdate )
select crd.*
from CR_Details crd
where Run_time <> '0'
AND wait_time <> '0'
GROUP BY
crd.request_id,
crd.parent_request_id,
crd.fcpt.user_concurrent_program_name,
crd.requested_start_date,
crd.User_Name,
crd.argument_text,
crd.actual_completion_date,
crd.actual_start_date,
crd.phase_code,
crd.status_code,
crd.resubmit_interval,
crd.completion_text,
crd.resubmit_interval,
crd.resubmit_interval_unit_code,
crd.description
Not sure about the GROUPBY function referencing the "crd." .Hi,
The best thing for you to do is start over. Start as small as possible, then take baby steps.
Pick one of the tables; fcr perhaps, and write a query that just uses that table, like this:
SELECT *
FROM apps.fnd_concurrent_requests fcr
WHERE fcr.actual_start_date >= TRUNC (SYSDATE)
AND fcr.actual_start_dt < TRUNC (SYSDATE) + 1
;(I think this is what you meant to do when you said "... LIKE SYSDATE".)
Make sure this little query gets credible results. When that tiny query is working perfectly, add another line or two. You can cut and paste code from what you posted, if that helps you.
If you get stuck, post the last version of your code that worked perfectly, and the latest version (only a line or two bigger) that has the problem. Describe what the problem is. If you get an error, post the complete error message. In any event, post CREATE TABLE and INSERT statements for all the tables and columns needed to run the query, and the results you want to get from that query.
When you post any code, format it, so that how the code looks on the screen gives some clues about how it is working.
When you post any formatted text on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
If you going to use the AVG function in the sub-query, then you probably need to do a GROUP BY in the sub-query.
If you're not using any aggregate functions (like AVG) in the main query, then you probably don't want to do a GROUP BY in the main query.
I know this is a lot of work. I'm sorry. If there was an easier way, I wouldn't ask you to do all this. -
UOM is getting rounded-off while converting the PR into PO
Dear all,
We have created a PR with the UOM - EA for the qty 2.256 but the same was changed as 2 while converting the PR into Purchase order (If the PR qty is 2.564, then PO qty is changed to 3).
I have checked in "CUNI". In this, for "EA", decimal pl rounding is maintained as 3.
(If we create the PO directly for decimal qty w/o referring the PR, qty is getting rounded-off in print format. We have already posted this print script issue alone and we were advised to change the print script.)
What we have to do to get the actual PR qty in PO.
Pl give your valuable suggestions.
Warm regards,
M.Selvaganesh,Friends,
What is the application of decimal places under display and decimal pl. rounding under conversion in CUNI?
(If i maintained decimal pl. rounding as 2, system is taking the PR qty of 2.256 as 2.25 in PO. and i've maintained decimal places as 3. But where can i see this in PO?)
Pl clarify.
Cool regards,
M.Selvaganesh, -
How to display integer values and decimal values in same column in a table
hi
in my report amount column is there in that column integer values (2234) and decimal values (3562.34)
i want to print this values as 1000 separate as like 2,234 as integer and 3,562.34 as decimal
but this values print like 2,234.00 as integer and 3,562.34 as decimalHi akilreddy,
Per my understanding you have an field which data type may be "float" in the DB, so it have value which format like "2234" and "3562.34" in the same column, now you want to format them differently in the report, right?
I have tested on my local environement and you can use the expression in the custom format in the Textbox properties to do this:
Right click the field which you want to add the format and select the "Text Box Properties"
Select the "Number" on the left pane and using expression below in the Custom format:
=IIF(Split(Fields!yourfieldname.Value,".").Length=2,"#,###.##",Nothing)
Or you can just use "#,###.##" in the format.
Preview you will go the result like below:
If you still have any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support -
Convert Voltage values to Decimal values.
I need to convert voltage values/range to decimal values/range.
Example: I read voltage (range 0 to 1.0volts) form DAC and covert it corresponding decimal value (decimal value range is 0 to 16000).
0 decimal = 0 volts
16000 decimal = 1.0volts.
Thanks for the help.I'm not sure how you'd get a value of 16000 out of the 2620 as that is only a 12-bit DAC that will produce values from 0 to 4095. Here's the transfer function directly copied from page 12 of Linear's datasheet.
Charles Chickering
Architecture is art with rules.
...and the rules are more like guidelines
Attachments:
TransferFunction.JPG 17 KB -
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 -
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 -
Rounding off value problem in sales order
Hi All,
This is related to a rounding off value problem in sales order.
The problem is described by an example which is as follows -
Selling Price of Material A = Rs. 176.76
Excise charged = Rs. 21.80
Total Price = Rs.176.76 + Rs.21.80 = Rs. 198.56
On this total Trade Discount (ZDTD) having access sequence,is calculated at the rate of 4% = Rs. 7.94
But the condition base value after the discount is showing Rs.198.60 instead of Rs.198.56
I want the system to reflect the value as Rs.198.56 intact and it should not round up to the nearest value i.e. Rs. 198.60
Why is this happening? Is it possible to reflect the exact value? If yes what is needed to be done?
The commercial round off is activated for the DIFF Condition Type.
Looking forward to some valuable suggestions.
Thanks & Regards
Priyanka MitraHi Ramesh,
Thanks for your suggestion but the problem has been solved by me.
Regards
Priyanka Mitra -
Urgent Regarding round off values in script
Hi Gurus,
I want to display round off values in total amount . Order conformation
i wrote one suroutine but it is not working , it is going for dump.
Eg:- total amount = 10004.49 it should display in 10004.
total amount = 10004.51 it should display in 10005.
Plz help.
REPORT ZVALUES.
tables:komk.
form round TABLEs INTAB Structure ITCSY
OUTTAB structure ITCSY.
data: w_fkwrt type fkwrt,
w_fkwr type fkwrt.
read table intab with key name = 'KOMK-FKWRT'.
if sy-subrc = 0.
w_fkwrt = intab-value.
w_fkwr = ceil( w_fkwrt ).
outtab-value = w_fkwr.
condense outtab-value.
modify outtab transporting value.
endif.
endform.
in layout i call this subroutine like this.
/:DEFINE &KOMK-FKWRT1& := &KOMK-FKWRT&.
/:PERFORM ROUND IN PROGRAM ZVALUES.
/:USING &KOMK-FKWRT&.
/:CHANGING &KOMK-FKWRT1&.
/:ENDPERFORM.
SU Final amount,,,,,,,,,,,,,,,,&KOMK-FKWRT(I13)&
Thanks & Regards,
VamshiUse this FM
CALL FUNCTION 'HR_IN_ROUND_AMT'
EXPORTING
amount = p_amt
rndoff = '100'.
RNDLMT = 'N'
IMPORTING
RETAMT =
DLTAMT = -
Regarding rounding off value in pricing procedure
hi fi professionals,
i have an issue regarding pricing procedure, pls help me out, its urgent
i have a condition type, zrou(rounding off value)
the fanda is- when i am creating po- my net value is suppose- 19.90.
so my client requirement is- 0.10
so i have given 0.10, then total value is- 20.00
but this value is not pickin up in migo- accounting document
it is picking 19.90 only.
so what is the configuraion needed in omsy for picking up the total value in accounting doc.
regards,
susantaHi..
You would need to maintain a account key in the pricing procudure which would calculate the balance to make the total a rounded value.
In FI perspective, you need to assign a GL account for that..
Cheers
Raghu -
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.
Maybe you are looking for
-
Bonjour , j'ai acheté un album karaoké sur Itunes , et télécharché , hélas j'entends la musique mais ne vois pas les paroles défilées sur l'écran télé car j'ai un Mac mini, avez vous une solution SVP, merci pour votre réponse rapide. Bonne journée.
-
Scheduling agreement for customer?
Hi, Similar to what we have in MM the scheduling agreement, which as i know is the substitute for long term purcahse order. my question is whether we also have scheduling agreement between firm and the customer simliar to scheduling agreement? there
-
Production version issue.
Dear Guru's, I have created two version in material master. also I have changed in "opl8"{ production version = Manual selection of production version} but still system is not asking me for production version at the time of creation of productio
-
How to Recover Lost Date from Nokia 2690
Friends i have lost some usefull data from Nokia 2690 because software is damaged, the data i have lost is worth more than my life, so since past months i have been worried and suffering form deppression. My request to all of you is that suggest me
-
RMI-IIOP, C++ and mobile code
Hi, I'd like to know whether it is possible to use RMI-IIOP [1] to connect a Java component to a C++ component on a remote end and use "mobile code" [2]. In other words, a C++ client connects to a remote Java component, downloads a class file and exe