Netwr without decimal point
I need to write NETWR into a file without the decimal point. So I am looking to assign it to another variable. How to do this
Say NETWR is 900.00
then var = 90000
Hi,
Please try this.
DATA: LV_NETWR1 LIKE VBAP-NETWR VALUE '900.00',
LV_NETWR2 TYPE I.
MOVE LV_NETWR1 TO LV_NETWR2.
WRITE: / LV_NETWR1, LV_NETWR2.
OR
DATA: LV_NETWR1 LIKE VBAP-NETWR VALUE '900.00',
LV_NETWR2(6) TYPE C.
MOVE LV_NETWR1 TO LV_NETWR2.
TRANSLATE LV_NETWR2 USING '. '.
CONDENSE LV_NETWR2 NO-GAPS.
WRITE: / LV_NETWR1, LV_NETWR2.
Regards,
Ferry Lianto
Similar Messages
-
FM to get only quantity without its decimal points
hi guys,
is there any FM that can enable to get only qty without its decimal points without rounding up.
e.g.: 500.12 , i need to get only 500 and exclude .12Hi Ester,
U dont need any FM for that. You can use a simple logic like shown below:
data: lv_quant TYPE p DECIMALS 3 VALUE '500.96'.
DATA: lv_out type i.
lv_out = trunc( lv_quant ).
write lv_out. "this will have your result
Regards,
Prakash -
I am creating a new document in Photoshop at the following dimensions. 3.889"w x 6"h. After document is created I go check the canvas size or the Image size and it shows my document as 3.89"w x 6"h. How do I get Photoshop to allow 3 decimal points?
I think that the way measure units work in photoshop, i try to draw a rectangle marquee and only two decimal point appear.
I tried in indesign CS6 and 3 decimal work fine. -
Dynamic displaying of decimal points for currency field in ALV
Hi,
In ALV output there is a currency field and displaying data of different countries. It should display decimal point according to the country's currency. But at a time it can display data of different countries.Hi Dilip,
I think your question is about currencies with different number of digits after decimal point. If you have the currency field in the ALV row, you have to give it's name as currency reference for the value field in the field catalog.
After creating the field catalog, call a form and do something like this (change fielnames accordingly).
<pre>
*& Form alv_fieldcat_enhance
Individual Enrichment of field catalog
FORM alv_fieldcat_enhance
CHANGING pt_alv_fieldcat TYPE slis_t_fieldcat_alv.
FIELD-SYMBOLS:
<alv_fieldcat> TYPE slis_fieldcat_alv.
LOOP AT pt_alv_fieldcat ASSIGNING <alv_fieldcat>.
IF <alv_fieldcat>-fieldname(5) = 'KBETR' OR
<alv_fieldcat>-fieldname(5) = 'SKBTR' OR
<alv_fieldcat>-fieldname(5) = 'DMBTR'.
Company code currency
<alv_fieldcat>-cfieldname = 'BWAER'.
Document Currency for conditions, net value and taxes
ELSEIF <alv_fieldcat>-fieldname(5) = 'KWERT' OR
<alv_fieldcat>-fieldname = 'NETWR' OR
<alv_fieldcat>-fieldname = 'NPAX_MWST_AMNT'.
Document Currency
<alv_fieldcat>-cfieldname = 'WAERK'.
ENDIF." <alv_fieldcat>-fieldname(5) = 'KBETR' or
ENDLOOP." at pt_alv_fieldcat assigning <fieldcat_alv>.
ENDFORM. " alv_fieldcat_enhance
</pre>
Regards,
Clemens -
Hi,
I have a requirement to concat 2 columns ( 1st column is a text column and 2nd column is a numeric column set as double in RPD). For the 2nd column, user wants to see 3 decimal digits all the time.
For example, if the value is 2.4567 then I need to show round off value 2.457 and if the value if 3.4 , then I need to show 3.400 and if the value is 4 then I need add decimal point and show 4.000.
Please let me know how I can achieve using OBIEE application without having to go through RPD.
Thanks
Swarna
Edited by: 934460 on May 15, 2012 12:48 PMTry the following:
In this example:
Column 1: Month Name
Column 2: Revenue
Column 3: Month - Revenue
Formula for Month - Revenue column will be:
Month Name ||' - '|| cast(round(Revenue, 3) as char)Hope it helps.
Regards,
Kalyan Chukkapalli
http://123obi.com -
Need to display without decimal places
hi
i database two fields are defined as fltp10) and fltp16 i need to display them as num (10) and num (12) and without decimal places
please suggest i will definately rewards points to helpfull answers
regards
aroraHi Arora
Do you mean, you need to display ignoring the decimal value???
If so you can declare a variable of same lenght of type N and move the value, that will do the task.
By default when we move numerical values it brings leading ZEROES.
If the requirement is to remove the leading zeroes move to a integer type variable.
Kind Regards
Eswar -
Problems with the system decimal point with german regional settings
I have a Labview 6 app that needs deploying to Germany.
My app sends strings over VISA RS232 and GPIB instruments with floating point numbers.
When changing from English to German regional settings, in Windows XP, periods are now interpreted as commas and the app starts truncating my decimal numbers. So in the English Regional Setting when I send 1.234 I get 1.234 but in the German Regional Settings when I send 1.234 I get 1.000.
I have turned off the "Use localized decimal point" in Tools - Options - Front Panel as well as set any function (Frac/Exp String to Number) that has a "Use System Decimal Point" connector to FALSE.
Now here's my problem....
This fixed the issue I was having as long as I am in the development environment, however, once I build the application I still get the truncated numbers. Example: I send 1.234 to an instrument and it sees 1.000.
Again this works fine in the development enviroment, sending 1.234 reads 1.234 with German regional settings.
Any help is appreciated.
AdamYou can use a simple function of the "Scan from string" function.
Place "%.;" (Without the quotes) in the scanning string, and this will tell LV to use a decimal point for interpretation. If you place "%,;", this will tell it to use a comma.
You can place this at the beginning of your format string, and it simply tells the parser how to work, it doesn't otherwise produce an output.
Using simply "%;" sets the seperator to the system default (maybe the best idea after the code has been run as the changed decimal point character apparently remains changed otherwise). From the LV help
The following codes control the decimal separator used for numeric output. These codes do not cause any input or output to occur. They change the decimal separator for all further inputs/outputs until the next %; is found.
%,; comma decimal separator
%.; period decimal separator
%; system default separator
Hope this helps
Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2) -
2 Decimal Points for Indonesian Rupiah Currency
Dear All,
I would like to assign 2 decimal points to Indonesian Rupiah Curreny - IDR by accessing OY04.
However, there is no input value for 2 decimal points.
For accounting purpose, we would like to record business transactions up to 2 decimal points.
Kindly advise.
Appreciate it!Hi wishy washy,
even I had various real painfull experiences with clients who changed the decimals..... Still having nightmares about this....
Please be hypercarefull with that what you are doing. Has IDR really 2 decimals? As far as I can see IDR has in Standard (In my SAP-testsystem) no decimals.
What happens if you change the decimals? Please note, SAP stores values always without decimals.
Example: 100,00 Euros are stored as 10000 in bseg-wrbtr.
Euro has 2 decimals.
If you change the decimals to 0 the amount changes to 10000 Euros.
Example: 100 IDR are stored as 100 in bseg wrbtr.
IDR has no decimals
If you change the decimals to 2 the amount changes to 1,00 IDR.
Please consider: automatic taxcalculation, Data carriers, reporting, open item clearing, budgeting, depreciation, and hundreds of other issues.
The several warnings of OY04 have a reason... and I don't want you to have my nightmares.
Best regards
Horst -
Sqlldr ( sqlloader ), why not loading decimal point properly ?
Hi,
I am trying upload data using sqlldr ( sql loader ) in Oracle 9.2 in AIX, Details are
Table
drop table parag;
CREATE TABLE parag
source_sys char (00006) not null,
portfolio_FO char (00006) not null,
prod_id char (00016) not null,
V00230 char (00003) not null,
inst_id char (00008) not null,
V09490F char (00016) not null,
V09060 number (15,2) not null,
V09040 char (00008) not null,
V09000 char (00008) not null
GRANT ALL ON parag TO PUBLIC;
Control File
load data
infile '$A2_FIC/parag.dat'
replace
into table parag
fields terminated by ',' trailing nullcols
source_sys,
portfolio_FO,
prod_id,
V00230,
inst_id,
V09490F,
V09060 decimal external
V09040,
V09000
Data
F01,1517,BROK4,INO,FXSPT,0,-182867.10,20080331,20080331
F02,7822,BROK4,INO,FXSPT,0,-1765629.15,20080331,20080331
F03,1515,STFXSPTFWD,EUR,FXD,48486608,-4652.20,20080331,20080331
F04,1515,STFXSPTFWD,INO,FXD,48486608,274003.25,20080331,20080331
F05,1515,STFXSPTFWD,INO,FXD,48485733,1504906.30,20080331,20080331
F06,1515,STFXSPTFWD,INO,FXD,48549114,7498008.35,20080331,20080331
F07,1515,STFXSPTFWD,INO,FXD,48548049,40765000.40,20080331,20080331
F08,1515,STFXSPTFWD,INO,FXD,48485744,80125030.45,20080331,20080331
F09,1515,STFXSPTFWD,INO,FXD,48552707,-2768610.50,20080331,20080331
F10,1515,STFXSPTFWD,INO,FXD,47923730,-6268500.55,20080331,20080331
F11,1515,STFXSPTFWD,INO,FXD,48179724,-9870000.60,20080331,20080331
F12,1515,STFXSPTFWD,INO,FXD,47404500,-13656000.65,20080331,20080331
But my result is showing,
SQL> /
SOURCE V09060
F01 -182867.1
F02 -1765629.2
F03 -4652.2
F04 274003.25
F05 1504906.3
F06 7498008.35
F07 40765000.4
F08 80125030.5
F09 -2768610.5
F10 -6268500.6
F11 -9870000.6
F12 -13656001
12 rows selected.
Questions
1/ My table column v09060 is 15,2 is this short ? ( looks like ) but not understood for e.g. F02, v09060 data including decimal point is 10 while in my table it is 15,2
2/ How to overcome this problem ? without giving V09060 "to_number(:v09060,'999999999999.99')", in control file
Pl guide me.
thanks & regards
paragHi,
Sorry could not understood the reason. Will you pl expalain me ?
1* select source_sys, v09060, length(v09060) from parag order by 1
SQL> /
SOURCE V09060 LENGTH(V09060)
F01 -182867.1 9
F02 -1765629.2 11
F03 -4652.2 7
F04 274003.25 9
F05 1504906.3 9
F06 7498008.35 10
F07 40765000.4 10
F08 80125030.5 11
F09 -2768610.5 10
F10 -6268500.6 11
F11 -9870000.6 10
F12 -13656001 12
12 rows selected.
F01,1517,BROK4,INO,FXSPT,0,-182867.10,20080331,20080331
F02,7822,BROK4,INO,FXSPT,0,-1765629.15,20080331,20080331
F03,1515,STFXSPTFWD,EUR,FXD,48486608,-4652.20,20080331,20080331
F04,1515,STFXSPTFWD,INO,FXD,48486608,274003.25,20080331,20080331
F05,1515,STFXSPTFWD,INO,FXD,48485733,1504906.30,20080331,20080331
F06,1515,STFXSPTFWD,INO,FXD,48549114,7498008.35,20080331,20080331
F07,1515,STFXSPTFWD,INO,FXD,48548049,40765000.40,20080331,20080331
F08,1515,STFXSPTFWD,INO,FXD,48485744,80125030.45,20080331,20080331
F09,1515,STFXSPTFWD,INO,FXD,48552707,-2768610.50,20080331,20080331
F10,1515,STFXSPTFWD,INO,FXD,47923730,-6268500.55,20080331,20080331
F11,1515,STFXSPTFWD,INO,FXD,48179724,-9870000.60,20080331,20080331
F12,1515,STFXSPTFWD,INO,FXD,47404500,-13656000.65,20080331,20080331
SQL> desc parag
Name Null? Type
SOURCE_SYS NOT NULL CHAR(6)
PORTFOLIO_FO NOT NULL CHAR(6)
PROD_ID NOT NULL CHAR(16)
V00230 NOT NULL CHAR(3)
INST_ID NOT NULL CHAR(8)
V09490F NOT NULL CHAR(16)
V09060 NOT NULL NUMBER(15,2)
V09040 NOT NULL CHAR(8)
V09000 NOT NULL CHAR(8)
thanks & regards
parag -
How to cut the zeros after the decimal point ?
Hello everybody,
does anyone know a solution how to cut the zeros after the decimal point at at CHAR data field?
For example the field
&RM06P-PRMG1&
This is a char field in the database, so that the command
&RM06P-PRMG1(.0C)&
doesn't work.
At the moment the output on the form is like that
124,000
It shoud be like that
124
It would be great if anyone could help me!
TIA!
StrobbelHi Strobbel,
If you are working on standard sapscript, first make a zcopy of it, do the modifications in that and assign the new form to the output types in tcode NACE.
First you need to create a program to write the logic, so go to tcode SE38 , create a new program (say zremove_zero) with Program type Executable.
Now you will see ABAP Editor with statement;
Report zremove_zero.
Add the following lines below the report statement.
*& Form remove_zero
* text
* <--lv_AMT text
FORM remove_zero CHANGING lv_amt.
DATA p_amt TYPE p.
MOVE lv_amt TO p_amt.
MOVE p_amt TO lv_amt.
Condense lv_amt.
ENDFORM.
Now save and activate the program.
Now open the zcopy of your script and Just above the statement &RM06P-PRMG1& write the following lines;
/: perform remove_zero in program zremove_zero
/: changing &RM06P-PRMG1&
/: endperform.
Now you can see your amount printing without decimals.
Try and let me know, hope i have guided you clearly.
Regards
Karthik D
P.S.: I advice you to take help from an ABAPER. -
How to compre two fields: one whith Decimal and other without decimal?
Hi all,
I am doing a file to IDOC scenario.
In file strcture I have to compare two fields.
ActiveHSCode and Decree166HSCode where
ActiveHSCode comes with decimal values like for eg 1234.56.789.0 and Decree166HSCode comes with values like for eg 1234567890 or 4567891230 etc.
I have to ignore decimal point from ActiveHSCode and compare with Decree166HSCode,
If both of them are equal I have set ActiveIndicator as'Y' else 'N' and map this field to IDOC's field.
How to achieve this?
Please suggest.
Regards,
SachiHi,
Since all the fields in mapping comes by default as a string ....
you first extract the value from ActiveHSCode using the string functions.
Then compare the
ActiveHSCode and Decree166HSCode.
Since u want to check only for the equality dont convert them to numbers.
Directly check as a string.
The code for extracting the value without decimal value is..
String s = "12345.6789";
s=s.substring(0,s.indexOf(".")) s.substring(s.indexOf(".")1);
System.out.println(s);
result:123456789
Babu. -
Regular Expression to Check number with at least one decimal point
Hi,
I would like to use the REGEX_LIKE to check a number with up to two digits and at least one decimal point:
Ex.
10.1
1.1
1
12
This is what I have so far. Any help would be appreciated. Thanks.
if regexp_like(v_expr, '^(\d{0,2})+(\.[0-9]{1})?$') tHi,
Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002
SammyStyles wrote:
Hi,
I would like to use the REGEX_LIKE to check a number with up to two digits and at least one decimal point:
Ex.
10.1
1.1
1
12
This is what I have so far. Any help would be appreciated. Thanks.
if regexp_like(v_expr, '^(\d{0,2})+(\.[0-9]{1})?$') t
Do you really mean "up to two digits", that is, 3 or more digits is unacceptable? What if there are 0 digits? (0 is less than 2.)
Do you really mean "at least one decimal point", that is, 2, 3, 4 or more decimal points are okay? Include some examples when you post the sample data and results.
It might be more efficient without regular expressions. For example
WHERE TRANSLATE ( str -- nothing except digits and dots
, 'A.0123456789'
, 'A'
) IS NULL
AND str LIKE '%.%' -- at least 1 dot
AND LENGTH ( REPLACE ( str -- up to 2 digits
) <= 2 -
How can I display an unsigned value such as 8134 with an "implied" decimal point e.g. 8.134 without dividing by 1000? Is there a format code that will do this? I have Student Version 8.2.1. Many thanks
It seems silly to force such an arbitrary restriction. A division is cheap, why son't you want to do it???
Of course you could assign a unit such as V and then set the units to kV for the display.
I would go with the division!
Message Edited by altenbach on 11-18-2007 04:58 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
DivideBy10.png 5 KB -
Download amount value without decimal place but element with decimal place
Hi all,
to display the amount without decimal places in classic report, i can use this way which is wa_wrshb NO-ZERO CURRENCY wa__waers.
may i know,
1) how to display amount in ALV where amount value (which using dmshb/wrshb) has no decimal place like JPY?
2) what should i do if i want to download the amount value which field using dmshb or wrshb that the value has no decimal place like JPY?
ThanksHello,
You can display the ALV output according to the decimal point in the currency.
When creating the field catlog for the amount field add the currency parameter also.
wa_fieldcat-fieldname = <amount_field>.
wa_fieldcat-tabname = <output_table>.
wa_fieldcat-seltext_l = <column_heading>.
wa_fieldcat-outputlen = p_olen.
wa_fieldcat-currency = wa_waers. " This will work same as CORRENCY wa_waers
Regards
DKS -
Sap Script : getting comma in place of decimal point & viceversa
Hi experts
In one Sap script for 2 currency fields comma is there in place of decimal point & viceversa.(But rest of currency fields are getting displayed correctly.)
ex: 1426.88 is printed as 1.426,88
please provide me solution as early as possible
Thanks & Regards
Swathi VuddalaHi Swathi,
Check this info.
I am providing two ways with some sample code, you modify it accordingly to your code.
THIS PROCEDURE IS BY CHANGING SETTINGS :
In your user profile, change the decimal format you are currently using.
System->User Profile->Own data.
Go to defaults tab and then change your decimal notation.
THIS PROCEDURE IS WITHOUT CHANGING DEFAULT SETTINGS:
Report YH642_TEST.
TABLES:
mard.
DATA : W_mard_labst type p decimals 3,
w_dt1(18).
data:
W_N TYPE I.
SELECT SINGLE * FROM MARD INTO MARD WHERE LABST = '10000.00'.
WRITE: mard-labst .
W_mard_labst = mard-labst.
WRITE:/ W_mard_labst .
w_dt1 = w_mard_labst .
write W_mard_labst to w_dt1.
Hope this resolves your query.
Reward all the helpful answers.
Regards
Maybe you are looking for
-
Invoices Closed by Reconciliation?
Experts, I have tried to search here and have found nothing that can lead me in the right direction, so I am hoping someone may know the answer. I am trying to create a query that lists all AR Invoices that have been closed by reconciling them agains
-
HT4061 reet my ipad 2, disabled due to too many password attempts.
I am silly and seemed to forgotten my password, tried it too many times, now it says its disabled, but I need to use it...Can someone help me and let me know how to reset it or un disbale it? Thank-you. Jessica Rzazewski PS: I cannot get into it to g
-
on the timeline; does FCP playback proxies of the quicktime files or does it actually play the movie files themselves. I've noticed that when importing the clips, it is instantaneous as opposed to the length of time it takes to import clips into Medi
-
Giving a selction criteria during Init load . I have two ODS's - ZODS1 and ZODS2 . I need to feed ODS2 from ODS1 . When i try to do an init load , I do not get an option to make any selections although when i maintained the export data source for ODS
-
my new imac when i was cleaning my desk, i moved onto my bed, and it suddenly "kiss" the ground, itself leaves a long and long and long long scratches, i have not any ideas about how to solve the problem, i am wondering can i contact apple store some