Check numbers in alpha numeric string
Hi All
Is there any direct command or function module which will find numbers in alpha numeric string or it will check that the string contains only numbers ?
Regards
Yogesh
hi,
data: fvalue(4) type c,
nvalue(4) type n.
fvalue = 'ABC1'.
nvalue = fvalue.
if fvalue cn nvalue .
message i000(zz) with 'fvalue contains not Only numbers'.
else.
message i000(zz) with 'fvalue containsOnly numbers'.
endif.
Regards,
Sailaja.
Similar Messages
-
How to make the Internal numbering as Alpha-Numeric
Hi,
In the Document Info Record, the Internal numbering is always numeric.
How to make it Alpha-Numeric?
Regards,
ShashiDear Shashidhar,
Number assignment is derived from Document Type of the DIR. You can customise the Document type settings (DC10) to make the number range as External or Mixed.
Modify the settings in "Number Assgmt" tab as 2 for only external number assignement and 3 for mixed number assignment.
Hope this solves your question.
Regards,
Sudharshan -
Numbers: Text to numerical string - Made easy?
How can I convert/transform numbers that are in text format to a numerical string, in order to use functions, e.g. SUM, MEAN etc?
Thanks!
P.S. I have read the manuals and tried everything "obvious".Assuming that your numeric strings are in column B, in cells of column C insert the formula :
=VALUE(B)
As it's written in iWork Formulas and Functions User Guide
The VALUE function returns a number value even if the argument is formatted as
text. This function is included for compatibility with tables imported from other
spreadsheet applications.
So, the values in column C are numeric ones which may be summed as you may see in the footer cell C22
=SUM(C)
Yvan KOENIG (VALLAURIS, France) mercredi 17 août 2011 19:45:32
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer ! -
Removing Non-numeric characters from Alpha-numeric string
Hi,
I have one column in which i have Alpha-numeric data like
COLUMN X
+91 (876) 098 6789
1-567-987-7655
so on.
I want to remove Non-numeric characters from above (space,'(',')',+,........)
i want to write something generic (suppose some function to which i pass the column)
thanks in advance,
MandipThis variation uses the like operators pattern recognition to remove non alphanumeric characters. It also
keeps decimals.
Code Snippet
CREATE FUNCTION dbo.RemoveChars(@Str varchar(1000))
RETURNS VARCHAR(1000)
BEGIN
declare @NewStr varchar(1000),
@i int
set @i = 1
set @NewStr = ''
while @i <= len(@str)
begin
--grab digits or (| in regex) decimal
if substring(@str,@i,1) like '%[0-9|.]%'
begin
set @NewStr = @NewStr + substring(@str,@i,1)
end
else
begin
set @NewStr = @NewStr
end
set @i = @i + 1
end
RETURN Rtrim(Ltrim(@NewStr))
END
GO
Code to validate:
Code Snippet
declare @t table(
TestStr varchar(100)
insert into @t values ('+91 (8.76) \098 6789');
insert into @t values ('1-567-987-7655');
select dbo.RemoveChars(TestStr)
from @t -
Randomly Generate alpha-numeric strings?
Hi, can somebody help me to randomly generate strings such as A1, B5, E 2, etc. The range for the values I need generated are [A-E][1-5]. I looked at lots of code for Random generating numbers, but found nothing related to what I need. I hope somebody can help me out here. Thanks!
nevermind, i figured it out! thanks anyway
-
OT: Alpha-numeric string after screen-name
What the heck is this string attached to my screen name?? Only appeared after the forum had timed out and had to log back in again.
Weird !I've emailed you privately about this. It appears you have an identity crisis - at least in cyberspace.
There are at least three Nadia Perres, all of them you: Nadia Perre plain and simple, Nadia Perre-39BgI8, and Nadia Perre-NuTcRP (the Community Expert). You need to contact JC (or a shrink) to get things sorted out. -
Format an alpha numeric string
Good day all,
I have what i hope to be a simple question. I have a table that i am storing Latitude and longitude in. The current format for each is as an example N432301 for the Latitude and
W0844150 for the Longitude.
I need the output formated to
N-43-23-01 for Latitude
and
W-84-41-50 for Longitude.GMoney wrote:
Greg,
I ran this using the following:
{code}
with xx as ( select 'N402456' lat, 'W1203926' lon from dual )
select substr(lat,1,1) || '-' || substr(lat,2,2) || '-' || substr(lat,4,2) || '-' || substr(lat,6,2) latitude,
substr(lon,1,1) || '-' || substr(lon,3,2) || '-' || substr(lon,5,2) || '-' || substr(lon,7,2) longitude
from xx;
{code}
and the result was :
LATITUDE
LONGITUDE
N-40-24-56
W-20-39-26
which is wrong because in this case the lon was 3 char versus 2 after dropping the '0' from the 084.
That's why I started with "We really need the rules to make sure it's accurate, "
Seriously, if you don't give us good specifics, you can't complain that much if we don't get all your requirements in the first run.
If you confirm that first one is 3 digits, no problem ...
substr(lon,1,1) || '-' || substr(lon,2,3) || '-' || substr(lon,5,2) || '-' || substr(lon,7,2) longitude
if you need to drop the 0 on the previous example (again guessing, because you haven't given any real rules )
substr(lon,1,1) || '-' || to_char(to_number(substr(lon,2,3)),'fm999') || '-' || substr(lon,5,2) || '-' || substr(lon,7,2) longitude
but at this point, Mike's reg exp shenanigans probably work better
lol
[edit]
Just for completeness:
with xx as ( select 'N432301' lat, 'W0844150' lon from dual union all
select 'N402456' , 'W1203926' from dual
select substr(lat,1,1) || '-' || substr(lat,2,2) || '-' || substr(lat,4,2) || '-' || substr(lat,6,2) latitude,
substr(lon,1,1) || '-' || to_char(to_number(substr(lon,2,3)),'fm999') || '-' || substr(lon,5,2) || '-' || substr(lon,7,2) longitude
from xx;
LATITUDE LONGITUDE
N-43-23-01 W-84-41-50
N-40-24-56 W-120-39-26
2 rows selected.
With great requirements, comes great results.
With poor requirements, comes poor results -
Alpha Numeric number Ranges for Sales order Acording to sales office wise.
Hi Experts,
I have a Issue for genrating sales order numbers With Alpha Numeric Number Ranges for sales office wise Internaly . How can we get this is there any Userexits or badi for this . If Any one Come across this issue plz guide me.
The Alpha characters should not change that will be sales office region code. only the Numeric numbers should change .
Ex; Abc-123000 to Abc-200000
Regards,
Ravi.This alpha-numeric format is not possible directly with SNRO settings.
You need to opt for external number range, and in the exit of your respective transaction you need to takecare of this number generation explicitly by programming.
http://www.sap-img.com/sap-sd/number-ranges-in-sales-order.htm
any more inputs from experts are welcome..
Hi,
1. goto include MV45AFZZ and to user exit Save_document This form is called before COMMITand double click on FORM USEREXIT_SAVE_DOCUMENT.
2.it will show the program MV45AF0B_BELEG_SICHERN from were this user exit is called, selcet the program and click on Display.
3. you can use the enhancement point enhancement-point beleg_sichern_01 spots es_sapmv45a. just below the PERFORM USEREXIT_SAVE_DOCUMENT to call the badi method on_costing_component.
regards.
santhosh reddy
Message was edited by:
Santhosh Reddy
Message was edited by:
Santhosh Reddy -
Find alpha numeric words with at least 3 words
Hi,
I am trying to extract a string which has got ranges like 10-20 or 10A-20 or A10-20 or 20-A40 or 20-40A or A20-30A and so on. besides this I would want to extract a thrid word which would contain a number or alpha numeric string or again a range alpha numeric string.
for example:
1. abc 123 12-2a cdf
2. efg 23-12 345 alksd
3. klkj; 123 456 asdfg
from the above examples I have to fetch row 1 & 2
Please advice.
Many thanks in advance.
Edited by: 920390 on Mar 12, 2012 8:57 PM920390 wrote:
Hi,
I am trying to extract a string which has got ranges like 10-20 or 10A-20 or A10-20 or 20-A40 or 20-40A or A20-30A and so on. besides this I would want to extract a thrid word which would contain a number or alpha numeric string or again a range alpha numeric string.
for example:
1. abc 123 12-2a cdf
2. efg 23-12 345 alksd
3. klkj; 123 456 asdfg
from the above examples I have to fetch row 1 & 2
Please advice.
Many thanks in advance.
Edited by: 920390 on Mar 12, 2012 8:57 PMIt is a violation of Third Normal Form to store multiple values in a single column!
you reap what you sowed! -
Check string for alpha numeric
is there a direct way to check whether the string is alpha numeric?
private boolean isAlphaNumeric(String str){
boolean blnNumeric = false;
boolean blnAlpha = false;
char chr[] = null;
if(str != null)
chr = str.toCharArray();
for(int i=0; i<chr.length; i++){
if(chr[i] >= '0' && chr[i] <= '9'){
blnNumeric = true;
break;
for(int i=0; i<chr.length; i++){
if((chr[i] >= 'A' && chr[i] <= 'Z') || (chr[i] >= 'a' && chr[i] <= 'z')){
blnAlpha = true;
break;
return (blnNumeric && blnAlpha);
Hope this would solve your problem -
Restating my issue / question...
When I send email from this iMac, there is a string of characters assigned. The characters are all the "alpha numeric" characters on the QWERTY key board. This only occurs when email is sent from this iMac. The issue does not manifest when using any other lap top or computer.
Hence, I have ruled out the issue is a yahoo mail matter.
Again, I can access the Yahoo mail account form multiple devices and send email without unintended assignment of character strings, but when I send wmail using this iMac, the issue happens everytime.
Characters are stacked verticaly in a column. It looks as if all characters (except function keys) are included in the string.
Any ideas?
GMcPlease read this whole message before doing anything.
This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.
These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing.
Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects.
Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands.
Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
Launch the Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign.
Step 1
Triple-click the line of text below to select it:
kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit
Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
Step 2
Repeat with this line:
{ sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; } | open -f -a TextEdit
This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step.
Step 3
launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}' | open -f -a TextEdit
Step 4
ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit
Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting.
Step 5
osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit
Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output.
You can then quit Terminal. -
How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).
How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).
-
Alpha numeric numbering production orders
Hi,
Do we need to have external numbering turned on to have alpha numeric numbers for production orders and planned orders ? By the way is external numbering allowed for planned orders ? If yes then how would MRP create planned orders if only external numbering is allowed ?
ThanksHi,
As per my thinking , you can try with following enhancement for getting alphanumeric numbering of production orders :
PPCO0001 Application development: PP orders
You need to concetanate the fix part ( alphabetical) alongwith number range maintained for production orders.
Pls. take help of your abaper for the same.
You can implement above as Enhancement Project in Tcode : CMOD.
Hope this helps.
Regards,
Tejas -
Removing non-alpha-numeric characters from a string
How can I remove all non-alpha-numeric characters from a string? (i.e. only alpha-numerics should remain in the string).
Or even without a loop ?
Extract from the help for the Search and Replace String function :
Right-click the Search and Replace String function and select Regular Expression from the shortcut menu to configure the function for advanced regular expression searches and partial match substitution in the replacement string.
Extract from the for the advanced search options :
[a-zA-Z0-9] matches any lowercase or uppercase letter or any digit. You also can use a character class to match any character not in a given set by adding a caret (^) to the beginning of the class. For example [^a-zA-Z0-9] matches any character that is not a lowercase or uppercase letter and also not a digit.
Message Edité par JB le 05-06-2008 01:49 PM
Attachments:
Example_VI_BD4.png 2 KB -
Alpha Numeric - GL account numbering
Hi
Our client is going for alpha numeric GL accounts. FS00 will allow creating alpha numeric GL accounts. But i wanted to what may be problem in future?
I want to know will any account determination settings like OBYC (FI - MM Settings), VKOA (FI - SD settings), AO90 - Asset accounting GL determination or any other FI process will give problem at the time of configurations or in future?.
Please help me on this. What can be the points on the basis of which i can tell client that they should go for NUMERIC GL accounts only and not Alpha Numeric.No other feedback ?
Avoid using alpha characters – they will create problems in sequencing
and sorting data in reports, assigning codes, using ranges, and when
creating validation and/or security rules”
What does security rules in this context ?
Maybe you are looking for
-
Music app wont open!!!
i have an iPhone 3G iOS 4.2, i recently did a restore on my phone because it was running a little slow and plus theres a weird gray line running across the bottom of my screen and it only goes away when i turn the screen off...but now since i updated
-
Problem with getting a D2K report in XML format
Hi all, Could any body give a solution for this problem. I have a matrix report like following: Q_Statement_Of_Net_Assets ----> main query | G_Cross ----> Cross product | CS_VALUE | CS_NET_ASSET | CF_COSTI | | --------------------------------- | | |
-
Assigning long text values to ODI variable
Hi all, I want to store the error message of the previous step in a variable: _<%=odiRef.getPrevStepLog("MESSAGE")%>_ (using ODI 10.1.3.5 on Oracle 9i). If I refresh the variable using a statement like Select '<%=odiRef.getPrevStepLog("MESSAGE")%>' F
-
Mail and address book bundle incompatible?
Just upgraded from 10.3.9 to 10.5 but mail and address book are disabled. What do I do please?
-
Error message at every Safari 4 start
Hello I installed Safari 4 under Windows XP and it works great ... until a Windows-update-restart( without warning). From now on - during every Safari start I get a Windows message "Safari meets some difficulties ... and has to close" with only 2 opt