Prefix zero to alphanumeric characters
Hi All,
Can anyone suggest me any Function module is there to prefix zero to an alphanumeric charcter. I have been trying conversion_exit_alpha_input FM for this purpose but it works fine only for numerics. plaese let me know any FM exists for alphanumeric characters which serves the purpose.
Thanks in Advance
Rijish
Hi,
You can use the below code.
report abc.
data: v_size1(2) type n,
v_size2(2) type n.
constants: c_zeroes(18) type c value '000000000000000000'.
parameters: p1(18) type c.
shift p1 left deleting leading space.
v_size1 = strlen( p1 ).
if v_size1 lt 18.
v_size2 = 18 - v_size1.
shift p1 right deleting trailing space.
p1+0(v_size2) = c_zeroes.
endif.
write p1.
Also, note that the v_size2 is to be calculated as per your requirement.
Similar Messages
-
Hi All,
I have an itab with following data.
column
000001
000002
000003
000004
000005
I download this file using FM 'GUI_DOWNLOAD' as an .xls file.
but when i open this file in excel, the column data dosent contain prefixed zeros. i want the data to be downloaded with prefixed zeros.
Thank You All,
sal.hi,
Download in 'DBF fomrat ..'
CALL FUNCTION 'GUI_DOWNLOAD'*
filetype = 'ASC' "----
> change file type to 'DBF'
or
you have to download the value in character format with preceding single qoute .
for example -
if you are downloading 000010 means, assign that value as '000010.
So that, excel can treat it as character & the zeros will be retained.
either after download the excel do the change of properties of excel.
or
by giving itab-column = '00001. it will solve the problem but that symbol " ' " also appears.
regards
rahul -
Non-alphanumeric characters in textarea causing 404 errors
I'm only just becoming acquainted with Coldfusion, as I've been asked to fix a problem in an existing system. The system consists of a simple html form containing a text area, among other input fields. The form is submitted to a cfm script, which displays a confirmation page and sends a couple of emails. The problem is that whenever the user enters any (as far as I can tell) non-alphanumeric characters, e.g. quotes, commas or brackets, in the textarea field, they get a 404 response from the server.
I tried a number of things to identify the problem, including escaping the text in javascript before submission, but didn't get anywhere. The last thing I tried was installing a local version of the CF on my workstation, hoping to reproduce the problem and thus debug it more easily. However, on my local CF setup the problem does not occur.
Can anyone help me debug this please? Thanks,
MarcinThanks for your response. The form method is "post". The only thing that the CFM handler does with this field (gametestexperience) is include it at the bottom of an email message:
<CFMAIL TO="[email protected]"
FROM="#email#"
SUBJECT="Tester Application"
type="html"
server = "Cluster9.us.messagelabs.com">
Automatically logged from the internet form:<p><p>
<table>
<tr><td>EmailFrom</td><td>#email#</td>
<tr><td>From</td><td>#firstName# #lastName#</td></tr>
<tr><td>Sent</td><td>#DateFormat(Now())#</td></tr>
<tr><td>Referrer</td><td>#referer#</td></tr>
<tr><td>Confirmation</td><td>#agree1#, #agree2#, #agree3#, #agree4#, #agree5#</td></tr>
<tr><td>FamilyCompetitor</td><td>#familycompetitor#</td></tr>
<tr><td>FamilyWork</td><td>#familywork#</td></tr>
<tr><td>ReferredBy</td><td>#referredBy#</td></tr>
<tr><td>RefererDetails</td><td>#refererdetails#</td></tr>
<tr><td>FirstName</td><td>#firstName#</td></tr>
<tr><td>LastName</td><td>#lastName#</td></tr>
<tr><td>Email</td><td>#email#</td></tr>
<tr><td>TelephoneHome</td><td>#telephoneHome#</td></tr>
<tr><td>TelephoneCell</td><td>#telephoneCell#</td></tr>
<tr><td>TelephoneDay</td><td>#telephoneDay#</td></tr>
<tr><td>City</td><td>#homeTown#</td></tr>
<tr><td>Employment</td><td>#employment#</td></tr>
<tr><td>GamerType</td><td>#gamerType#</td></tr>
<tr><td>GamerStyle</td><td>#gamerStyle#</td></tr>
<tr><td>HoursPerWeek</td><td>#hoursPerWeek#</td></tr>
<tr><td>PreferredGenres</td><td>#preferredGenres#</td></tr>
<tr><td>Consoles</td><td>#console#</td></tr>
<tr><td>GamesPlayed</td><td>#gameplayed#</td></tr>
<tr><td>Available</td><td>#available#</td></tr>
<tr><td>TestedBefore</td><td>#testedBefore#</td></tr>
<tr><td>TestingExperience</td><td>#gametestexperience#</td></tr>
</table>
Thanks,<P>
Focus Test Team!<P>
</CFMAIL> -
[solved] Non-alphanumeric characters broken in TinyChat
Hello, fellow archers.
I've been having a bit of trouble with the TinyChat site. Most non-alphanumeric characters are being displayed as crossed-out boxes. This problem is exclusive to TinyChat and has not occured in any other Flash applications.
An example of the broken characters:
Note how the / and > characters are not broken.
This is the second installation of ArchLinux on my computer, the problem occured on the current install only. I suspect the problem is caused by a missing package, though the only hint I was able to find was installing the ttf-ms-fonts package (https://wiki.archlinux.org/index.php/br … ash_Player). This did not resolve the issue.
Package versions:
firefox 34.0.5-1
flashplugin 11.2.202.425-1
I'll gladly provide any other information that could help resolve this issue.
Last edited by skoftoby (2015-01-21 18:31:26)Head_on_a_Stick wrote:
skoftoby wrote:I'd like to request this topic be marked as solved either way.
As with most things Arch, you have to do this yourself -- edit the title of your first post & put "[SOLVED]" at the beginning.
Whops. The subject length was exactly at the maximum length, and since I couldn't edit the title any further, I thought a moderator had to edit it. Apologies! -
How to support non alphanumeric characters when using WORLD_LEXER?
BASIC_LEXER has an attribute of printjoins which we can specify the non alphanumberic characters as normal alphanumberic in query and included with the token. However, WORLD_LEXER doesn't have this attribute. So in order to use some non alphanumberic characters and treat them as alphanumberic characters in Oracle Text Index, such as ><$, what should I can?
Thanks in advance for any help.I use WORLD_LEXER to create Oracle Text Index to support UTF-8.
Below is the script to create table and index:
REM Create table
CREATE TABLE my_test
( id VARCHAR2(32 BYTE) NOT NULL,
code VARCHAR2(100 BYTE) NOT NULL,
CONSTRAINT "my_test_pk" PRIMARY KEY ("id"));
REM create index
exec ctx_ddl.create_preference('stars_lexer','WORLD_LEXER');
exec ctx_ddl.create_preference('stars_wordlist', 'BASIC_WORDLIST');
exec ctx_ddl.set_attribute('stars_wordlist','substring_index','TRUE');
exec ctx_ddl.set_attribute('stars_wordlist','PREFIX_INDEX','TRUE');
-- create index for Table corrosion level
CREATE INDEX my_test_index
ON my_test(code)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS ('LEXER stars_lexer STOPLIST stars_stop WORDLIST stars_wordlist SYNC(EVERY "SYSDATE+5/1440") TRANSACTIONAL');
INSERT INTO my_test('1', 'English word1');
INSERT INTO my_test('2', '违违');
INSERT INTO my_test('3', '违违&^|违违');
When I query:
select * from corrosion_levels r where contains(r.CORROSION_LEVEL, '{%违${|违%}') > 0
ID CODE
3 违违$(|违违
2 违违
Actually, the result what I want is: 3 违违$(|违违
So the requirement is that all non-alphanumeric characters should be treated as normal alphanumeric charcters. Please tell me how to implement it. -
SQL*Loader-350: Illegal combination of non-alphanumeric characters
Hi all,
how to skip a column in control file.
i.e.
I have a table with 10 columns and FAT file contains 11 columns.
how to skip a last column ?
and
I added extra column to Table and I changed the control file too.
but i am getting error.
SQL*Loader-350: Syntax error at line 115.
Illegal combination of non-alphanumeric characters
thanks in Advance.Tom Kyte has an elaborate solution on his page:
http://osi.oracle.com/~tkyte/SkipCols/index.html
Or post the table description and the control file, so we can have a look at it. -
Why does Acrobat allocate more width for spaces than for alphanumeric characters?
When I convert a text file to PDF using Acrobat X Pro, I select a fixed-width font. However, it appears that Acrobat allocates a greater width for space characters in the text file, than it does for alphanumeric characters in the text file. How do I instruct Acrobat to use exactly the same width for all the characters, both spaces and visible characters?
This question is actually a re-write of my previous post titled, ‘Bulk Convert Text to PDF with Acrobat’. I know what the problem is now but do not how to fix it.
Here's a mock example of the content of a text file. In the resulting PDF, the H no longer lies directly under the G. I chose Courier New 8 pt for the font.
ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEFG
H H H H H H
Any suggestion will be appreciated. Thank you.If you are comfortable with the settings in the printing, then go back to the PDF Maker settings (create PDF preferences in WORD) and adjust the preferences for similar performance, at least in the job settings and such. The rest deals with how much you want the bookmarks and such.
I am assuming that those PDF Maker preferences set in WORD are retained when you run the conversion from Acrobat that I have the impression you are doing. Other than that, check the conversion settings in Acrobat itself. They are in the preferences. If you the printer preferences are used when converting from Text (you will have to try to see what happens), it would use the default preferences of the printer, not those set in the print menu of an application. The latter only last as long as that application is open and only for that application. For your need, you may need to change them in either the printer (Start>Printers.. in windows) or Distiller, or both. The printer overrides the Distiller settings usually (another setting on this). -
Prefix zero to a decimal number
Hi All,
I need to send a value to third party system. The value is a decimal number but before sending it i need to prefix zero.
Eg: 1.25---> 00000000001.25
The Functiom module CONVERSION_EXIT_ALPHA_INPUT works only for integers.
Can you please suggest a function module which wil satisfy my requirement.
Thanks
RohitUse a For loop to index into the array, then use the Not Equal To Zero comparison to convert it to true/false. Then Index out of the For and use the Bool Array to Int from the boolean pallete.
Here is an example in 8.2
Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
Attachments:
Convert Bit Array to Int.vi 8 KB -
Validation for Unique Name and Non-AlphaNumeric Characters
Hi All,
How to do Unique name and Non-Alpha Numeric Characters Validation?
Name should be unique and only allow alphanumeric characters.
Where all validations must be done? In EOImpl or any other file?
Plz help
Thanks,
SkSK
Here are the steps you need to perform to check duplicate Employee Names need not entered by user.
First create a VVO in your schema.server package(that of EO) with the following query.Generate both VVOImpl and VVORowImpl file.
select full_name
from fwk_tbx_employees
where full_name =:1Now add this VVO to your VAM means give instance to it.
Now open the VVOImpl and write below code to execute query based on new name entered by user
public void initQuery(String name)
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, name);
executeQuery();
}Now open Your Entity Expert class and add below method in it
public boolean isEmployeeNameExists(String name)
boolean isExists = false;
// Note that we want to use a cached, declaratively defined VO instead of creating
// one from a SQL statement which is far less performant.
EmployeeNameVVOImpl employeeNameVVO =
(EmployeeNameVVOImpl)findValidationViewObject("EmployeeNameVVO1");
employeeNameVVO.initQuery(name);
// We're just doing a simple existance check. If we don't find a match, return false.
if (employeeNameVVO.hasNext())
isExists = true;
return isExists;
}Now you need to call this expert class method from setter method of EOImpl for name.so Open your EOImpl file and go to setter method of name
if ((value != null) || (!("".equals(value.trim()))))
EmployeeEntityExpert expert = getEmployeeEntityExpert(getOADBTransaction());
if (!(expert.isEmployeeNameExists(value)))
throw new OAException("Duplicate Employee Name", OAException.ERROR);
}Remember to write code above setAttributeInternal.
Hope it helps!!!!
Let me know if you have queries in it.
Thanks
AJ -
Hot to set the Non-alphanumeric characters attribute?
Hello,
I'm developing an asp.net application using the oracle membership provider. I have installed the databse objects in an Oracle 9i and when I try to create a new user, It always asks me to consider at least 1 Non-alphanumeric character in the password, even if I put in the web.config file the minRequiredNonalphanumericCharacters="0" attribute. Is there another way to set the Non-alphanumeric characters to "0".
Thanks.Workaround: set 0 for minRequiredNonalphanumericCharacters attribute in your machine.config for OracleMembershipProvider. The defalt value is 1. The typical location of machine.config is in %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG.
-
RegEx in TSQL - replace non-alphanumeric characters etc
Hi guys, I have this function in VB that I used in Access to replace all non-alphanumeric characters, including spaces and anything in brackets.
Public Function charactersonly(inputString As String) As String
Dim RE As Object
Set RE = CreateObject("vbscript.regexp")
RE.Pattern = "\([^)]+\)|[^\w]|_"
RE.Global = True
charactersonly = RE.Replace(inputString, "")
Set RE = Nothing
End Function
Now, I moved to SQL server and I'm writing scripts to do same thing.
How can I use RegEx in TSQL?
Only thing I will do is that function.As alternative
declare @string varchar(200)
set @string = 'gg$%^^&is%^& s2342jjk23&&({}e c76l232e+_+a#n/ c][#o''y#e'
select cast(cast((select substring(@string,n,1)
from numbers
where n <= len(@string)
and substring(@string,n,1) like '[0-9 ]' for xml path('')) as xml)as varchar(max))
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Non-alphanumeric characters part of a word?
Hi,
When searching using "23" the users have complained that it brings back terms like 23:00 and www.bob.....html?q=23. It's a bit of a long stretch but is there anyway to disregards those item.
I expect I'll probably end up explaining to the users that non-alphanumeric characters are regarded in the same was as white spaces, but is this a general standard, and is there a link to more information anywhere?
CheersYou could make your colon and equal sign printjoins or skipjoins.
-
Account Codes with non Alphanumeric characters
I have a customer who has Business Partner Codes which contain non Alphanumeric characters :
space
full stop
apostrophe
forward slash
hyphen
Will this cause issues with the operation of any aspect of Webtools - what if anything should I watch out for since these cannot be changed?Thanks for your response. The form method is "post". The only thing that the CFM handler does with this field (gametestexperience) is include it at the bottom of an email message:
<CFMAIL TO="[email protected]"
FROM="#email#"
SUBJECT="Tester Application"
type="html"
server = "Cluster9.us.messagelabs.com">
Automatically logged from the internet form:<p><p>
<table>
<tr><td>EmailFrom</td><td>#email#</td>
<tr><td>From</td><td>#firstName# #lastName#</td></tr>
<tr><td>Sent</td><td>#DateFormat(Now())#</td></tr>
<tr><td>Referrer</td><td>#referer#</td></tr>
<tr><td>Confirmation</td><td>#agree1#, #agree2#, #agree3#, #agree4#, #agree5#</td></tr>
<tr><td>FamilyCompetitor</td><td>#familycompetitor#</td></tr>
<tr><td>FamilyWork</td><td>#familywork#</td></tr>
<tr><td>ReferredBy</td><td>#referredBy#</td></tr>
<tr><td>RefererDetails</td><td>#refererdetails#</td></tr>
<tr><td>FirstName</td><td>#firstName#</td></tr>
<tr><td>LastName</td><td>#lastName#</td></tr>
<tr><td>Email</td><td>#email#</td></tr>
<tr><td>TelephoneHome</td><td>#telephoneHome#</td></tr>
<tr><td>TelephoneCell</td><td>#telephoneCell#</td></tr>
<tr><td>TelephoneDay</td><td>#telephoneDay#</td></tr>
<tr><td>City</td><td>#homeTown#</td></tr>
<tr><td>Employment</td><td>#employment#</td></tr>
<tr><td>GamerType</td><td>#gamerType#</td></tr>
<tr><td>GamerStyle</td><td>#gamerStyle#</td></tr>
<tr><td>HoursPerWeek</td><td>#hoursPerWeek#</td></tr>
<tr><td>PreferredGenres</td><td>#preferredGenres#</td></tr>
<tr><td>Consoles</td><td>#console#</td></tr>
<tr><td>GamesPlayed</td><td>#gameplayed#</td></tr>
<tr><td>Available</td><td>#available#</td></tr>
<tr><td>TestedBefore</td><td>#testedBefore#</td></tr>
<tr><td>TestingExperience</td><td>#gametestexperience#</td></tr>
</table>
Thanks,<P>
Focus Test Team!<P>
</CFMAIL> -
How to add prefix zero to all matnr fields in itab
Hi,
I ve a internal table with following fields
Matnr bwkey
6 678
67 rty
678 78k
How to add prefix zero to all tha matnr fields.
like
matnr bwkey
00000000000000006 678
00000000000000067 rty
00000000000000678 78k
Thanks in advanceHi,
commonly used conversion routine is ALPHA.
It is conversion used to insert leading zero for document number.
For example, in sales order (VBAK-VBELN length 10),
when we key in order no, for example we key in '4302',
conversion routine input will automatically add leading zero,
so it will become '0000004302', this is real value stored in table VBAK.
On conversion routine output, it will delete leading zero
function CONVERSION_EXIT_ALPHA_INPUT, this will add leading zeros to a character based field of any length.
Ex:
data: lv_c(10) type c value '123'.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = lv_c
importing
output = lv_c.
write:/ lv_c.
Regards. -
Produce random alphanumeric characters: dukes available
Time for another duke giveaway
On Saturday 6th March, approx 8.00PM (GMT) the following program will be run;-
CodeMaker.javapublic class CodeMaker{
public static void main(String []params){
StringBuffer sb = new StringBuffer();
java.util.Random r = new java.util.Random();
for(char c='A'; c<='Z'; c++) sb.append(c);
for(char c='a'; c<='z'; c++) sb.append(c);
for(int i=0; i<=10; i++) sb.append(i);
for(int i=0; i<8; i++) System.out.print(sb.charAt(r.nextInt(sb.length()) ) );
ALL ARE WELCOME TO GUESS THE OUTCOME OF THIS PROGRAM AND EARN FREE DUKES!
- simply add to this thread with your guess of the 8 alphanumeric characters.
- the more characters you guess right the more you earn.
- only one guess permitted per contestant (schizoids such as the Scarlet Pimpernel excl.)
- any other rules may or may not be made by me at any time (after all it is my game so ner-ner-nee-ner-ner)
- that's all I can think of for the moment, good luck t'y'all.
The points system awarded will be determined by the following program;-
CodeScorer.javapublic class CodeScorer{
public static void main(String []params){
String luckyDukeWinner = params[0];
String codeToCrack = params[1];
String luckyDukeWinnerGuess = params[2];
new CodeScorer(luckyDukeWinner, codeToCrack, luckyDukeWinnerGuess);
private CodeScorer(String name, String code, String guess){
int same = calcSame(code, guess, 0);
int correct = calcCorrect(code, guess, 0);
System.out.println("Number of letters correct = "+same);
System.out.println("Number of letters exactly correct = "+correct);
System.out.println("Dukes earned by "+name+": "+calcScore(same, correct));
private int calcCorrect(String code, String guess, int tally){
for (int i=0; i< code.length(); i++)
if(guess.charAt(i) == code.charAt(i)) tally++;
return tally;
private int calcSame(String code, String guess, int tally){
StringBuffer buf = new StringBuffer(code);
for (int i=0; i< buf.length(); i++){
for (int j=0; j< buf.length(); j++)
if (guess.charAt(i) == buf.charAt(j)){
tally++;
buf.replace(j, j+1,"~");
return tally;
private int calcScore(int same, int correct){
return (same>1 && correct>1)? (int)((correct*4)*(Math.pow(same,2))):(int)((correct*4)+(Math.pow(same,2)));
}I thought this
for(int i=0; i<=10; i++) sb.append(i);
would do this
for(int i=0; i<=10; i++) sb.append((char)i);
I'm so humilitated....All punters may assume henceforth that line 7 char 22 is herewith removed (I'm humiliated too)
Maybe you are looking for
-
Multiple Digital Signatures in one Form
Hello I have an Interactive Forms that requires the digital signing of 6 different users. There is a control under the Web Dynpro Native named : Signature : Sign and Lock which allows multiple signatures but I am not able to use it correctly. I need
-
HT1338 trying to update iphone not working
i
-
Adding new line and sapaces in between the text in AI Script
areaText.contents = "This is an Area Text in a rectangle. See how it flows to the next line."; i want to break the sentance from 'Text' ie i want to add new line in between and also some more spaces can any one plz help for example I want to write th
-
Re: (forte-users) HTTP request through proxy server
Daniel - No, it does not. ;) How do you say to HTTPRequest to go through proxy? Thanks, Taras Daniel Nguyen wrote: > Hi, It works very well. I have experienced this model for a distant Forte client calling a Forte Server service Object for instance w
-
Adapt problem with the masks of Opportunity Add Product
In the Extensibility Explorer i can add the new Fields to the ListModificationFormProduct, but i can't change the layout of the form, for the fields, the new fields are always at the end of the form. How I can change that?